Using 74HC595 shift registers with servos,

Hello, just a quick question,

74HC595 shift registers can you only use them with LEDs? Iv only ever seen that

If you can use them with servos how to you access jst one pin on the 74HC595 so i can control the servo?

Thanks to anyone that answers :wink:

All the best

Frank

You don't really access individual pins with a SIPO shift register, you have to shift all 8 bits in to change any of them.

However you can do what you suggest by remembering the current bit pattern, changing the bits you want to, then shift all 8 into the register. As you need to PWM all 8 pins at presumably different duty cycles the code would get a little messy, however as the pulses only have to be produced at 50Hz it's doable.

You would have to keep a table of the 8 servo pulse lengths, then every 20mS write FF to the 595 and start timing. As the time matches the required length of each servo pulse set it's bit to 0 and write all 8 bits to the 595 again.

The shortest pulse will be 750uS and longest 2250uS so you may have to do 8 full shifts into the 595 over the next 1500uS as each servo's pulse width is up. (less if some have the same pulse width)

20mS later repeat the process etc etc.

The ssc-32 servo controller has four 74HC595 chips to control 32 servos in a similar setup.

the ssc-32 servo controller is hard to connect to an arduino right?

is there a arduino compatible shield for controlling up to 18-24 servos??

I may be wrong, but a regular arduino + servo shield for 20 servos may be over $50.
It might be worth it to buy an arduino mega. That's up to 48 servos! Plus a bunch of extra pins.

mmm ok well untill i have enough money to get the arduino mega i think ill go for a smaller project lol :wink:

thanks everyone.

If money's an issue, then where are you getting 20 servos?

the ssc-32 servo controller is hard to connect to an arduino right?

Very simple, just connect the ssc-32 TTL tx/rx to the arduino tx/rx. Just send a command string to the ssc-32 and it does all the servo stuff.