Close

TODO list

A project log for OpenOpener

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

manuManu 01/22/2015 at 00:510 Comments

My proto board does its minimal requirement: I can open an close the automatic gate with a remote control.

Yet, I have some bugs to fix:

- add a proper antenna to the 433MHz receiver: in open field, I can open and close the automatic gate about 10-15 meters away from the receiver. But when I'm in my car, with an athermal coated windshield which filters IR to prevent overheating in summer but blocks also some useful RF data links, it only works 2-3 meters away. It would be a great improvement to add an external antenna with some coaxial cable to the receiver. For the moment I only have a piece of copper wire badly positioned in the case. I would have a better sensivity if an antenna was on a door post.

- I use an external interrupt pin on the arduino board (INT0 - digital pin D2) connected to the 5V logic output pin of the remote control receiver. This thing is a little picky and should be more debounced. As the remote control has only one push button, a state machine follows a sequence like this: STOP - OPEN - STOP - CLOSE - STOP - OPEN ... at every pulse generated from the remote control. Sometimes, when from a stop state, it skips an OPEN or CLOSE state immediately to a STOP state if a glitch happens. Maybe some more coding could fix it (or a more filtered/flip-flopped D2 pin).

- current sensing: as the motor power supply is only rectified, but not filtered nor regulated, the current in the motors is pulsed at 100Hz (2x50 Hz mains frequency in Europe). I am currently using a peak detector (10xopamp + diode + cap//resistor) and a basic RC low-pass filter to smooth it out, but it needs to be tuned.

- current sensing without diff amplifier: when the 2 motors run, the shunt resistor "see" the other mother and the current value is impacted. By tweaking threshold values in software, it works, but it is not satisfying. I need to work to isolate the both current measurements from the 2 motors.

Things that I would like to improve:

- clean the power supply to power motors and logic board from the same 24V rectified. I am using a 24V regulated power brick temporally in order to prevent microcontroller brown-outs. Kinda ugly, I would prefer just one cable from mains power.

- add a mosfet to switch the original flashing light. It is annoying not having a visual indicator when the opener is doing something.

- add an xbee wireless uart to do some checks from my house (especially when it's raining outside). I have a little command interpreter in the arduino code which is a more user friendly than a single push button remote control.

- add rfid (because I can).

- replace the proto board with a clean custom pcb to save some real estate in the case.

- software: estimate the angular position of a gate by timing it from a mechanical limit. For fun, maybe, but it can be useful when it stops before gates reaches their fully open or fully close position as you need to maintain about 3 seconds between each gate to prevent them from colliding.

Things to give up:

- connecting a raspberry pi is not very useful at the moment. Maybe if I add a camera module, but I don't feel like doing it until next spring.

- watchdog timer: I need to double check AVR datasheets but it seems that 8 seconds is a max. It also seems that the bootloader has issue with it. So, I am relying on the timeouts I implemented in software to return from error states.

Discussions