2 digit Up Down Counter

Discussion in 'The Projects Forum' started by Christian Tadeo, Sep 10, 2013.

  1. Christian Tadeo

    Thread Starter New Member

    Jul 4, 2013
    28
    0
    I am creating a 2 digit Up Down Counter using CD40110BE IC and UDN2981 as driver to 5 LEDs per segment. But now I am stocked with the preliminary connections. Can you suggest some Pulse Generator Circuits to lighten the LEDs? Really need your help. Thanks
     
  2. wayneh

    Expert

    Sep 9, 2010
    12,090
    3,027
    I don't understand your question. Your counter and display are working with manual switching, and now you would like to add a clock to provide the pulses?

    If that's right, you need a 555 timer circuit called the astable. There are tons of references and websites, but you can start here.
     
  3. elec_mech

    Senior Member

    Nov 12, 2008
    1,513
    193
    Wayneh, the OP is starting his own thread from another one: http://forum.allaboutcircuits.com/showthread.php?t=55545&page=2.

    Christian, sorry, just got back from a business trip and haven't had much time to look over your circuit. I'm also a bit confused by your statement. What do you mean by lighten the LEDs? Do you mean you need them brighter or dimmer or you want to be able to use something like pulse width modulation (PWM) to vary the brightness?

    I'll try to get back to you tomorrow regarding your circuit from the other thread unless someone beats me. :)
     
    wayneh likes this.
  4. Christian Tadeo

    Thread Starter New Member

    Jul 4, 2013
    28
    0
    elec_mech

    I tested your circuit (Rev 5) and it is not working at all. I don't know what is wrong in the circuit. I used UDN2981 as LED driver instead of UDN2982, for I read it is the same. I already reassembled the whole circuit and again for the second time it is not working when I connected it to 12V.

    I've done some experiment like changing the LED segment connection from series to parallel and connected it directly to Ground and the LED works (turn on). In my assumption there is not enough voltage flowing in the LEDs although the pin 9 of UDN2981 is connected to 12V.

    I do not want to get the LEDs lighter or dimmer but the problem is that LEDs are not working or maybe the circuit itself.
     
    Last edited by a moderator: Sep 29, 2013
  5. elec_mech

    Senior Member

    Nov 12, 2008
    1,513
    193
    Yes, they're interchangeable.

    Okay, first it sounds like there is a problem with the flashing circuit, so for now, tie the LED cathodes (through the resistors) directly to GND.

    Verify GND is connected to pin 10 of both UDN2981 ICs.



    Let's start with this:
    1. Disconnect the LEDs from the UDN2981 outputs.
    2. Turn on the circuit and press the reset button.
    3. Connect the negative probe of a volt meter set to 20V or more to GND.
    4. Connect the positive probe to pin 9 of one of the UDN2981 ICs and record the voltage.
    5. Connect the positive probe of the volt meter to pin 12 of one of the UDN2981 ICs and record the voltage.
    6. Repeat step 5 for pins 13-18.
    7. Repeat steps 4-6 for the second UDN2981 IC.
    8. Post results.
    Pin 9 should show +12VDC. Pin 17 should show close to 0V. The remaining pins should be somewhere between 10-11V.

    You can also try putting four LEDs in series instead of five and see if this changes anything. If not, try three LEDs in series. Assuming one of these works, take a voltage reading between the LEDs and between the resistor. Put the negative probe on the last cathode of the LED string and put the positive probe on the first anode of the LED string. For the resistor, connect the negative probe to GND and the positive probe to the connection between the last LED and the resistor. Post the readings.

    Your LEDs may have a higher forward voltage drop than the ones I used which may mean using less LEDs in series, decreasing the resistor value, or increasing the power supply voltage.
     
  6. Christian Tadeo

    Thread Starter New Member

    Jul 4, 2013
    28
    0
    Ok, I will redo again the circuit and do your instructions. I will post the readings when I am done. Thank you!:)
     
  7. Christian Tadeo

    Thread Starter New Member

    Jul 4, 2013
    28
    0
    Yes you are right, i tested the circuit and made the readings, pin 12-18 both have near 12V readings except for pin 17 which is 0V. Pin 9 is also 12V. But when I connect the LEDs to the output of UDN2981, still LEDs doesn't work. I am still confuse why it doesn't lighten up the LEDs if there is voltage coming out to it.


    I will try this one, and report later. If this doesn't make all work, I really don't know how to troubleshoot the circuit. My deadline for this project is by the end of September so I really need someone to help me out.
     
  8. elec_mech

    Senior Member

    Nov 12, 2008
    1,513
    193
    Hmm, in re-reading your posts, I see I made an unconscious assumption. LEDs are polarity-dependent meaning if they are put in backwards they won't work. The picture you posted was a bit blurry and I couldn't see how you've wired your LEDs.

    If even one LED is backwards, none will light up. Since it appears the UDN2981 is working properly, the culprit now is the LEDs.

    Note the shorter lead (closest to the straight-edge of the base looking from the bottom) is the cathode (-). The longer lead farthest from the straight-edge is the anode (+).

    I've thrown together a quick drawing showing how an LED string should be wired.
     
  9. Christian Tadeo

    Thread Starter New Member

    Jul 4, 2013
    28
    0
    When I change the polarity of the LEDs (positives are connected to UDN2981 and vice versa) in the circuit, it seems that the LEDs are not working still. When I checked the Voltage across the LEDs when connected to a 12V source, it reads 0-6V which is why it can't light up all the LEDs in the circuit. It seems that UDN2981 outputs are releasing 12V (which is true if working) but before the 2N2907 transistor it reads 0-6V.

    After the readings, I assumed that it could be the flashing circuit that could be wrong so I cut it out from the circuit as you can see in the image [​IMG]

    Now, resistors of the LEDs are connected directly to GND and the pin 10 of CD4093 is left blank. This works all well for the LEDs and is lighting up so bright when connected to 12V.

    But now here is the problem, since the LEDs are working now, the switches for RST, CntUP, CntDWN and Toggle DISPLAY are not working.

    I reviewed your previous post seen in the image [​IMG]

    Where should I connect pin 3, 4, 11, 10 of the CD4093 IC?
     
  10. elec_mech

    Senior Member

    Nov 12, 2008
    1,513
    193
    I'm a bit confused by your statement. First, you can leave everything as is, just remove the 2N2907 and connect the resistors directly to GND.

    It sounds like you did this and the LEDs all light up now while connected to the UDN2981 - is this correct? Do all five LEDs in each segment work?

    Where are you measuring 0-6V?

    The output pins for the CD4093 should be connected as shown in the original schematic.

    Pictures are worth a thousand words. If you post several good, CLEAR pictures of your circuit from a few different angles, we'll be better able to spot trouble areas.
     
  11. Christian Tadeo

    Thread Starter New Member

    Jul 4, 2013
    28
    0
    you can see in my previous image post (the one with the red box) that it is the flashing circuit which i removed. Now the resistors of the LEDs are directly connected to the GND and pin 10 of CD4093 are left blank. The 5 LEDs per segment are all working now for all the outputs of UDN2981 except for pin 17 which is 0V output. But when i try to toggle the switches, it does'nt work with the LEDs and still reads '00' not counting down or up.
    Before I disconnect the flashing circuit, LEDs are not working. I connected the positive probe of the volt meter to one of the outputs of the UDN2981 and the negative probe to the emitter of 2907 and the output is 0V-3V.
    Later I will post the image of the actual project

    I will later post the some photos as I am busy now capturing few angles of the circuit so that you can understand what is wrong or right. I also thought that i could post a video but it may be hard to post here i guess so please be patient while I am checking around the pictures. Tomorrow for sure I will upload here the photos.

    Keep in touch elec_mech. Thank You and God bless :)
     
    Last edited by a moderator: Sep 29, 2013
  12. Christian Tadeo

    Thread Starter New Member

    Jul 4, 2013
    28
    0
    Hello elec_mech

    I've managed to took some pictures of the actual circuit as well as the schematic diagram of each part. Please do have time to analyze and will wait for your response.

    Here is the Schematic Diagram of the Actual circuit assembled in the PCB.
    View attachment Schematic Diagram.pdf

    For actual views of each ICs. Here are the pictures: (the image has been copied from the url due to the limited file size of attachments here)

    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
    [​IMG]
     
  13. Christian Tadeo

    Thread Starter New Member

    Jul 4, 2013
    28
    0
  14. elec_mech

    Senior Member

    Nov 12, 2008
    1,513
    193
    In the last picture shown (bottom of last post), it appears you are using both power buses on the top of the photo (GND). However, you've only bridged the topmost bus strip, so you either need to bridge the bottom strip (second from top) or move all your GND connections on the right half of the circuit to the topmost bus strip.

    The 555 circuits appear okay, although there is no connection between pin 4 and the CD4093.

    The CD40110 and UDN2981 appear okay, but again, there doesn't appear to be any connection to the CD4093.

    I can't determine if you've connected the CD4093 correctly or not - there are too many wires at the front of the picture blocking the view to the connections. The connections also appear a bit odd, especially at the edge of the breadboard.

    I didn't see any resistors for the LED strips. I also notice you're using 4 LEDs per strip instead of 5. Did five not work but four did?
     
  15. Christian Tadeo

    Thread Starter New Member

    Jul 4, 2013
    28
    0
    elec_mech

    please download the schematic diagram file in my recent post and review it, you will see all the connections, I know its hard to look around the circuit base on my pictures but in the diagram i uploaded I connected the actual connection of the circuit I made in the breadboard. All connections in the picture are the same as the diagram I uploaded. But later I will recheck my connections of CD4093 and will give a better picture. My deadline for this project is by the end of September so please do help me with this. I appreciated all your efforts and help thank you very much!:)
     
  16. elec_mech

    Senior Member

    Nov 12, 2008
    1,513
    193
    Ah, that's what I forgot to mention - I tried, but the file won't open. Can you attempt to repost it and try opening it to verify it works?
     
  17. Christian Tadeo

    Thread Starter New Member

    Jul 4, 2013
    28
    0
    View attachment Schematic Diagram.pdf
    try this new diagram and check this one.

    Good news, all is working so well now for testing. The LEDs are working when clicking on the switches. The problem is that the position of the LEDs are all line up an rows so I am not quite sure if that will count down or count up from 0. I will start to fabricate now the circuit for the main project.
     
    Last edited by a moderator: Sep 29, 2013
  18. elec_mech

    Senior Member

    Nov 12, 2008
    1,513
    193
    Look at the first page of your attachment showing the layout for the UDN2981 and CD40110. You are using both power bus strips on the far right as grounds, BUT you've only connected the right-most strip between the top and bottom halves. The ground connections from the bottom CD40110 are floating. I suggest moving them to the right-most strip.

    Glad to hear things appear to be working. The LED strips must be arranged to form a 7-segment display. Sorry, somehow didn't make it into the final schematic. Attached is an image showing how each strip, labeled a thru g, should be arranged.
     
  19. Christian Tadeo

    Thread Starter New Member

    Jul 4, 2013
    28
    0
    Thank you, i now rearrange the circuit and replace the GND for 40110. Tomorrow I will test again the whole circuit with the LEDs arrange in digits. I will post some clear photos of it. Keep in touch

    elec_mech

    Sorry for the late update, internet was down for a week but now its ok. I already arrange the LEDs and now I see the problem. All LEDs are working fine and showing number 00 when you turned on the circuit. I exclude the 555 flashing circuit and the 4013 circuit from the main circuit. I am using now 5 LEDs with the resistor and looks fine but the problem is the switch. You recommend to use N.O. switches which I am using now but the switches are not working with the circuit. When you press and hold Count Up switch, the LEDs will slowly counting up, same as in Count Down switch. But toggling down/up the switch are not working. Another problem is that Segment G(1st and 2nd Digits) in both 2981 ICs doesn't have any output, thus this segment is not lighting up although the other segment are counting down/up. What do you think is the problem here?

    elec_mech

    sorry for the late updates here, really had a bad week because of the weather. I am still puzzled with the circuit not doing with the switches and now showing no output from both segment g of the 2981 ICs.
     
    Last edited by a moderator: Sep 29, 2013
  20. elec_mech

    Senior Member

    Nov 12, 2008
    1,513
    193
    I'm a little confused by these two statements:

    and

    So by this do you mean if you press and hold either the up or down switches, the display goes up or down slowly and if you simply press and release either switch quickly, the display does not change?

    So, for example, when 3 should be displayed, you see a large backwards "C"?

    Use a volt meter and put the black probe to GND and put the red probe on pin 7 of the UDN2981 when the display should show 2, 3, 4, 5, 6, 8, or 9. What is the voltage? Put the red probe on pin 12 of the UDN2981. What is the voltage? Repeat for the other UDN2981.

    Double check the following connections: all LEDs in g segment are connected correctly, LEDs to resistor, LEDs/resistor to GND, LEDs to UDN2981, UDN2981 to CD40110.
     
Loading...