Close

Current sensing

A project log for OpenOpener

Open source (software and hardware) DC motor controller for electric gates

manuManu 08/18/2014 at 23:590 Comments

To make the motion controller automatic, it has to detect the mechanical limits of each arm of the gates. In my configuration, an arm is fully opened when the gate is in contact with the box containing a motor. The same arm is fully closed when the gate is in contact with a small piece of metal cast in concrete.

The sensing process uses a current shunt: it is a small value resitor (a few tens of ohm) that has its voltage proportional to the current that flows through it. A DC motor has approximately its torque proportional to the current that flows through it. By detecting that the current overshoots, we can determine that the torque increases and, if it increases enough, should stop.

One nice thing with H-brige is that you can reverse current in a motor to make it turn the opposit way, but another nice thing is that current direction outside the bridge is the same whatever the motor direction is. So we have the same current sign value in a motor direction or the other. This keeps us to sense the current in both ways, which is always painful. No need to have bipolar amplifier and bipolar power supplies. Great, I want to keep it simple.

Discussions