I am trying to make a sunrise alarm clock with LED strip and an arduino uno.
The LED strip is running on a seperate power source, which goes through a little 3 button light controller.
I need to adjust the brightness levels by using that light controller, but instead of pressing the brightness button, I opened the button and tapped into it with two wires.
Basically that means I can plug in the LED strip, and when I touch the 2 wires together, it changes brightness... So I want to put both of those wires into the arduino and control the brightness by that, but from my research, I can't find a way to basically connect those wires/pins for a short time, via the arduino.
Basically I am trying to use the arduino as an automated button, but is this possible in the code???
The "general" approaches to connecting two wires are not appropriate here (you'd need a relay or something - bulky, current hungry, and awkwardly large.
There are much simpler ways, but you need to figure out how those controls are wired.
Get out your DMM, test continuity - I'll wager than one of those pins is tied to ground, and the other is pulled up by the controller. Check which is which, and to what voltage the one not grounded is tied to - if it's 5v or less, that can go direct to an arduino pin. Set the pin to OUTPUT to drive it low and simulate a button press. If it's to the full 12v, connect it to the drain of a small logic level MOSFET, ground to the source of said MOSFET, and gate through a small resistor (100 ohms is good, but you can go up to a couple k in a low-current situation like this, and in practice with small fets, you don't even need it - though it's always good practice)
In all cases, ground of controller should be tied to ground of the arduino. If this is a problem, use an opto (but you still need to know the polarity) to isolate it from the arduino ground.
If one of them isn't wired to ground, gather more data and post back.
Okay, I will give it a try. I am new to the code stuff, so how would you write that part(Or which pins use OUTPUT and etc?)? The input on the controller says from 5-24v so I can check it. I could possibly get a 5v power supply instead of a 12v to bypass that if it is on 12v. Thanks
Bomberguy111:
... The input on the controller says from 5-24v so I can check it. I could possibly get a 5v power supply instead of a 12v to bypass that if it is on 12v. Thanks
5-24V?
are you sure?
It seems to me like you think that the output levels are according to input.
From your original post, is it possible you could attach a diagram, hand-drawn is fine, of what you're trying to accomplish? I'm not entirely convinced that what you've described accurately depicts what you're trying to do. My current understanding suggests that @DrAzzy's solution is correct, but (there's always a but) there may be another way.
With most 5V devices it is just a matter of connecting that signal wire to a digital pin and writing HIGH to set it to 5V or LOW to set it to ground and "press" the button.
While assurign the common / 0/gnd pins are shared !