Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Increment / Decrement circuit

Status
Not open for further replies.

faisal78

Member level 3
Joined
Aug 27, 2004
Messages
62
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
592
Hello,
I am trying to figure out if there is a way for me to design a increment/decrement circuit.
What this basically does is, output either a HIGH DC or a HIGH Pulse during increment or a analog once it exceeds a predetermine voltage threshold.

Only way I can think off is by using a DAC which adjust the "threshold" dynamically to the input of the comparators.
However, this seems tedious and not fool proof.

Any ideas.
 

I don't understand what you mean by "output either a HIGH DC or a HIGH Pulse during increment or a analog once it exceeds a predetermine voltage threshold". Can you clarify what you are trying to do?
 

I don't understand what you mean by "output either a HIGH DC or a HIGH Pulse during increment or a analog once it exceeds a predetermine voltage threshold". Can you clarify what you are trying to do?

HIGH DC = constant VCC rail on the output of the comparator.
HIGH Pulse = a short pulse output from the comparator.
 

You're still talking in riddles. Apparently you see the comparator somehow related to an "increment/decrement circuit"?
 

So I am trying to find a way of measuring battery voltage (charging/discharging) without the use of a ADC.
So let's take for example a NiMH battery (2x) which the slope would be from ~2v - 3v linear for both charging and discharging.
So instead of using a ADC (which I don't have in my system), I'd like to setup a comparator based "interrupt/GPIO" which indicates is the battery voltage is in the discharge or charging cycle.

So, lets start with the battery voltage being at 2.8v.
I'd setup the thresholds for my comparators to be 2.9v (inc.) and 2.7 (dec.) respectively.
So, when the battery voltage exceeds this thresholds, it will "interrupt" the MCU and process accordingly, let's say it exceed the lower threshold of 2.69v, which triggers the decrement GPIO.
Now, i'd have to setup a new threshold, of 2.6v (dec.) and 2.7v (inc.) for a new set of data.

Hope this helps explain my situation
 

What about a sample-and-hold based circuit e.g. this (sorry about sloppy diagram):



Closing the switch charges/discharges C1 to the current battery voltage, U2/U3 provide a +/- 0.1V offset reference (tie the Voffset terminals to a +0.1V or whatever reference), U4/U5 are your comparators.

The idea, which isn't actually shown above, is that when you hit one of the voltage limits, you then close the switch to resample the current battery voltage and set the new offsets. You have to hold the switch closed long enough for C1 to charge (I think around 20-50µs or so for the R1+C1 shown above). You have a couple of options, you could get an analog switch and control it with your microcontroller (e.g. when you see a signal from U4/U5 then send out a pulse to the switch to reset), or you could use an analog switch with some circuitry from the outputs to autoreset without involving the microcontroller (e.g. trigger a pulse that holds the switch closed for a few microseconds), or whatever.

Does that help at all? Sorry it's incomplete.

Other options, depending on the charge/discharge rate and pattern, could be: a differentiator to detect battery voltage slope, perhaps outputting through an rc filter into a set of comparators for some basic hysteresis, or perhaps just a simple ultra-low cutoff highpass filter to the battery output that gives you a rough indicator of slope direction, etc.
 
Last edited:

What are you using for a power supply?
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top