View Full Version : Length of wiring and sensors
01-20-2007, 03:58 AM
If I run a servo in one room from·my stamp in another room how would that affect things?
Is there a power loss over distances under 100 feet that is noteworthy?
01-20-2007, 04:08 AM
Probably. Try it and find out.
What a long wire gets you is Capacitance (the signal gets low-pass filtered. Nice sharp edges on signals 'round over') and Resistance (voltage drop). And on 100 feet of wire, the signal degradation could be quite high. That's why RS232 signalling uses a +- 10 volt signal, and runs at low baud rates (19,200 or below), to make it more likely the reciever will properly get the signal.
Now, the BS2 (and the PIC it's based on) has a pretty powerful driver on it. 25 mA is nothing to sneeze at. On the other hand, it is at +5 volt levels. So it all depends on how degraded the signal can be before the 'reciever' chip in the Servo doesn't properly recieve it anymore. AND what the 'impedance' (resistance) is on that 'reciever' chip.
Since I believe the Servo was designed to have a Servo Reciever right there in the model plane next to it, I wouldn't think using a long wire was really in their plans. But it could work.
01-20-2007, 04:33 AM
Basiclly one photoresistor is by a window and one inside. The one inside is used to determine if the amount of light inside matches the amount measured by the photoresistor by the window. It is also used to measure the length of time the lights are on. The servo is used to flip the lights on and off.
Either the servo, the photoresistors (or all three) will be aways away from the BS2.
Giving wiring it could be up to 100 feet.
How can the power drop be overcome?
01-20-2007, 05:04 AM
Use the photoresistor to control a 555 timer in monostable mode so the 555 puts out pulses whose frequency depends on the photoresistor value. The 555 has an open collector driver as I recall with good drive capability. You'll need 3 wires to the remote sensor, +5V, Ground, and a signal line. Put a pullup resistor (maybe 220 ohms) to +5V at the Stamp end of the cable and feed that into the Stamp for pulse width testing with PULSIN. If you can only run 2 wires to the remote sensor, you could "steal" power from the signal line with a diode, resistor, and filter capacitor so that the capacitor is charged when the timer output is high and the diode prevents discharging of the capacitor when the timer output conducts.