Shop OBEX P1 Docs P2 Docs Learn Events
74HC595 interfacing and use question. — Parallax Forums

74HC595 interfacing and use question.

I've never played with a '595 before however I have some coming tomorrow. I have a project where I need to sequentially turn on 1 of 40 IR led's. I'm thinking I can probably daisy chain 5 '595's to get the 40. 
The led needs to operate at 38KHz. I will be using a Propeller to create the 38Khz pulse and control the '595's so my question is how do you modulate the '595's so that each led output will be 38KHz? I know that I need to clock the '595 clock pins to switch sequentially to each output and somewhat understand that but to get each output to output a 38KHz pulse do I send that frequency to the OE pins (all tied together) ? 
Sorry for the wording but hope you understand what I'm trying to ask here. Thanks in advance.
Don

Comments

  • Duane DegnDuane Degn Posts: 10,588
    edited 2015-07-05 23:04
    I'm pretty sure you can modulate the LEDs with the enable pins. I think you'd be hard pressed to turn the LEDs on and off at 28KHz by clocking out ones and zeros.
    JonnyMac wrote a Nuts & Volts article about using '595 chips with the Propeller not long ago. '595 chips are about the easiest chips to use and I think there are lots of examples of how to use them on the forum.
    I used high power '595 chips with my RGB LED array project. I could get 5-bits of resolution for each color by PWM the '595 chips. The first set of PCBs I made didn't bring out the enable pins. It later occurred to me I could maintain the color resolution if I pulsed the enable pins. While I plan to adjust the brightness level by pulsing the enable pin, I haven't tried this yet. I'm pretty sure it will work.
    I don't see why you couldn't modulate the IR LEDs with the enable pin.
    If you need help finding other examples of using the '595 let us know.
  • jmgjmg Posts: 15,148
    edited 2015-07-05 23:03
    I know that I need to clock the '595 clock pins to switch sequentially to each output and somewhat understand that but to get each output to output a 38KHz pulse do I send that frequency to the OE pins (all tied together) ?


    Yes, for IR carrier modulation, you would common OE and that has 38KHz.
    You need to shift in new data patterns fairly quickly  ~1.5MHz  updates 40 in one carrier cycle, ~ 3MHz updates 40 in half a cycle.
    To allow a slower shift, you could make use of the transfer register (all tied together)

    If you want to whack the IR LEDs harder,  there are higher current C595's
  • Don MDon M Posts: 1,647
    edited 2015-07-06 00:32
    There wouldn't be any data patterns. Just a 38KHz carrier long enough to turn on the receiver then on to the next IR led.

    Thanks guys.
  • JonnyMacJonnyMac Posts: 8,926
    edited 2015-07-06 01:42
    What you want to do is easier than you're making it. Connect all of the cathodes together and to a pin that is setup for 38kHz generation (use a counter). Making that pin high will turn off the modulation without having to fool with the counter (remember that the counter output and pin outputs are OR'd together, and a high on the cathode of an LED will shut it off). After that you use the '595s to set one of the anodes high and then take the modulation pin back low so that the counter output can modulate the selected LED.
    Easy-peasy.
  • IR LEDs, to be effective, probably require more current than a plain-Jane 'HC595 can provide. You might take a look at the functionally-equivalent but more robust TPIC6C595:
    http://www.ti.com/product/tpic6c595

    -Phil
  • kwinnkwinn Posts: 8,697
    If you only need one of the forty leds active at any time it can be even simpler and only needs two 595's. Connect the leds as 5 rows of 8 columns (or vice-versa) and make 1 of the row bits high and one of the column bits low to select the led. Use the enable pin of one 595 for the 38KHz, and the enable pin of the other for the data.
  • If this is for a light curtain you will need to drive the LEDs hard. The TPICs mentioned may be one solution and the idea is to pulse them at high peak currents at low duty cycles, which is what you will get when you mux and modulate them.

  • The higher current TPIC6C595 chips work well but make sure you take a good look at the data sheet for it.  Those use a different pinout than the standard 74HC595 chips.  Since the TI chips have an odd pinout you may want to consider using the normal 74HC595 with a ULN2803A Darlington Array between that and the LED's.
  • Some of the TPIC6 chips only sink current. I think the A and B versions are sink only. Make sure you know what you're getting and as RobotWrokshop mentioned, the pinouts are different than the normal '595 chips.
Sign In or Register to comment.