For the past several months I have been stealing time from my main projects to complete a little DAS for testing hearing aid batteries. The idea is to test a variety of brands to see which brand performs best, and be able to do a retest periodically to verify that the leader has not become the slacker. Since I joined the growing number of people wearing this fashion accessory I have been really disappointed in the increasingly poor performance of zinc-air batteries. Some well-known brands in the alkaline type are terrible at making zinc-air.
The concept seemed relatively simple: a little gain (3x) added to a half-wave non-inverting precision rectifier to protect the inputs of an AVR328 on an Arduino Nano would give me the ability to test eight batteries at a time under simulated load conditions. And I had most of the parts. Easy stuff for an AVR. My troubles came with the rectifier -- which I have never built but seemed easy enough -- just a diode in the feedback loop - NBD.
I made the mistake of consulting that source of all knowledge, the internet, which told me that I needed a second diode to keep the opamp out of saturation if it swung negative. Well, maybe it works that way in an inverting configuration, but non-inverting? I dunno. I still dunno and don't care. It would never go into saturation unless I hooked up a battery backwards, but recalling my last experience jumping car batteries it seemed like a good idea to have some reverse polarity protection. AC performance, which doesn't matter for this project, was okay, but DC performance sucked. With AC down to 5Hz everything worked, but that was as low as my signal generator would go. With DC input (a pot across the +- rails) the opamp would saturate as soon as I adjusted the input to negative and stay there until forced positive by a positive voltage greater than the negative saturation voltage. If I disconnected the source it would leisurely drift positive until it crossed zero, then rapidly shoot up to positive saturation. Yikes!
No longer having a colleague to bounce things off of, I turned to that well known sage, chatGPT, which sent me on wild goose chase after wild goose chase, adding resistors and even more diodes until Mr. Chat told me that parts outside the feedback loop were the eproblem. I finally realized that Mr. Chad had no clue what he was talking about and I had to do this the old fashioned way. I pulled out a fresh protoboard and built the simplest possible precision rectifier: a diode in the feedback loop of a voltage follower, and it worked. AC up to 45kHz with a 5532 all the way down to DC. Saturation was no problem with this thing, it never latched up. I added my gain of 3 and it still worked perfectly. Now I will not blow any of my precious AVR inputs with reverse polarity batteries under test and I get to use all ten bits of that rather run of the mill ADC in the AVR328 becasue I have a rectifier with gain.
I haven't finished the beast yet, but this was the hurdle to overcome. All the rest is point to point wiring and code. ChatGPT is pretty good at writing code. Just don't expect much help on circuit design, it sucks at that.
This is my debut post, other than my introduction, which is rather brief. If it bothers you, yes, most of my posts are lengthy. I have a well-earned reputation for being rather wordy, even verbose, but I believe every word I write is necessary, even when I repeat repeat words. If you don't like it you can complain and I might make an adjustment -- or I might not. I am rather set in my ways. I hope you enjoyed the post.