This project was designed to add a GSM control to a DEA NET230N electric gate.
The NET230N expects inputs to be open-collector style.
The basic functioning of this project is...
- An Arduino Nano monitors the serial output of an A6 GSM/GPRS module.
- When an incoming call is detected (A6 module sends "RING") the Arduino opens the gate, waits 3 minutes, and closes the gate.
Some problems during the project...
- (Fixed) The A6 module communicates at 115200 baud. This is is too fast for the Arduino SoftwareSerial library. The hardware serial port is used by the USB port on the Nano, so this is not available. The solution was to use dedicated interrupt-driven code to implement a 115200 baud receiver. Probably an easier solution would be to use an Arduino Pro Mini which doesn't have a USB adaptor, but I didn't have a Pro Mini available when I was designing the system. Maybe next revision...
- (Not fixed) It is really difficult to reset the A6 module. The RST pin must be pulled very low (<0.05 volt) at a fairly high current (70mA). This means that a MOSFET or a relay must be used to pull the RST pin low. R5 and Q3 are not needed, these are part of an experiment that didn't work. The Arduino does not seem to be able to drive a MOSFET (Q3) gate directly, maybe I should add an NPN transistor between R5 and Q3. Luckily, the A6 module seems very reliable and I have seen no need to reset it yet. So this is very low priority to fix.
- (Not fixed) The serial debug caused a lot of trouble, and it is commented out in the code. The SoftwareSerial library really messes up the handling of interrupts, so communications with the A6 module can be lost when the debug port is being used. Luckily, the system is very reliable, so I don't have much use for the debug function.
Note: Before placing a SIM card in the A6 module, make sure (by placing it in a mobile phone) that the security PIN number is disabled.