I have gotten myself into a project where I'll need to use some input and output shift registers (74HC165 and 74HC595), and in that regard I have a few questions.
The 74HC165s will be used to connect 40 PIR sensors to an Arduino. I'll be using 5 shift registers, placed approximately 1,5 metres apart. That means relatively long wire runs for the clock and load lines -- what should I do to avoid problems with that? I have tried to search around a bit, and I have observed mentions of devices like push-pull line drivers or schmitt triggers, but being a complete noob I'd really appreciate some more detailed info on how to make use of these things.
The issue with the 74HC595s is basically the same; the distances between each will be quite long. I'll be using them to control MOSFETs that, with ShiftPWM, will be used to drive RGB LED strips. The idea is to use elcojacob's PWM driver (http://www.elcojacobs.com/using-shiftpwm-to-control-led-strips-with-arduino/) or make something similar/identical myself (depending on whether they get back in stock in time). These drivers are 3 595s controlling 24 MOSFETs, which can drive 8 RGB strips.
This is an outdoors art installation, and the LED strips will be placed over an area approximately 17 metres long. I'll be using 10 24-channel drivers. The distances between them will vary -- from just half a metre up to maybe 5-6 metres. If this is too much, I could just use two Arduini, as the installation consists of two parts that could be made independently -- if that would make things easier.
I noticed a schematic for a push-pull thing in the blog post I linked to above, but as far as I can see there is no mention of where it should be placed; could it be together with the Arduino, or at the driver, or somewhere in between?
CaffeineConsumer:
I noticed a schematic for a push-pull thing in the blog post I linked to above, but as far as I can see there is no mention of where it should be placed; could it be together with the Arduino, or at the driver, or somewhere in between?
He's placing it right at the Arduino pin. Placing it at a distance from the signaling pin would just serve to amplify any noise that the wire picked up.
Aha -- that makes sense! Thanks for the clarification! I was planning on using protoshields anyways, so I could just put together those push-pull line drivers on them. This application does not call for particularly high frequencies, so maybe that helps a bit as well.
Another thing -- would it be a very bad idea to run the SER, CLK and LAT signals in a cable together with other stuff? I was planning to use a multi-conductor cable to get 5V and 3.3V as well as up to 7 paralell digital signals from the PIR sensors in a 15-conductor 20AWG cable. I couldn't find 13-conductor cables at reasonable prices anywhere, so I figured that 15 would do -- and if necessary, I could use two conductors for one signal to get a larger effective gauge. Would it help to use several two conductors for CLK and LAT?
You are trying to push fast clock signals long distances and this is going to risk problems
(cross-talk, false triggering). without resorting to proper terminated tranmission line
technology such as RS485 perhaps the simplest option is some low-pass-filtering at the
receiving end, followed by schmidt-trigger to clean up the slow edge, plus series resistance
to reduce reflections.
Try 47 ohms in series with the signal at the transmitting end, and 220 ohms at the receiving end,
then a 330pF capacitor to ground at the input to the schmidt trigger (time constant 70ns or so).
74HS14 hex inverter schmitt-triggers are commonly used, but they are inverters so you might
need to string two in series unless you drive the line in negative sense.
The CLK signal is probably the only one that needs attention since its the only line where glitches
will change the state and can't be fixed by adding delay.