TalentCell YS1203000 "State of charge" monitor

Sounds way more impressive than “forty bucks” :grinning: – but even that would be a LOT of resistors.

#5 sounds like the rational approach.

1 Like

When digital watches first came out, everyone said that watches with hands, (analog watches), were dead-meat.

It turns out that “analog” displays outsell digital displays.


People usually don’t want to know what time it is, but what time it’s near. “Almost 4:30” makes more sense to most people than 4:27:02.

It’s the same with comparitor circuits.

Aside from the obvious difficulty of getting dozens of batteries charged to exact and precise voltages, (to something like 0.01v), and having them remain stable, there is the problem of varying the voltage across the switching point in each direction.

In other words, the voltage I’m near may be more important than the voltage I’m at.

1 Like

Obviously a continuously variable supply is a much better test setup, I was just pointing out a #6 option of testing the circuit in-situ on Charlie exists, and reading out the voltage you are near in software with Charlie.volt()+0.7 or what ever your “voltage_at_battery” correction factor measures to be.

(OK I was being a smart-aleck … )


If it is really possible to use Charlie as a programmable variable power supply, preferably with a 13v to 7v range, I am all ears! :ear:

I will kick myself all the way to Charing Cross in London, worship at your feet, and gladly acknowledge you 20,000 times as smart as I will ever be - if you can show me how to do it with existing hardware.

And I will feel like a total idiot for banging my head trying to implement something that’s already in my pocket.


Ok now let’s not get all semantic about what I was suggesting - a battery is a continuously “varying” power supply, not continuously “variable”.

Now that you have broached option #7 - using the GoPiGo3 as a programmable (low-current) voltage source, yes ready your ears.

The GoPiGo3 has two controllable A2D/DigitalIO/PWM capable ports. Wouldn’t a properly biased transistor with its base connected to the the PWM output, input connected to the battery (perhaps through a 20v up-down-buck?), and output connected to an appropriate inductor/capacitor smoother create a programmable, continuously variable voltage source?

(Ok - I’m being a smart-aleck today. I can’t help myself.)


You’ve just defined a self-aware robot:

“I have voltage, therefore I am.”


Oh yes - Carl checks his pocket for volts several times a minute to declare “I am the great master of trons”


Since you obviously have non-trivial hardware chops yourself, you obviously know that testing a comparator-based voltage monitor, (when driven by the voltage being monitored), is not a simple exercise since the voltage generating the reference voltage is changing with the voltage being measured.

Most monitor circuits are driven by a separate supply making reference voltage generation simple.

In this case, if you want to compare a 9v input to a corresponding reference, that voltage must be at least as large as the voltage being measured.

A resistor divider network can be used to scale the voltages, but as the input voltage changes, the current through the resistors also changes making the design of the network an exercise in hair-pulling.

This is why I want to put this circuit together on some proto-board. This way I can actually see what’s happening to my finely tuned calculations. I strongly suspect that Murphy has a Ronco Kitchen Magician waiting to “slice, dice, shred, and jullianne” my best ideas.


Does it need to be that frequent? Seems like once every minute or two would be sufficient.

Or, maybe a simple comparator set to “trip” when the battery voltage drops below some comfortable level?

1 Like

No but Carl has been seen looking for work.

Wow - OT again.


Not really, IMHO.

Just wandering around a little bit thinking about ways to measure and monitor voltage, which, (again IMHO), is dead-on topic.


3:1 voltage divider feeding Charlie’s AD2 with appropriate calibration against good VoltMeter and you can have lights, camera, action.

Your mission to create a test jig and an hardware measure/monitor does have some comparison to

I don’t understand the changing reference - the original has a fixed reference doesn’t it? If not add a diode, and put the divider network in front of the comparitors?

You know what - I think you got this under control. I’ll just watch you do some magic.


Not true.

The divider (reference) network is fed by the same changing voltage that you’re trying to measure.

As I said in an earlier post, they wired the thing backwards.

If it were a matter of just coming up with something that works, I would have been done weeks ago. The problem is that there is already a circuit that is etched in stone, (a PC board), that needs to work.

And it needs to work with the least number of changes possible, preferably simple “cut-and-jumper” changes.

To do that, I have to work within the constraints of the existing circuitry and (hopefully) come up with a fix that anyone else can do too.

Not a simple task.

Actually I have several ideas that might work, but I don’t want to totally mangle a valuable battery hacking around, so this is why I want to put it on some prototyping board and use a variable supply to try things out.

We’ll get there. :wink:


I’m sorry, but what are you smoking? You are on an educational quest that will enlighten us all but I cannot conceive of any other GoPiGo3 owner digging into a useful container of explosive material to fix the tiny lights on their robot so they can repeatedly get up out of their chair and walk to the robot to observe the battery’s SOC.

What may be useful are the voltage vs time remaining graph and variance over the cycle life of the battery, and over the variation in starting voltage. If indeed there is some consistency, the addressable multi-color GoPiGo3 Power Indicator could be given the credulity and use it lacks today.
And the addition of hourly SOC, and an end-of-life warning, might also be a big hit.


Oh, plueeese!

You’d think that the battery was filled with nitroglycerin or anthrax powder from the way you describe it.

Seriously now, alkaline or NiMH cells aren’t any less dangerous, and now that the technology is more mature, there’s a greater danger of falling out of bed and breaking your hip than from a lithium battery.

  • Has anyone ever told you that individual NiCad and NiMH batteries are filled with lethal amounts of horribly cariogenic and deadly heavy metal salts?

  • The PhD chemist, Derek Lowe, places both Cadmium and Nickel, especially the hydrides, firmly on his “stay away from me!” list because they are so dangerous.

  • He gives the example of a very famous and incredibly competent chemist named Jane or June something who spilled a small amount of a solution containing nickel salts on a latex glove she was wearing back in the mid 70’s.
    The result of that brief exposure was that the nickel salts had penetrated her gloves and she received enough elemental nickel to cause heavy metal poisoning, and within a few months she was dying the most terrible and lingering death anyone could imagine.

  • Alkaline batteries can, and will, give you a nasty chemical burn if mishandled. Go ahead, ask me how I know.

  • Lead-acid batteries are hellaciously dangerous, and not just because of the gallon or so of very highly concentrated sulfuric acid they contain, or the viciously poisonous lead in them. The simple act of charging them can release enough highly explosive hydrogen gas to blow you to the Gates Of Hell and back. All you need to do is flip a light switch or make a small spark when attaching the leads to it.

But properly handled, and that includes things like not making sandwiches out of them, they pose minimal risk.

Thus it is with lithium batteries.

You may be scared of them, and that’s OK.

Just try not to be overly alarmist. Please?


Even if individual users don’t want to modify their own batteries, I want the changes to be simple enough for TalentCell to consider making them.


I’m being perfectly calm when I ask “how did you get a nasty chemical burn from alkalines?”


Absolutely true.

This happened back when I was young, stupid, and didn’t realize that the guts of a Poloroid SX-70 battery were so caustic.

And no, I am not going anywhere near opening up individual cells, just a few cuts and jumpers if possible.


I guessed that was the real goal, but thinking of someone of less experience than you opening and modifying the board which also contains the protective smarts “alarmed me.”


A good point. I stand corrected.

Sometimes I forget that some people don’t know which end of the soldering iron gets hot.