On the lower left is the charging circuit that I came up with based (roughly) on the Harbor Freight 42292; at the top, stuck to the side is a series 2 XBee plugged into a breakout board; and on the right is the voltmeter display. This is all enclosed in a plastic rectangular enclosure. When assembled it looks like this:
Of course, since the XBee is a 3.3V device, I had to add a power supply for it. I took the power directly from the float voltage and used an AP1117T33 regulator. When I first started testing the combination, it got pretty hot pretty quickly, even when it wasn't hooked to a battery. A little checking (I unplugged the XBee) told me that the XBee and its two LEDs were sucking enough power to heat it up, so I enabled sleep on the XBee. This way, it would be off most of the time and only turn on to take a couple of measurements and transmit them. This totally solved the problem.Here's the schematic I eventually settled on.
If you're following this, you'll see that it's a simple variable supply that I set to 13.4V with resistor R2 which feeds a 3.3V supply to power the XBee. The voltage divider R4, R5 sets the level that is in the 1.2V analog input range of the XBee. Since these regulators sometimes tend to oscillate, I added capacitors C1 and C2 just to make sure I didn't drive the XBee nuts. That's also why I added the resistor R6, to keep it away from reset.
To set it up, I put a 1K resistor across the output and set the voltage using R2 to 13.4 volts. Then I centered the pot R5 and checked what was being transmitted. By adjusting the pot, I was able to get a nice reading at the receiving end which I translated back into voltage and can display with an XBee connected Arduino.
There's a little jitter in the XBee readings caused by transients. I can solve that two ways, add a capacitor on pin 20 of the XBee or do a rolling average on the receiving device. I haven't decided which to do yet. I'm leaning toward a rolling average, but experience will tell me if it even needs to be fixed. Here's a short sample of the Arduino output I set up. Obviously, this isn't what I'll eventually use, but it's nice to be able to see the charger out in the garage:
A fun item I noticed is that the circuitry for monitoring the battery and transmitting the value can be separated from the charger. That way I could hook a device to the battery and it would transmit the voltage to something that could alert me to go attend to the darn thing. I may pursue that for something in the future.
No, I'm still not done. This thing was a real pain to build. It came up from several prototypes and kept getting more complex and looks like a mess because of this. I think I may journey into getting a custom PC board made to put the thing together with since I want at least five of them. Also, since I now have a box that will hold it, I'm going to mount the components on the lid with a wire to the display on the box part. That way I can actually screw stuff down so it doesn't bounce around over time.
Post a Comment