magudaman wrote:Alright I have been working on my own version of this little circuit for the last week but have changed the code quite a bit to allow for up to 30ah packs and would be independent of the controller. I am using a hall effect open loop current sensor to give the current readings. I would really like to add an LCD display to just interpret serial and give a percent and a fullness gauge. Since I have ditched the voltage sense part of the circuit I do have an extra output line. Is this within the capabilities of the 08, I do see that it can only do 4800 baud out the serial connections and all the cheap lcd units I see only have 9600 baud.
The only two serial displays I've driven from this chip are the AXE003 from the Picaxe people and the Cat's Whisker Textstar display that's in this thread: viewtopic.php?f=2&t=14498
Both work OK from any output pin on the 08M, in my experience.
magudaman wrote:I was thinking about dropping the average current sampling rate to 50 so I can save to eprom each round so users can shut down at any time. Is there enough time in a cycle for this in your experiences?
I think it should work, the reason I only write to eeprom every power shutdown was just to limit the number of write cycles to it, but the reality is that it should last a long time even if writing to it once a second. There should be time for this, you just need to adjust the pause values (coarse adjustment inside the repeated measurement routine, fine adjustment in the loop) to get back to 1 second (or whatever value you choose to use) for correctly calculating remaining capacity. In practice the shutdown routine very reliably detects power off and saves data in plenty of time before the power supply dies. If you wanted to make it independent of the controller, then adding a bit of capacitance to the supply will hold it up for the very short time that the Picaxe needs to save and shut down.
magudaman wrote:I see that you dump out a calibration pulse but how did you actually interpret that and calibrate your setup?
I hooked mine up to a USB 'scope, looked at the calibration output pulse edges and adjusted the two pauses to get as close as I could to 1 second between them. I managed to get mine to 999.8mS, which was plenty good enough. You could do the same with a counter/timer hooked up to this pulse, or even set it very roughly with a LED on the output and a stop watch.
magudaman wrote:I am also trying to get a consistent 5v and picked up some linear regulators that are good from 20-125v. So far in testing them they are consuming about 1.3 watts while my 5v output is only needing 0.075w. Is there any more efficient way to get 5v at such low power levels?
What's really needed to do this efficiently is a switch mode regulator, but they are hard to find at these high input levels. LFP pointed out in the simple controller thread that there are some cell phone chargers around that do the job, maybe gutting one of these might get you what you're after. If you can cope with a lower input voltage, then I think johnrobholmes has some for sale.
Sounds like you're having fun with this, I look forward to seeing how it turns out.
Please ask questions on the forum, rather than by PM, as it helps others and you'll get a better range of answers.