Circuit Question

Status
Not open for further replies.

TecHNooB

Diamond Member
Sep 10, 2005
7,458
1
76
Okay, so I decided to build an A/D converter cause I saw it in another thread and thought it would be fun to make one out of discrete parts. So I started drawing a schematic for a 2-bit A/D converter. I basically laid it out like this

4 States:
----L1 L0
S1 0 0
S2 0 1
S3 1 0
S4 1 1

If my range was 5V, my step size would be 5/4V. My issue is this. What's an effective way to get the LED0 to toggle during state 3? (without logic gates)

Perhaps I am doing this all wrong lol..

Question: Can I build this entirely with op amps and diodes? Cuz that's what I'm trying to do :p Although, turning off LEDs requires some diode magic which might cause a small fire.
 

esun

Platinum Member
Nov 12, 2001
2,214
0
0
First, let me say that you will definitely need resistors. Other than that, though, you should be able to do it just with op-amps and diodes.

As for the ADC, I think the easiest method would be to build a flash ADC (which will give you a one-hot encoded output) and then use digital logic (you can use diodes or comparators to implement this logic) to convert the output to binary, then feed that to your diodes. Any reason why you don't want to use logic to toggle LED0?
 

TecHNooB

Diamond Member
Sep 10, 2005
7,458
1
76
I was hoping there was a good way to do this without an encoder. Keep it more analog, so to speak :p
 

Mark R

Diamond Member
Oct 9, 1999
8,513
16
81
Well, you're wanting to build a mixed signal device - you're going to need both analog and digital circuits. :p

How you build the digital component is up to you (you can build logic gates out of op-amps and diodes), but personally I'd use off-the-shelf logic gates.
 

blahblah99

Platinum Member
Oct 10, 2000
2,689
0
0
The LEDs are binary representation of the A/D count. You can connect the output of a comparator with a pullup resistor and connect the LED to the comparator and ground. Pick a resistance value so that it gives about 5-10mA of current through the LED when the output of the comparator is in high impedance state. If you have 5V supply and an LED with a Vf of 2V, you can use a 300 to 450 ohm resistor to start out and adjust for desired brightness.
 

CTho9305

Elite Member
Jul 26, 2000
9,214
1
81
Originally posted by: bobsmith1492
It's so simple you'll laugh. :)

You're thinking digitally in the OP (state machine).

Try this circuit!

That circuit doesn't work. The possible patterns you can output with that are 0000, 0001, 0011, 0111, and 1111. The OP wanted 2-bit output: 00, 01, 10, 11.
 

Born2bwire

Diamond Member
Oct 28, 2005
9,840
6
71
Originally posted by: CTho9305
Originally posted by: bobsmith1492
It's so simple you'll laugh. :)

You're thinking digitally in the OP (state machine).

Try this circuit!

That circuit doesn't work. The possible patterns you can output with that are 0000, 0001, 0011, 0111, and 1111. The OP wanted 2-bit output: 00, 01, 10, 11.

I'm sure the OP can easily extrapolate the 2-bit version...
 

TecHNooB

Diamond Member
Sep 10, 2005
7,458
1
76
Originally posted by: Born2bwire
Originally posted by: CTho9305
Originally posted by: bobsmith1492
It's so simple you'll laugh. :)

You're thinking digitally in the OP (state machine).

Try this circuit!

That circuit doesn't work. The possible patterns you can output with that are 0000, 0001, 0011, 0111, and 1111. The OP wanted 2-bit output: 00, 01, 10, 11.

I'm sure the OP can easily extrapolate the 2-bit version...

He's saying it doesn't count up in binary. I'd also be surprised if it does, but I'll try it :p
 

Born2bwire

Diamond Member
Oct 28, 2005
9,840
6
71
Originally posted by: TecHNooB
Originally posted by: Born2bwire
Originally posted by: CTho9305
Originally posted by: bobsmith1492
It's so simple you'll laugh. :)

You're thinking digitally in the OP (state machine).

Try this circuit!

That circuit doesn't work. The possible patterns you can output with that are 0000, 0001, 0011, 0111, and 1111. The OP wanted 2-bit output: 00, 01, 10, 11.

I'm sure the OP can easily extrapolate the 2-bit version...

He's saying it doesn't count up in binary. I'd also be surprised if it does, but I'll try it :p

Look, easy way is to cut it down to three comparators and use them as select bits for two muxes that will switch to the desired output.
 

TuxDave

Lifer
Oct 8, 2002
10,571
3
71
Originally posted by: Born2bwire
Originally posted by: TecHNooB
Originally posted by: Born2bwire
Originally posted by: CTho9305
Originally posted by: bobsmith1492
It's so simple you'll laugh. :)

You're thinking digitally in the OP (state machine).

Try this circuit!

That circuit doesn't work. The possible patterns you can output with that are 0000, 0001, 0011, 0111, and 1111. The OP wanted 2-bit output: 00, 01, 10, 11.

I'm sure the OP can easily extrapolate the 2-bit version...

He's saying it doesn't count up in binary. I'd also be surprised if it does, but I'll try it :p

Look, easy way is to cut it down to three comparators and use them as select bits for two muxes that will switch to the desired output.

But the select bits aren't mutex. :p
 

bobsmith1492

Diamond Member
Feb 21, 2004
3,875
3
81
Radio Shack's 300-in-one electronics kit had a really slick circuit that converted a CDS cell input to display on a 7-segment LED display (0-9). I managed to get it to work at some point in my past but the display flickered a bit... there were some ~7-8 ICs and lots of wires on that thing. That was grade school... hm, this thread makes me want to dig that out of my parents' basement and figure out how it actually worked!
 

bobsmith1492

Diamond Member
Feb 21, 2004
3,875
3
81
Originally posted by: Born2bwire
Originally posted by: TecHNooB
Originally posted by: Born2bwire
Originally posted by: CTho9305
Originally posted by: bobsmith1492
It's so simple you'll laugh. :)

You're thinking digitally in the OP (state machine).

Try this circuit!

That circuit doesn't work. The possible patterns you can output with that are 0000, 0001, 0011, 0111, and 1111. The OP wanted 2-bit output: 00, 01, 10, 11.

I'm sure the OP can easily extrapolate the 2-bit version...

He's saying it doesn't count up in binary. I'd also be surprised if it does, but I'll try it :p

Look, easy way is to cut it down to three comparators and use them as select bits for two muxes that will switch to the desired output.


To go fully analog, try a "diode ROM" to run a 7-segment display.

ED: You might have to rework the ROM so that higher-value outputs override lower ones... the one I linked probably only works with a single input active. Or, have each output drive a transistor to override the outputs of the lower-value signals.

Many possibilities.
 
Status
Not open for further replies.