Wednesday, June 15, 2016

Gateway progress

I have all components at home and I started already some tests. There are good results and bad results as well.

I'm happy to say, that my UART mux is working as I wanted it to work. There are 2 UARTs on ATmega1284P, one is used for GSM modem and second for RS485. Both need to be connected to hardware serial in order to have queue, interrupts  and other capabilities. But I keep compatibility with FTDI Arduino programmer, so I miss 3th serial. First I wanted to put jumpers to redirect serial 0 to GSM or FTDI, but later I have found nice little IC 74LVC1G3157 that is able to mux and demux one digital or analogue line to 2 outputs in both direction. With using the 3.3V present in FTDI it switches automatically from GSM to FTDI any time you connect the FTDI to header. Nice little trick.

New GSM module is working well, I have switched from external SIEMENS to more common SIM900. It did not send SMS, and I was not able to read extended status, but it was all matter of slightly different responses of the 2 modems to same AT commands. Some "/r" or adding empty line in library and all started to work. One thing that needs to be corrected on PCB for SIM900, is the placement of capacitor near GSM antenna connector. If one will put it in position toward the capacitor bank it can, with some bad luck, accidentally short 4V and ground. Hot glue will do will do for now, but I will move the capacitor 2-3 mm away. There is also SIM900 RESET connected to ATmega, which is most most probably unnecessary. I think rather to use it as input of  SIM900 STATUS to quickly see if module is ON or OFF.

Now the bad news, the Ethernet part is not working well, I keep on losing ACK or packets. Sadly I was expecting some problems there, as it requires differential traces tuned to some impedance and EMI reduction, I have sent the finished gerbers to friend to evaluate. Well, it turned out I have cross talk after the PHY. I'm absolutely not expert on such design, and I have no such equipment to debug 100Mbits Ethernet. But I have very slowly eliminated all to this hardware problem. Also lowering the speed to 10Mbits fairly lowered the error rate of my packets. All that is left is to try another brand MAGJACK.

All bad is for some good, I have tuned up Webduino code and W5500 library to use maximum bandwidth, and the embedded web server is now pretty fast, rising to over double the speed.

Rest is fine, I will just test the ADC protection circuit. For W5500 I will most probably design small 2,5 x 5 cm breadboard friendly PCB, not to waste another $50 for whole gateway board.

No comments:

Post a Comment