Shop OBEX P1 Docs P2 Docs Learn Events
Serial to parallele freezing results component... — Parallax Forums

Serial to parallele freezing results component...

jmspaggijmspaggi Posts: 629
edited 2011-09-21 18:30 in General Discussion
Ok, sorry about this horrible title.

Let me try to explain.

I have a need on both my propeler and my Javelin to convert a seriel output to a parallele one to control many relays. That's fine, and I will do that with a 74HC595.

So when I send "1011011" I have few relays turning on, and few turning off.

My concerne is that when I update the ouput to something like "1010011", while it's pushing it out, all the relays will turn on and off until they got the final state.

So what I'm looking for it's something to put betweem the 74HC595 and the ULN2803 which will copy his input to his output only when I will tell it. Or, even better, which will copy the input to the output if it changed since more than few milliseconds. That will allow me to push the new configuration quickly until it can see it has changed, and so only the right relay will switch.

This is to operate lights and heaters for an aquarium, so it don't need to go fast.

Thanks in advance for your help.

JM

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2011-09-21 12:24
    The 74HC595 has two registers in it, a serial shift register and a parallel output register. When you shift the serial data into the serial shift register (or several of them if you have daisy-chained 74HC595s), the data does not appear on the outputs. The update process is effectively invisible to the outside world. When you're done shifting the data into the serial shift register, then you clock the output register using the LOAD clock line (STCP line here). This copies the bits from the serial shift register to the output register all at once.

    You don't need anything between the 74HC595 and the ULN2803 because there's already something appropriate inside the 74HC595.
  • kwinnkwinn Posts: 8,697
    edited 2011-09-21 12:31
    Mike beat me to the punch (as usual) regarding the two registers but I was also going to suggest you use a TPIC6595. It combines the functions of the 74HC595 and the ULN2803 in one chip. Saves some wiring/pcb real estate and you can still use the '595 driver in the OBEX for it as well.
  • jmspaggijmspaggi Posts: 629
    edited 2011-09-21 12:50
    Oh!!! That's what the STCP is for! So that will make things way easier!

    Thanks a lot Mike!

    JM
  • jmspaggijmspaggi Posts: 629
    edited 2011-09-21 12:55
    Hi Kwinn,

    The TPIC6595 can driver 250mA and the ULN can drive 500mA.

    However, it's to use with the Omron relay (Control voltage: 12VDC @ 33.3mA (approx 400mW)) so both of them are correct.

    BUT... ;) The 595 and the ULN are both available at Parallax so I can get them at the same time as my Javelin, and the TPIC6595 is not.

    So I will have to think a bit about wirering vs costs...

    Thanks for pointing me also to this component.

    JM
  • kwinnkwinn Posts: 8,697
    edited 2011-09-21 13:02
    It's probably worth the extra wiring to avoid having to order from multiple suppliers. Just be aware that the 500mA ULN rating does not mean you can output 500mA on all 8 pins at once. The current per pin has to be derated based on the number of pins providing current at the same time. IIRC with all 8 pins conducting the max current per pin is ~ 160mA
  • jmspaggijmspaggi Posts: 629
    edited 2011-09-21 18:00
    Ok. So I will not be able to get the 500mA from it, but at least I will be able to have the 8 Omrons. Thanks again for the clarifications.
  • bsnutbsnut Posts: 521
    edited 2011-09-21 18:30
    jmspaggi wrote: »
    Ok. So I will not be able to get the 500mA from it, but at least I will be able to have the 8 Omrons. Thanks again for the clarifications.
    Now, if the PCB space isn't a problem you can use a ULN and will get least 160mA per pin. Remember relays are not a bad thing to use for high current devices.
Sign In or Register to comment.