Closing a Switch with Microcontroller: Simple Answer

  • Thread starter Thread starter dmehling
  • Start date Start date
  • Tags Tags
    Switch
AI Thread Summary
To close a simple switch with a microcontroller, a relay is a common solution, but it may require a transistor for proper operation. The microcontroller typically lacks the current capacity to drive a standard relay directly. For an adaptive switch used in wheelchairs, interfacing the microcontroller can be achieved by connecting it in parallel with the switch, allowing it to simulate the switch's actuation. It's crucial to consider the voltages and currents involved, as well as ensuring proper grounding and isolation. Reliability in wheelchair electronics is vital, emphasizing the need for fail-safe mechanisms.
dmehling
Messages
114
Reaction score
0
I am trying to figure out how to close a simple switch with a microcontroller. Do I need a relay to do this? Please give a simple answer since I don't know much about electronics.
 
Engineering news on Phys.org
A relay will definitely do this, but you will most likely need a transistor to drive it. Depending on what you are trying to switch, you may be able to get by without the relay.
 
A microcontroller would not have the necessary transistors for this project? If it's possible that I don't need a relay then how would I close a switch?
 
dmehling said:
A microcontroller would not have the necessary transistors for this project? If it's possible that I don't need a relay then how would I close a switch?

You need to tell us more about what the switch is doing, in order for us to know how big it is. A microcontroller (uC) does not generally have much current source/sink capability ( a few mA, typically), so you cannot drive a regular (even small) relay directly. But there are other kinds of switch mechanisms that can be driven with very little current.

What voltages and currents will your switch experience? What is it a switch for?
 
It's an adaptive switch for controlling wheelchairs and other types of things. It is a very simple mechanical switch with a miniplug (like a stereo mini plug) at the end of a cable that connects to an adaptive device. Here is an example: http://www.infogrip.com/product_view.asp?RecordNumber=165&sbcolor=%23990033&option=switch&subcategory=&CatTxt=&optiontxt=Switch I'm trying to figure out how I would interface my microcontroller to such a switch. A purely electronic switch would sound like a better idea but I'm not sure if it can interface with the adaptive device.
 
Last edited by a moderator:
dmehling said:
It's an adaptive switch for controlling wheelchairs and other types of things. It is a very simple mechanical switch with a miniplug (like a stereo mini plug) at the end of a cable that connects to an adaptive device. Here is an example: http://www.infogrip.com/product_view.asp?RecordNumber=165&sbcolor=%23990033&option=switch&subcategory=&CatTxt=&optiontxt=Switch I'm trying to figure out how I would interface my microcontroller to such a switch. A purely electronic switch would sound like a better idea but I'm not sure if it can interface with the adaptive device.

Oh, maybe we're misunderstanding your question. That's in input device, not an actuator. Do you want to monitor the switch with your uC? Or you somehow want to mechanically actuate that big thing?

If you want to click that switch somehow from your uC, you'll definitely need some power gain over the digital output control signal from your uC. Something like a solenoid actuator...

But, if you can put your circuit in parallel with the switch, you could have the uC close its own switch, which would imitate the pushbutton switch being actuated. Do you know what voltages and currents are involved with the circuit that the switch plugs into? Is your uC sharing the same ground as whatever circuit the switch plugs into, or do you need galvanic isolation.

BTW, working on wheelchair electronics is not trivial. I hope you know how important reliability of control and fail-safe operation are. Do you have 3 uCs voting?
 
Last edited by a moderator:
Very basic question. Consider a 3-terminal device with terminals say A,B,C. Kirchhoff Current Law (KCL) and Kirchhoff Voltage Law (KVL) establish two relationships between the 3 currents entering the terminals and the 3 terminal's voltage pairs respectively. So we have 2 equations in 6 unknowns. To proceed further we need two more (independent) equations in order to solve the circuit the 3-terminal device is connected to (basically one treats such a device as an unbalanced two-port...
suppose you have two capacitors with a 0.1 Farad value and 12 VDC rating. label these as A and B. label the terminals of each as 1 and 2. you also have a voltmeter with a 40 volt linear range for DC. you also have a 9 volt DC power supply fed by mains. you charge each capacitor to 9 volts with terminal 1 being - (negative) and terminal 2 being + (positive). you connect the voltmeter to terminal A2 and to terminal B1. does it read any voltage? can - of one capacitor discharge + of the...
Hello dear reader, a brief introduction: Some 4 years ago someone started developing health related issues, apparently due to exposure to RF & ELF related frequencies and/or fields (Magnetic). This is currently becoming known as EHS. (Electromagnetic hypersensitivity is a claimed sensitivity to electromagnetic fields, to which adverse symptoms are attributed.) She experiences a deep burning sensation throughout her entire body, leaving her in pain and exhausted after a pulse has occurred...
Back
Top