Hello all!
Relatively new to the Arduino world. I recently purchased an Elegoo UNO R3 starter kit and I have worked my way through most of the tutorials with the intent of simulating an ejection seat in my 2009 F150.
My plan is to flip a switch in the truck and have the Arduino move my passenger seat, activate a buzzer (may upgrade to speaker in the future), and flash/light a 12V LED light strip. I may also have a UT distance sensor determine the position of the seat prior to running. Pretty much all of my issues stem from converting 12V to 5V and 5V to 12V. I want to power the Arduino from the ignition circuit in the truck, so it is only powered while the ignition is turned on. The switch to start the "ejection" routine will go to a digital input on the Uno. After an overwhelming amount of research I think I have most things figured out, but I would like a sanity check/ help on a few issues I have below...
- Powering the Arduino via the ignition circuit:
a. I planned to use a EPLZON LM2596S DC-DC buck converter from Amazon to step the voltage down from the 10.2V-14.1V dirty power of the battery to something like 7-11V into the Vin pin on the Arduino. Is the buck converter enough to account for the voltage fluctuations coming from the battery/alternator of the truck? I’ve read a ton of things online about Zener resistors, linear voltage regulators, etc etc, but a buck converter seems to be the simplest in my scenario. I say 10-14V because I have been using an OBD monitor for the last few days and those were the lowest/highest voltages I recorded over a few days of driving. The other option that seems fairly simple is a LM7805 fixed output linear regulator with 2 capacitors, such as shown in the diagram below.
Will either option work? Also, with the Buck converter, does it ouput a fixed voltage regardless of the fluctuations of the input or does it fluctuate with some ratio’d stepdown?
- Stepping down the switch power (12V) to a digital input pin (5V) on the Arduino:
a. On this one, I think I could use either option mentioned above, but in research it seems like an optocoupler might be the best. Something like the circuit below (12v instead of 24v). Will this work in my situation? Also, any issue with using 10k resistors instead of 4.7k? Where this is just an input to the Arduino I don’t think I need much current so this doesn’t seem like it would be an issue (though I am mechanical engineer with just enough electrical knowledge to get me in trouble, so feel free to correct any blatant errors). For some more info, the intent of the switch is that when 12v are running through it the Arduino will take the signal as the “ON” button, and execute the “ejection seat” routine. When I turn off the switch, the Arduino will move the seat back to its original position. I don’t suspect the switch will be engaged very often.
- Problem 3, and what has given me the most difficulty, is my plan for controlling the seat:
a. The passenger seat in my 2009 F150 has 10 way seat control via a 12pin switch/harness (power/ground + the 10 seat movements). My plan is to splice into the back side of the harness (actually I will probably create a second switch/harness in-between that I can splice into so as to not mess with the OEM stuff) and send +12V into the respective pins for the direction I want the seat to move, so to the harness, it looks like the passenger is hitting the switch. I would like to be able to control the seat in 8 of the 10 directions, so my plan was to use a shift register to control this. I was hoping to use the 74HC595 shift register that came with my starter kit, with a P-channel logic level mosfet, but it seems like p-channel logic levels don’t exist (is this by nature of needing a significant difference in voltage between the gate and source, and 0v or 5v is all significant compared to 12v, so how would it know whats on vs off?), and I need to use something like a TPIC6A596 with a p channel mosfet, as suggested by DC42 in the post below.
I gather that I have to use P-channels instead of what seems like a simpler N-channel (like what I will be using for my LEDs) because I need to control the hot side, as there is a common ground for all pins on the switch. Here is the switch diagram. So for example, to move the seat forward, I would send power from the Arduino/shift register to the wire that I splice into pin4.
(Image of seat switch schematic coming in a response to my post, I can only embed three items).
b.First question is, does this seem right for my application? I want to avoid the seat moving for the first few seconds while the Arduino boots up, but I’m not sure how to do this if the output has to be “low” for these to function properly. IE Arduino will automatically turn on the seat switches until it sets the shift register to “high” to turn them off..?
c. Second question is current. I assume that powering the seat will require a decent bit of current, and so I need some beefed up mosfets that can handle the current. Is my thinking correct here? I can’t find much info online, but it seems like powered seats require 5-7amps to move. So I was looking at something like a IROF4905 74A 55v p channel transistor. Will that work? Am I even on the right track here?
Thanks for any help in advance! Sorry the post is so long. I hope my questions are clear. I've been overwhelmed trying to research all of this stuff lately so brain is a little fried trying to keep everything straight...