# Controlling motor with potential on 2 points

I have 2 nodes where minimum voltage is 2.7v and maximum voltage is 5v. I would like to turn ON a motor when both nodes have 5v and turn off when both nodes have 2.7v.

1. Node1 - 5v & Node2 - 5v Motor ON
2. Node1 - 5v & Node2 - 2.7v Motor ON
3. Node1 - 2.7v & point2 - 2.7v Motor OFF

How can i achieve this??

• Your list of states contradicts your earlier statement. Do you mean the motor should turn on when EITHER point (node?) is at 5V? To solve this problem, you also need to indicate where the change of state should occur. Can the voltages only be 2.7V (give or take how much?) and 5V, or can they vary continuously between those values? If so, when should the motor turn off? When both voltages fall to 2.7V, 2.8V, 2.9V? If you provide this information a solution is easier.
– user133493
Commented Feb 26, 2017 at 8:31
• There are two states only. The voltage stays constant at 2.7 (give or take .1v) and 5v (give or take .1v). Yes. Your interpretation is right. Motor should be on when both nodes are at 5v and should stay on when one node at 5v and other at 2.7v and should be off when both nodes are at 2.7v. Commented Feb 26, 2017 at 8:53
• If you are saying that when the motor is off, both inputs must be at 5V to turn it on, then the OR gate in my solution below will not work and the solution becomes a little more complex. I understood you to mean that either must be at 5V.
– user133493
Commented Feb 26, 2017 at 9:19
• Is there anyway i can share you my simulation file?? Can you help me sort this out? Commented Feb 26, 2017 at 9:30
• Edit your question with the relevant information from the simulation, or with a screenshot of it.
– user133493
Commented Feb 26, 2017 at 9:37

You can use a comparator, along these lines:

simulate this circuit – Schematic created using CircuitLab

The noninverting input sees the higher of your sample points minus a diode drop. It will see about 4.3V if either In1 or In2 is 5V, or about 2V if both are 2.7V.

The divider formed by R1 and R2 sets your threshold for turning the motor on. You should design this divider with the values in the previous paragraph in mind.