Close

Always check power supply first

A project log for OpenOpener

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

manuManu 09/29/2014 at 19:420 Comments

Ok, I assumed that my 24V power supply was somewhat regulated and it's not. Just a Graetz diode bridge behind a transformer inside the motor case of my existing opener. As a result the voltage that is powering the motors is just redressed but not regulated. As you can imagine, when a (dc) motor is driven, the current that flows through it follows the voltage waveform. Unfortunately, my opener controller was supposed to stop an arm when an overcurrent is detected. Because of the non-continuous nature of the current, I coudn't sample shunt resistor voltage at random time to detect an overcurrent stall condition. I finally decided to solve it in hardware with a cheap diode/cap peak detector followed by a lowpass filter. I also added a median filter in software to avoid artefact from the shunt resistor. I will add oscilloscope captures to illustrate it, but I have a nice stable current value. It is not as accurate as a rms-to-dc converter but I don't need the exact current value: I'm only interested in the trend to dectect that a motor is stalling. So far, so good, I will continue to make my own opener controller in my spare time.

Yellow trace : "24V" power supply (rectified, not filtered nor regulated)

Blue trace : motor current (1V = 1A : 0.1ohm shunt resistor and a x10 amplifier)

On average, a motor sinks 1.3A and a peak of 5+Amps occurs when the motor starts and when it stalls.

A close up:

Discussions