Checking feasibility of a Project. Expert Opinion Needed.
Checking feasibility of a Project. Expert Opinion Needed.
Hi everyone, I am planning to develop a system using Micropython and Pyboard. Just wanted to know whether the project can be done using these technologies. What I want to do is..
1- I want to put switches in different rooms. Each of these switches would be connected to a single Pyboard.
2- So each Pyboard should be able to handle at least 10 switches. If Pyboards can't handle 10 switches then can anybody tell me how many switches it can handle? By using the word handle I mean pyboard would collect a signal from a switch.
3- Whenever a person would push a switch the electronic signal would go to the micro-controller and the pyboard would send a token to the central computer. Different tokens for different switches.
4- Whenever the central computer would get the signal from pyboard it would call associated functions to read associated data from a database.
So lets say switch 1 has token 1, switch 2 has token 2. Whenever someone would press switch one pyboard would call specific function for switch 1 in central computer. Whenever the function will be called it would read data from database and display on screen.
Please let me know whether it is possible or not. Any help would be highly appreciated.
best regards...
1- I want to put switches in different rooms. Each of these switches would be connected to a single Pyboard.
2- So each Pyboard should be able to handle at least 10 switches. If Pyboards can't handle 10 switches then can anybody tell me how many switches it can handle? By using the word handle I mean pyboard would collect a signal from a switch.
3- Whenever a person would push a switch the electronic signal would go to the micro-controller and the pyboard would send a token to the central computer. Different tokens for different switches.
4- Whenever the central computer would get the signal from pyboard it would call associated functions to read associated data from a database.
So lets say switch 1 has token 1, switch 2 has token 2. Whenever someone would press switch one pyboard would call specific function for switch 1 in central computer. Whenever the function will be called it would read data from database and display on screen.
Please let me know whether it is possible or not. Any help would be highly appreciated.
best regards...
Re: Checking feasibility of a Project. Expert Opinion Needed.
Sounds quite feasible, perhaps even with MQTT protocol. What technology do the switches use communicate to the pyboard? And do you mean that switches are also pyboards or some other form of modules? For such a small task as a simple switch, esp8266 might do a good job, if WiFi is a possibility in your setup.
Re: Checking feasibility of a Project. Expert Opinion Needed.
Well as this system is mainly for emergency patients so I think Wifi would not be the ideal choice. There might be sensitive devices which might interfere with wifi signals.
Can we use normal switches which we use to turn on and off lights? Or you can recommend even smarter options?
Can we use normal switches which we use to turn on and off lights? Or you can recommend even smarter options?
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: Checking feasibility of a Project. Expert Opinion Needed.
@shahadat Handling ten switches is no problem, but how do you intend to link the Pyboards to the computer - wirelessly or with a physical link? A physical link could be achieved with a UART and a three core cable.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
Re: Checking feasibility of a Project. Expert Opinion Needed.
@pythoncoder Ok here is my plan... http://prnt.sc/afvpml
I am not willing to use Wifi as it might interfere with some other hospital equipment.
I am not willing to use Wifi as it might interfere with some other hospital equipment.
Re: Checking feasibility of a Project. Expert Opinion Needed.
Hello Shahadat. As pythoncoder said, handling 10 switches is no problem with PyBoard. It's just limited by the number of ports minus the ones you need for communication. I would forsee a bigger challenge in electrical set-up. You have to filter the input's to Pyboard to prevent form voltage spikes, discharges, and other noise, which would kill the input circuitry of PyBoard even with cables of moderate length.
Re: Checking feasibility of a Project. Expert Opinion Needed.
@Roberthh ok I get it. But will not these switches use pyboard's power? I thought the switches would get power from pyboard itself. If they are getting power from pyboard then there would not be any spike, noise etc.
And what is the recommended cable length for the switches? If the rooms are big then we might need to connect switches from 5 to 30 feet.
If this is not possible then we can use 1 pyboard for one switch too. But actually this would be waste of resources. Though we are stubborn to develop the system.
And what is the recommended cable length for the switches? If the rooms are big then we might need to connect switches from 5 to 30 feet.
If this is not possible then we can use 1 pyboard for one switch too. But actually this would be waste of resources. Though we are stubborn to develop the system.
Re: Checking feasibility of a Project. Expert Opinion Needed.
Hello shahadat,
a switch does not need power. In the simple set-up you would use a pull-up at the pyboard and just connect the switch to GND. The spikes come from the fact, that the cable to the switch acts as an antenna for all kind of electromagnetic signals (aka noise), like small sparks from people, strong sparks of nearby thunderstorms, smart phones, other electrical equipment, and so on. So you have to do a nice analog filtering on the wire coming from the switch. I would place a separate circuit in between the wire and PyBoard, like an Schmitt-Trigger gate in combination with an analog low pass filter and protection diodes. Speed should not be an issue, if your PyBoard software uses polling to determine the state of the switch.
a switch does not need power. In the simple set-up you would use a pull-up at the pyboard and just connect the switch to GND. The spikes come from the fact, that the cable to the switch acts as an antenna for all kind of electromagnetic signals (aka noise), like small sparks from people, strong sparks of nearby thunderstorms, smart phones, other electrical equipment, and so on. So you have to do a nice analog filtering on the wire coming from the switch. I would place a separate circuit in between the wire and PyBoard, like an Schmitt-Trigger gate in combination with an analog low pass filter and protection diodes. Speed should not be an issue, if your PyBoard software uses polling to determine the state of the switch.
Re: Checking feasibility of a Project. Expert Opinion Needed.
For connecting everything together you could go with a UART <-> TCP/IP bridge. You can get these with power over ethernet as well, so if you also get a POE enabled router you'd have the advantage that you only need to a single cable which does both connection and powering of the PyBoard.
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: Checking feasibility of a Project. Expert Opinion Needed.
@shahadat Are the switches in the same enclosure as the Pyboard or are long wires used?
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.