I’m new to using an arduino and my knowledge of electronics is pretty basic; I have a simple question.
Say I wire one pin to another with a resistor in between. One pin is set at 5V, the other is ground, a complete circuit. Is there any way for me to break this circuit in my program without changing the first pin from 5V?
I ask because I have a PCB with one 5V input and five outputs, and if I connect each output to a pin on the arduino I want to be able to choose which one current flows through.
No need to write a super-detailed explanation; just help me figure out what needs to be done and I can google how to code it. Thanks!
Your question has little context for us to go by. A classic problem with beginners is they ask a question related to a path that they got to in error. Kind of like asking “How do I fill my gas tank with radiator fluid without it the motor stopping?”
My confusion is that you speak of current flowing as if that were the ultimate goal. Often you are move interested in voltage levels for an ADC or to compare against logic levels.
Can you provide some details as to what you are trying to accomplish without a specific solution. Something like: I have five sensors coming into my sensor board. I only can spare one ADC pin on my Arduino, so I need a way to select what sensor gets connected. Any ideas?"
My goal is to rewire a remote control I took apart so that I can control which signal (left, forward, whatever) is sent out using the arduino instead of pressing buttons on the controller. There’s a place on the controller labeled “ground,” another labeled “5v.” There are buttons for each command, so if I connect 5v and ground to their places and press the “forward” button the controller emits the forward signal.
When I was testing I held a wire with 5V to the place on the board labeled “5v” and held a ground wire to the right side of the forward button, which works. So I soldered a wire to the 5v place and wires to the right side of every button and now if I supply 5v and connect all the other wires to ground the controller will emit all four signals (forward, left etc.) at the same time. But I don’t want this to happen, I want to be able to choose which signals are emitted.
squareballer:
When I was testing I held a wire with 5V to the place on the board labeled “5v” and held a ground wire to the right side of the forward button, which works.
I think this sentence needs a little more detail! I think this says you connected a wire on the circuit board that is labeled as 5 volts. But it then says you held it. Held it in your hands? Held it to your left temple? Held it to the left side of the switch?
You then say you connected a wire to ground and touched that to the right side of a button to activate that function.
Would you happen to own a voltmeter or a multimeter?
What you want to do (automate a remote control) is very likely a possibility. We just need to sort out the type of switching it has to guide you in connecting it to an Arduino.
There’s a small metal ring on the circuit board labeled 5v. There was a wire from the original battery compartment of the controller soldered to it. I cut this wire. Then I replaced it with a wire connected to one of the 5v pins on the Arduino. By “held” I mean I touched the end of the wire to the metal part on the circuit board to see what would happen before I soldered it in place.
I think it normally works like this:
gnd--------button---------5v
and when you press the button, you complete the circuit.
I tried to bypass the button with a ground wire, so it would look like this:
button–gnd-------5v
which would have worked if I only wanted to control one button’s function (I could have just turned the 5v on and off). But there are four buttons, and I used four ground wires to bypass them all, and since each circuit is connected to the same 5v, I don’t know how to control it.
I do own a multimeter.
Thanks for your help.
First find the ground on your remote. It could be as simple as following the negative lead from the battery or using the legend on the board. Next put your voltmeter on a DC volt scale and put the black probe tip to ground and the positive one to one side of the switch. Record this value. Now depress the switch and record the value. Next move the probe tip to the other side of the switch and record the value. Lastly depress the switch again and record the value. Report the four values and we should be able to make a good suggestion how you might be able to interface your remote to an Arduino.