Using seven segment displays with LED bar display drivers

Discussion in 'General Electronics Chat' started by fasm, Nov 12, 2015.

  1. fasm

    Thread Starter New Member

    Nov 12, 2015
    8
    0
    Hello everyone,

    I am doing a project for school where I am making a distance measure using an ultrasonic distance sensor, atmega328 with ardunio and LM3914's. For the project I am not allowed to use all programmable circuitry, so I had to come up with alternatives. What I thought of was to use the arduino to find the distance, and output three different pwm signals for each digit of the distance, then run that through a low pass filter then onto a LM3914 so the LM3914 would allow a unique LED to turn on for each number. For example if the distance is 123 cm, LED 1 then 2 then 3 would turn on on three separate bar displays to give you the distance.

    I have this working well, however I would now like to display the distance using seven segment displays for ease of use. At first I thought it may be as simple as connecting each output the corresponding segments on the display, but once I tried this all the segments would light up for each number as they were all connected. I have done a fair amount of research and can't find a way to do this without using hundreds of diodes. I have spent quite a lot of time on this project so far so ideally don't want to change the circuit I currently have.

    I will upload the schematic of the circuit, just note that as I am new to the software I used I don't know how to add my own IC's, so the picaxe chip represents the LM3914. Also, the LM3914 chip works with LED's of common anode thats why I have put common anode seven seg displays on the schematic.

    Screen Shot 2015-11-11 at 09.20.15.png

    Any help would be greatly appreciated.
     
  2. crutschow

    Expert

    Mar 14, 2008
    13,009
    3,233
    You could use a CD40147 priority encoder to convert the segment signals to BCD and the use a CD4511 BCD to 7-segment driver for the display.
    Note that you will need to add a CD4049 inverter at each segment signal to get the proper polarity signal for the CD40147.
     
  3. fasm

    Thread Starter New Member

    Nov 12, 2015
    8
    0
    That seems like it work thank you! are you sure that the inverters will work from the LM3914?
     
  4. crutschow

    Expert

    Mar 14, 2008
    13,009
    3,233
    That is a valid concern since the output is not a logic level.
    You may have to use a PNP transistor at each LM3914 output along side the LEDs to get the logic inversion.
     
  5. fasm

    Thread Starter New Member

    Nov 12, 2015
    8
    0
    Alright thank you, i'll do some testing.
     
  6. Dodgydave

    Distinguished Member

    Jun 22, 2012
    4,986
    745
    If your driving seven seg displays, you will need to either multiplex the Anodes, or use a Cd4511 driver, the problem with the cd4511 its for common Cathode displays,.

    For multiplexing you write the digits one at a time, and put the respective Anode of that segment on, then put the next digit on, turn the other Anodes off, and so on, but with a small delay say 20msec, so that each segment will be lit for that time.
     
  7. crutschow

    Expert

    Mar 14, 2008
    13,009
    3,233
    Could you have the Arduino output a BCD number for the display?
     
  8. fasm

    Thread Starter New Member

    Nov 12, 2015
    8
    0
    I could, but the thing is it's hard because as I said I can't make the system revolve around the Arduino, I have to have a fair amount of other devices making up the circuit.
     
Loading...