- My Forums
- Tiger Rant
- LSU Recruiting
- SEC Rant
- Saints Talk
- Pelicans Talk
- More Sports Board
- Fantasy Sports
- Golf Board
- Soccer Board
- O-T Lounge
- Tech Board
- Home/Garden Board
- Outdoor Board
- Health/Fitness Board
- Movie/TV Board
- Book Board
- Music Board
- Political Talk
- Money Talk
- Fark Board
- Gaming Board
- Travel Board
- Food/Drink Board
- Ticket Exchange
- TD Help Board
Customize My Forums- View All Forums
- Show Left Links
- Topic Sort Options
- Trending Topics
- Recent Topics
- Active Topics
Started By
Message
Transistor or relay?
Posted on 10/22/20 at 10:19 am
Posted on 10/22/20 at 10:19 am
Hoping someone where smarter than me can help answer this question.
I want to mod the remote control for our Halloween smoke machine. It triggers the smoke machine via IR when you push a button on the remote. One button press activates the smoke, a second turns the smoke off. The button is normally open and works by completing the circuit.
My initial thought was use an Arduino pro mini to trigger the remote either by time or when a motion sensor was tripped (buy approaching trick or treaters.) I was going to simply use a 3v relay to complete the circuit. My question is, can I do the same thing via transistor? The remote is powered by 2 AAA's so I don't think there is significant voltage across the push button.
The pros of the relay are,
1) I've wired them before so it should be simple to use.
Cons:
1) Bigger
2) More expensive.
3) larger battery consumption.
Pros for the transistor,
1) Smaller
2) Cheaper
Cons
1) I've never worked with them before.
Thanks
L
I want to mod the remote control for our Halloween smoke machine. It triggers the smoke machine via IR when you push a button on the remote. One button press activates the smoke, a second turns the smoke off. The button is normally open and works by completing the circuit.
My initial thought was use an Arduino pro mini to trigger the remote either by time or when a motion sensor was tripped (buy approaching trick or treaters.) I was going to simply use a 3v relay to complete the circuit. My question is, can I do the same thing via transistor? The remote is powered by 2 AAA's so I don't think there is significant voltage across the push button.
The pros of the relay are,
1) I've wired them before so it should be simple to use.
Cons:
1) Bigger
2) More expensive.
3) larger battery consumption.
Pros for the transistor,
1) Smaller
2) Cheaper
Cons
1) I've never worked with them before.
Thanks
L
Posted on 10/22/20 at 12:31 pm to Lonnie Utah
If you used an optocoupler you could completely separate the two electrically.
You could also download the IR libraries, write a sketch to read the IR signals from the remote, then program them into your sketch and use an IR emitting diode on your Arduino to turn the unit on an off, no relay needed and no need to interact with the original IR remote.
You could also download the IR libraries, write a sketch to read the IR signals from the remote, then program them into your sketch and use an IR emitting diode on your Arduino to turn the unit on an off, no relay needed and no need to interact with the original IR remote.
This post was edited on 10/22/20 at 12:36 pm
Posted on 10/22/20 at 12:52 pm to td1
I have code that turns a TV on and off, but I can not post it here with the forum restrictions. I you want it, PM me and I will send it to you via email.
It uses this library IRLibSendBase.h
It uses this library IRLibSendBase.h
Posted on 10/22/20 at 12:55 pm to Lonnie Utah
if you want to replace the remote, get an IR emitter and hook it up to your arduino. I doubt the remote does anything besides sending a single light pulse to the smoke machine.
Wouldn't know for certain with out something that could see the remote's light output.
I would ditch the remote all together and replace the IR sensor with an opto-coupler attached to your arduino. Flash the arduino with tasmota and you can access it through a webpage.
Wouldn't know for certain with out something that could see the remote's light output.
I would ditch the remote all together and replace the IR sensor with an opto-coupler attached to your arduino. Flash the arduino with tasmota and you can access it through a webpage.
Posted on 10/22/20 at 1:06 pm to td1
quote:
You could also download the IR libraries, write a sketch to read the IR signals from the remote, then program them into your sketch and use an IR emitting diode on your Arduino to turn the unit on an off, no relay needed and no need to interact with the original IR remote.
I'd actually thought of this, but I don't think I can code well enough to pull it off. lol.
I agree it might be the best solution.
Posted on 10/22/20 at 1:31 pm to Lonnie Utah
I don't think it will be that hard. If you google the Arduino IR libraries, you will find the GitHub downloads and a ton of examples. It is not hard at all.
There is a very good chance they use NEC or Sony encoding, especially if it is china made. There would be no practical reason for them to do their own encoding.
They also have a sample sketch that will read the remote, no coding needed.
Also all you will need is a ir receive diode to sniff out the hex codes and a regular ir diode to send them.
There is a very good chance they use NEC or Sony encoding, especially if it is china made. There would be no practical reason for them to do their own encoding.
They also have a sample sketch that will read the remote, no coding needed.
Also all you will need is a ir receive diode to sniff out the hex codes and a regular ir diode to send them.
Posted on 10/22/20 at 1:44 pm to td1
I could see if working like this:
starup
set motion sense to not tripped.
start loop
read motion sensor trip status.
if motion sensor trip, execute on ir blast.
(one variation)
while motion sensor is tripped, or continues to be tripped within x amount of time, do nothing.
(another variation)
timer to countdown after on ir blast, then send off ir blast.
reset motion sensor trip variable.
loop
that would be a very simple way without using any type of feedback of whether the machine is on or not. It might get a little tougher if it uses the same ir hex value to turn on and off. That is why I had to put something into the one I did to give me feedback if the tv was on or not. We did this on a few TVs, it got a little tougher with one bc its usb ports were powered even when the tv was turned off, for that one we used a photocell placed inside the TV case to check the backlight as a way to verify if the tv was on or off. Cheap client who would not spring for the "commercial" versions of the TVs that would have allowed us to ask the tv if it was on or off, or use standard serial or network coms.
starup
set motion sense to not tripped.
start loop
read motion sensor trip status.
if motion sensor trip, execute on ir blast.
(one variation)
while motion sensor is tripped, or continues to be tripped within x amount of time, do nothing.
(another variation)
timer to countdown after on ir blast, then send off ir blast.
reset motion sensor trip variable.
loop
that would be a very simple way without using any type of feedback of whether the machine is on or not. It might get a little tougher if it uses the same ir hex value to turn on and off. That is why I had to put something into the one I did to give me feedback if the tv was on or not. We did this on a few TVs, it got a little tougher with one bc its usb ports were powered even when the tv was turned off, for that one we used a photocell placed inside the TV case to check the backlight as a way to verify if the tv was on or off. Cheap client who would not spring for the "commercial" versions of the TVs that would have allowed us to ask the tv if it was on or off, or use standard serial or network coms.
Posted on 10/22/20 at 1:49 pm to td1
One more:
Go to Lowes / Home Depot. Buy a cheap outdoor motion sense light. Remove the motion sense unit from the light. Wire it to your power for the smoke machine. Set the sensitivity and on time as you would if you were setting up the motion sense light.
You could even go crazy and mount it in a workbox with an outlet you could use to plug other things you want motion sense to work with. Then you don't even have to cut the cord on the smoke machine.
Just make sure it is not one of the LED motion sense lights. And as always, don't exceed the wattage the original fixture or the motion sense unit is rated at.
Go to Lowes / Home Depot. Buy a cheap outdoor motion sense light. Remove the motion sense unit from the light. Wire it to your power for the smoke machine. Set the sensitivity and on time as you would if you were setting up the motion sense light.
You could even go crazy and mount it in a workbox with an outlet you could use to plug other things you want motion sense to work with. Then you don't even have to cut the cord on the smoke machine.
Just make sure it is not one of the LED motion sense lights. And as always, don't exceed the wattage the original fixture or the motion sense unit is rated at.
Posted on 10/22/20 at 2:20 pm to td1
So I forgot to order the motion sensors when I made my amazon order. I think I'll just wire the new IR remote up on a time cycle for this year.
Posted on 10/22/20 at 4:20 pm to Lonnie Utah
Posted on 10/24/20 at 8:39 pm to td1
Well I got it, basically, working.
Arduino Pro Mini, 100 om resistor, IR led and a battery holder for two button batteries was all it took.
I have to tweak the code to do more random length between the bursts and random length. But I diagnosed the IR code and was to write it into the code of the new sketch.
Arduino Pro Mini, 100 om resistor, IR led and a battery holder for two button batteries was all it took.
I have to tweak the code to do more random length between the bursts and random length. But I diagnosed the IR code and was to write it into the code of the new sketch.
Popular
Back to top
