Baisc... Teensy 2 is the switch

Status
Not open for further replies.

Dan

Active member
Hello,

For my car, I have a door who can be opened with a IR infrared remote switch.

I want my door to automatically be opened every day at 8 pm. For now forget the timing need.

I plan to connect 2 wires on the remote switch button, to a Teensy 2 output.

Is it possible that the teensy become a passive switch. connecting the 2 wires together for 1 second and then disconnect the 2 wires?

Regards,

Dan
 
For a completely passive switch, you need a relay. Relays have a truly mechanical that is physically moved by a tiny electro-magnet. There are "reed relays" meant for switching small signals. They're smaller, faster and have much longer mechanical life than normal relays meant for switching power. They also require much less current. Many work with 10 mA at 5 volts.

Always use a diode across the relay coil. The diode prevents a high voltage spike when the relay turns off. If you neglect the diode, your Teensy will very likely be damaged. Many reed relays include the diode for you, so it's safest to use one of those.

Here's one from Digikey that ought to work.

http://www.digikey.com/product-detail/en/9007-05-01/306-1063-ND/301697

Of course, if you can learn a bit more about the circuit you're triggering, a direct logic signal connection might be possible. But a reed relay will give you a truly passive mechanical switch, which is definitely the simplest way that doesn't require any technical specs of the receiving circuit.
 
Thank you, I will bought this relay !

So the only thing to do, is to plug the 4 pins of the relay to my switch (2 pins) and the GND (1 pin) and a PIN output of the teensy (1 pin)

And program it like this :

pinMode(PIN_NUM, OUTPUT);


digitalWrite(PIN_NUM, HIGH);
delay(400);
digitalWrite(PIN_NUM, LOW);


Is it ok?

Regards

Dan
 
Status
Not open for further replies.
Back
Top