Just XBee Left Wire

I finally got around to spend some time on this and got everything on a perfboard . I also included a temperature sensor (LM35) along with a button to select the LCD display mode.  If I had to change one thing, I would chose different connectors so I can disconnect the current and voltage sensing wiring without screwing on a terminal block. I removed the CT and voltage wiring to the terminal block in the picture.


Given that I will be working with two current transformers any open circuit can be lethal. I will  add a switch that short circuits the secondary before I disconnect from the terminal blocks. The last piece to connect will be a XBee chip to send the data to the master. As stated early, I am using Modbus over serial as the protocol to communicate with the host.

One thing that did give me grief is that the temperature reading was erratic under certain scenarios.  I sampled the currents and voltage to get 2000 samples do some computations and then take a sample of the ambient temperature. If I did not perform the 2000 sample burst, I got a stable temperature reading. If I looped for sample 2000 readings then took a temperature, the temperature would be erratic.  I still don’t know why and my hunch is that it lies in the A/D mux in the Arduino.  What I did was take average 10 temperature readings with a delay of 20 ms between sample which led to a more stable temperature reading.

All that is left is to mount an XBee chip on the bread board and the hardware should be ready to stuff into an enclosure.