So if there is more than 1 switch per PyBoard, he'll have long wires.If the rooms are big then we might need to connect switches from 5 to 30 feet.
Checking feasibility of a Project. Expert Opinion Needed.
Re: Checking feasibility of a Project. Expert Opinion Needed.
Written above:
Re: Checking feasibility of a Project. Expert Opinion Needed.
What voltage you use for the signal to the switches really depends on how electrically noisy the environment is.
If you use 3.3v from the pyboard and your wire runs parallel to 120v power line, then changes in the 120v power line could very well induce 3.3v spikes in your signal line.
Traditional ways of dealing with are to use differential signals (so the same noise gets injected into both sides of a differential pair), and using larger voltages.
For example, the limit switches on a CNC router. You're much better off using 12v signals and voltage shifting close to the controller, rather than using say 3.3v.
You should also make sure that you use shielded wire, and ground the shield at the controller side of things.
To minimize noise, your control wires should not run parallel (and close to) high voltage signals. Try to cross at 90 degrees, and try to keep control signals at least a foot away from high voltage signals.
RS-485 (differential serial communication) can run many thousands of feet.
So there is no straight forward answer.
If you use 3.3v from the pyboard and your wire runs parallel to 120v power line, then changes in the 120v power line could very well induce 3.3v spikes in your signal line.
Traditional ways of dealing with are to use differential signals (so the same noise gets injected into both sides of a differential pair), and using larger voltages.
For example, the limit switches on a CNC router. You're much better off using 12v signals and voltage shifting close to the controller, rather than using say 3.3v.
You should also make sure that you use shielded wire, and ground the shield at the controller side of things.
To minimize noise, your control wires should not run parallel (and close to) high voltage signals. Try to cross at 90 degrees, and try to keep control signals at least a foot away from high voltage signals.
RS-485 (differential serial communication) can run many thousands of feet.
So there is no straight forward answer.
Re: Checking feasibility of a Project. Expert Opinion Needed.
@pythoncoder long wires.
Re: Checking feasibility of a Project. Expert Opinion Needed.
so I see the main challange comes from switches connected to the pyboard. What would you do in that case? Separate pyboards for each switches? Or you would use 1 pyboard with some kind of filter between pyboard and switches?
If I go for filters then can anyone give me a diagram of possible circuit or I there are already readymade filters available?
If I go for filters then can anyone give me a diagram of possible circuit or I there are already readymade filters available?
Re: Checking feasibility of a Project. Expert Opinion Needed.
Hi,
most things are said already. I would like to add that you can't possibly use normal switches as you know e.g. from your light system, since those are not debounced. That is, the switching event will not create one but several events on the pyboard I/O due to the fact that the metal contact will bounce several time up and down during the switching process. This creates, for the fraction of a second, several on off on off on off.... states. You would need to deal with this either in software on the pyboard side or in hardware by filtering. However, software does not help you with the induced spikes. The danger here is not that you might get wrong signals but that those spikes could possibly damage the pyboard.
What I would do is to create an external circuitry, e.g., based on 12 V or 24 V which you could easily be obtained by a transformer and lowers the cost, e.g. thing of ordinary door bell equipment, use this to for the switch lines and create a small circuit close to the pyboard, possibly with some optocoupler devices which "translate" the presence of 12 V resp. 24 V to the necessary 3.3 V. Those optocouplers would decouple the entire circuit from the pyboard and the more advanced versions even help with the signal quality.
most things are said already. I would like to add that you can't possibly use normal switches as you know e.g. from your light system, since those are not debounced. That is, the switching event will not create one but several events on the pyboard I/O due to the fact that the metal contact will bounce several time up and down during the switching process. This creates, for the fraction of a second, several on off on off on off.... states. You would need to deal with this either in software on the pyboard side or in hardware by filtering. However, software does not help you with the induced spikes. The danger here is not that you might get wrong signals but that those spikes could possibly damage the pyboard.
What I would do is to create an external circuitry, e.g., based on 12 V or 24 V which you could easily be obtained by a transformer and lowers the cost, e.g. thing of ordinary door bell equipment, use this to for the switch lines and create a small circuit close to the pyboard, possibly with some optocoupler devices which "translate" the presence of 12 V resp. 24 V to the necessary 3.3 V. Those optocouplers would decouple the entire circuit from the pyboard and the more advanced versions even help with the signal quality.
Re: RE: Re: Checking feasibility of a Project. Expert Opinion Needed.
I hope this little tutorial will be helpful for you: http://www.learningaboutelectronics.com ... ircuit.phpshahadat wrote:so I see the main challange comes from switches connected to the pyboard. What would you do in that case? Separate pyboards for each switches? Or you would use 1 pyboard with some kind of filter between pyboard and switches?
If I go for filters then can anyone give me a diagram of possible circuit or I there are already readymade filters available?