Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

7 segment display circuit Please help me understand this.

Status
Not open for further replies.

68rustang

New Member
Hello everybody,

I came across this forum while doing some digging trying to figure out a little project of mine. In a nutshell what I am trying to do is build a circuit that based on a measured resistance will display a value on a 7 segment LED display.

After coming up with the idea I searched the web and found a page describing EXACTLY what I wanted to do:

**broken link removed**

link to webpage:
**broken link removed**

I am a mechanical engineer by education. Other than playing around with some old Heath kits and RC cars when I was young I have limited knowledge in anything more than basic voltage and resistance and current stuff.

I am hoping someone on here can help me understand exactly what is going on inside these different IC's so I can understand the circuit before I try to build it. I am also looking for some direction on possible replacements for the sn74ls48 BCD to 7 segement decoder driver, it is my understanding that it is obsolete :( I have a 0801 a/d converter.

What I am able to decipher so far is this:

I have 7 resistance values in the gear position sensor (GPS). Based on the R value that is read in from the GPS, the A/D converter (ADC0801) generates a binary number which is fed to the BCD to 7 segment decoder/driver (sn74ls48). This in turn lights up the corresponding segments of my display to tell me what gear the motorcycle is in. Easy right?

My understanding of the circuit goes to about where we are reading the R value from the GPS. The rest could be majic for all i know :)

Seriously, what I would like to understand is this:

what is the a/d converter doing to generate a binary number from an R value? Are there tables somewhere that say this R = 1011?

how is the BCD to 7 segment display taking this binary and lighting up the proper segments? (n, 1, 2, 3, 4, 5, 6 diplayed digits in my case)

I have emailed to author of the page in the hopes they can clarify what is going on. I have not received a response yet though. Any help is greatly appreciated.
 

Attachments

  • gps-circuit.gif
    gps-circuit.gif
    182.8 KB · Views: 1,160
Re: 7 segment display circuit Please help me understand this

68rustang said:
Hello everybody,

I came across this forum while doing some digging trying to figure out a little project of mine. In a nutshell what I am trying to do is build a circuit that based on a measured resistance will display a value on a 7 segment LED display.

After coming up with the idea I searched the web and found a page describing EXACTLY what I wanted to do:

**broken link removed**

link to webpage:
**broken link removed**



I am a mechanical engineer by education. Other than playing around with some old Heath kits and RC cars when I was young I have limited knowledge in anything more than basic voltage and resistance and current stuff.

I am hoping someone on here can help me understand exactly what is going on inside these different IC's so I can understand the circuit before I try to build it. I am also looking for some direction on possible replacements for the sn74ls48 BCD to 7 segement decoder driver, it is my understanding that it is obsolete :( I have a 0801 a/d converter.

What I am able to decipher so far is this:

I have 7 resistance values in the gear position sensor (GPS). Based on the R value that is read in from the GPS, the A/D converter (ADC0801) generates a binary number which is fed to the BCD to 7 segment decoder/driver (sn74ls48). This in turn lights up the corresponding segments of my display to tell me what gear the motorcycle is in. Easy right?

My understanding of the circuit goes to about where we are reading the R value from the GPS. The rest could be majic for all i know :)

Seriously, what I would like to understand is this:

what is the a/d converter doing to generate a binary number from an R value? Are there tables somewhere that say this R = 1011?

how is the BCD to 7 segment display taking this binary and lighting up the proper segments? (n, 1, 2, 3, 4, 5, 6 diplayed digits in my case)

I have emailed to author of the page in the hopes they can clarify what is going on. I have not received a response yet though. Any help is greatly appreciated.

Well, it looks like the A/D has a voltage divider formed on its input (V+) So, when the gear box changes R value, the divider changes the voltage presented on the V+ input to the A/D.

The voltage divider is formed from Vcc(or Vref) through R (in schematic) with the R from the gearbox.

If the A/D is free-running, it will output a digital code that is presumably wired up to the LED's drivers properly. So as gearbox R changes, A/D digital code changes. The way it changes is predictable and one can wire up the outputs to the LED drivers.
 
Optikon,

Thank you for the reply. I think I understand what you are saying.

"Well, it looks like the A/D has a voltage divider formed on its input (V+) So, when the gear box changes R value, the divider changes the voltage presented on the V+ input to the A/D.

The voltage divider is formed from Vcc(or Vref) through R (in schematic) with the R from the gearbox."


I follow you there, this is true.

"If the A/D is free-running, it will output a digital code that is presumably wired up to the LED's drivers properly. So as gearbox R changes, A/D digital code changes. The way it changes is predictable and one can wire up the outputs to the LED drivers. "

This is what I need help with? :?

The bike has a gear position sensor which will read 7 different values depending which gear it is in.

For my bike in particular, a Suzuki, the readings you get from the GPS sensor should be as follows:

1st gear = 1.782v
2nd gear = 2.242v
3rd gear = 2.960v
4th gear = 3.630v
5th gear = 4.310v
6th gear = 4.660v
Neutral = 5.000v

so yes when you change gears you get a different voltage reading.

the website I downloaded the schematic from says I can feed these to my a/d converter then to my bcd to 7 segment decoder/driver and I should get my display to read n-6 :? this is where I get confused.

I can hook things up like the schematic and see what happens but I like to understand what i am doing before I steam ahead. Also I need to find a suitable substitute for the SN74ls48 chip that the schematic calls for because I cannot find them ANYWHERE.

can you guys help me understand what is going on between the GPS and the display?

I have tried to read the data sheets for the different chips and quickly get a headache from not knowing what I am looking at. I realize this is probably pretty basic stuff for many of you and I appreciate any effort to bring me up too speed.

PS - please speak slowly and use small words, afterall I am an ME :wink:
 
I recommend that yhou use a common anode display because the 74LS48 does not have the drive capability to light the LEDs. The 74LS47 has open collector output and can sink 20 mA which will make a bright light. Also, the '47 is available.

The decoder is just a bunch of gates that steer the 1s and 0s of the binary number to the proper segments.

The A/D converter has a bunch of level detectors that increment the binary number as the voltage increases. An 8 bit converter will have 128 numbers, but since your circuit is only looking at the bottom 3 bits, the maximum number is 7. The binary number will be proportional to the voltage, but not necessarily equal to it. Hopefully, the designer allowed enough voltage between steps that two gears won't display the same number, or skip a number.
 
thanks for the info Russik. I might be starting to understand this :)

I recommend that you use a common anode display because the 74LS48 does not have the drive capability to light the LEDs. The 74LS47 has open collector output and can sink 20 mA which will make a bright light. Also, the '47 is available.

I have a common cathode and a common anode display that I could use. I have found the '47 locally and was wondering if this would work, thank you.

The decoder is just a bunch of gates that steer the 1s and 0s of the binary number to the proper segments.

how does it determine which segments to light? EX: How does it tell it to display an "n" instead of a "6"? or a "0" instead of "1"? well I guess what I mean is how does it determine if it should display a "n", "1", or "x"?

The A/D converter has a bunch of level detectors that increment the binary number as the voltage increases.

it increments up to the next number whenever the voltage increases? And back down whenever it decreases? Doesn't matter what the actual voltage is?

An 8 bit converter will have 128 numbers, but since your circuit is only looking at the bottom 3 bits, the maximum number is 7.

my range of numbers is 0-6? what about letters?

The binary number will be proportional to the voltage, but not necessarily equal to it.

I have no control over what the binary number is? does it matter?

Hopefully, the designer allowed enough voltage between steps that two gears won't display the same number, or skip a number.

How is this controlled?
 
Quote:
Hopefully, the designer allowed enough voltage between steps that two gears won't display the same number, or skip a number.

I mean, the A-D converter with these voltage steps never give clear numbers from 0 to 6. I recommend to use comparators, and diodes for 7segment driving.
 
Perhaps you can understand the operation of the 74LS47 from the data sheet which has the logic diagram: https://www.mouser.com/index.cfm?&h...47*&terms=74ls47&Dk=1&D=*74ls47*&N=0&crc=true

"it increments up to the next number whenever the voltage increases? And back down whenever it decreases? Doesn't matter what the actual voltage is? "
The voltage does matter. The binary number n=K*V where K is the constant of proportionality and V is the voltage.
 
i am using max6951 IC which uses spi from TEXAS DSP TMS320F2812.
I wish to use 7 segment display throug SPI.
Can anybody send the application notes as well as circuit diagrams of the same plz send to my mail.
Thanks in advance
rameshkumar143@gmail.com
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top