PDA

View Full Version : Serial to parallele freezing results component...



jmspaggi
09-21-2011, 06:55 PM
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

Mike Green
09-21-2011, 07:24 PM
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 (http://www.nxp.com/documents/data_sheet/74HC_HCT595.pdf)). 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.

kwinn
09-21-2011, 07:31 PM
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.

jmspaggi
09-21-2011, 07:50 PM
Oh!!! That's what the STCP is for! So that will make things way easier!

Thanks a lot Mike!

JM

jmspaggi
09-21-2011, 07:55 PM
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

kwinn
09-21-2011, 08:02 PM
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

jmspaggi
09-22-2011, 01:00 AM
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.

bsnut
09-22-2011, 01:30 AM
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.