Transistor quickie...

Thread Starter

saiello

Joined Jul 1, 2007
24
Hi,
I have a microcontroller project. I would like to control a piece of machinery that has a remote control input. This input starts and stops the machine. The input consists of two wires: join them together the machine runs, disconnect and it stops. I would like the microcontroller to interface to the machine via a suitable transistor that will connect and disconnect the remote control input wire. The microcontroller and machine will run from different power supplies. My question is this: Disregarding the actual voltages and currents involved, can I essentially connect the collector and emitter of the transistor to the two input wires of the machine and the base to one of the microcontroller output pins? Is it ok to use the transistor this way to bridge two essentially separate circuits? Or does the emitter of the transistor need to be connected back to the microcontroller ground rather than relying on the machines ground? What is best practice here...?
 

ScottWang

Joined Aug 23, 2012
7,400
Let's make the thing clear, you said that when the two wires connected together then the machine will running, so you have to make sure about two wires what's the working voltage level of the input of remote, when the machine is not working that the input is Hi or Lo voltage.

You could measure the current direction of two wires when the machine is running, measure it by digital current meters.

You also could measure the voltage of two wires when the machine is running, measure them by volt meter, if you can reach the ground.
 

crutschow

Joined Mar 14, 2008
34,428
Since the two units use different power it would be better to use a solid-state relay to do the switching, which will provide isolation. Likely a DC output type of SSR, such as this, should work but you need to measure the voltage and current on the wire first, as Scott noted.
 

KrisBlueNZ

Joined Oct 17, 2012
111
Adding to what ScottWang and crutschow have said...

The general answer is that you need an isolated switch such as a relay (electromechanical or reed) or a solid state relay, unless you know what the control wires connect to. Without knowing anything more, I suggest an electromechanical relay, or (if you know that the current that flows when the control wires are connected is less than 1A or so), a reed relay or a solid state relay. Solid state relays come in several types; some are only designed to switch AC loads.

So as a general answer, you should use an electromechanical relay such as http://www.digikey.com/product-detail/en/G5T-1A DC5/Z2774-ND/1731474

That relay has a 5V coil that draws 40 mA. You will need to drive the relay coil with a transistor, and connect a diode across the relay coil to suppress the back EMF. Do a Google Images search for suitable circuits.
 
Top