Hello Arduino Pros,
I had an idea to repurpose a blank button in my car to work as a switch for turning on/off a Valve.
I was able to make the valve work normally by using a simple toggle switch (the switch is on, the Valve is open. the switch is off and the valve is closed) till now all good. I was able to remove the whole unit with the buttons from my car (there are in total 3 buttons but only one has a function at this point; this is from the factory). I was able to identify which pins are connected to what. there is one pin for the button signal and one for the button light. The idea is that when I press the button the valve opens and the light turns on and pressing it again and the light goes off and also the valve. I'm not the best with electrical stuff and new to the game but I'm trying to learn but I don't want to spend weeks learning all the stuff just to make this first project work. so that's why I'm here.
here is what I'm trying to figure out:
- can I power the Arduino unit with the 12V coming from the valve?
- what resistors do I need to use and where to make sure that I don't burn a fuse.
- definitely need help with coding and what connections I need to use.
I was playing around with it for few weeks and had some success but I cannot say that I'm sure about what I'm doing.
here is the whole thing
Thanks you for your suggestions and help.
To use an Arduino as a smart switch (we'll discuss that in a minute) you need some "electronic switching" capabilities, a transistor circuit, maybe a mechanical relay will be enough, all depending on what you are switching, the current in draws and the voltage of course (well, 12V in your case).
So it looks like you are way to far from solving the problem and for that matter you would need to know more about electricity, electronics, and programming.
As for what you may need, it should start with what you want, and even that is not clear, why you need a solution based on a microcontroller in the first place.
I suggest doing it without any electronics at all.
Identify the pins for the button and the light. The rest would be simple.
I would love to just connect the wires from the valve directly to the button in my car but the button is not just an on/off switch. It only sends out a signal to the cars ECU and the ecu activates whatever funcion its supposed to have. That is why i need some control unit for that. Changing the button itself is not an option… i want to use the existing button in the car that has no funcion and the pins from that button are not connected to anything. I know which pin is which.
I know exactly what i want to achieve but its hard to articulate my thoughts as english is not my native language and also which is more importaint, i just started to work with such things as arduino.
My apology. That kills my suggestion.
Okey. The button gives a logic signal that You can pick up. Good. What do You know about the lamp part of the project? If it is connected to the cats ECU a possible conflict might be thinkable.
A second thought. This button looks like "spare". What does the manual say? Can it be configured to operate like the valve You want, and lighting up the button?
The LED should be the smallest problem… i already know which pin it is an made a simple code and connected it directly to the board and i can turn it on an off using a separate switch that came with the arduino kit. (See picture, sorry i know its messy). What i struggle with is picking up the signal from the button on the board not from a separate switch that i asembled.
Being an electronics guy for 50 years, my stomache turns up side down looking at that PP3 battery.... Use a proper power source is what I suggest. Else You have "a few minutes working device".
It (the connector but probably not the battery) evidently comes as part of a "beginners" kit. What was possibly missing from the kit was the matching carrier for six alkaline "AA" cells.
Not that I ever of course, would recommend powering the Arduino via "Vin" or the "barrel jack".
I would suggest that you wire your button without the 5v connection and pull down resistor and use the internal pullup resistor and let the switch pull the input pin LOW when pressed.
I would also recommend that you wire diagonally across the switch. That way you ensure you pick up switched legs and not connected legs.
Yes, it came with the starter kit, and did not think that it would be a problem as it is part of the kit that I bought. When I changed the battery and used the USB cable it suddenly started to work and now I'm able to pick up the signal when pressing the button (thank you very much for the tips). So at this point with a simple code, I was able to make the unit work as it should. Now when I press the button the light for the button turns on and the Arduino knows that the function is on and the light confirms it. So this part is working, see picture:
So now to the second part which Ill try to figure out today... make the Arduino unit open and close the circuit of the valve when pressing the button.
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.