Automotive (sigh) "Ejection Seat" Simulator Questions:

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...

  1. 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.

image

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?

  1. 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.

  1. 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...

Here is the switch schematic I want to tap into:

Switch:

Harness:

Just use a good quality USB power adapter. You know. The kind that typically plugs into the cigarette lighter plug. The output goes directly to 5V on the Arduino.

2 Likes

Hi, @ogb
Welcome to the forum.

How do you plan to do that without breaking the vehicle safety design regulations.

Probably put a vibration motor under the seat, but don't fool around with the seat anchor points.

Tom... :grinning: :+1: :coffee: :australia:

Maybe not in all legal jurisdictions. These actually came as standard in some car model series:

This can cause problems. Better to step the voltage down to 5V and power the arduino through it's 5V pin. For any other components requiring high currents at 5V, take separate wires from the step-down converter directly to those components so that those high currents don't pass through the Arduino board at all.

The only reason to use the buck converter to make 7-11V is if you need that voltage to power some other component.

Yes, in theory. It can take an input voltage 4-40V. But as you know, power in internal combustion engine vehicles can be dirty/noisy, potentially having damaging high voltage spikes created by the ignition system. A DC-DC converter designed for use in vehicles may provide better protection than other models. Yes, it will (or should!) keep the output voltage stable when the input voltage fluctuates.

I can't see much point in paying extra for one with a display. You're probably going to set it once and then never look at it again. Better to use a multimeter to set the output voltage, then maybe cover the adjustment pot in some way to avoid accidental changes during handling.

@ogb

I'd use a linear regulator but with some additional input protection circuitry and more output filtering. You should supply the UNO with 7-12V to the barrel jack or Vin or 5V through the USB connector. The 5V pin is a regulated 5V output.
The PC817 is good but use a 1KΩ for the LED and use a pull-up on the collector output with the emitter connect to ground.
Controlling the motors will be the most difficult thing because you will need a H-bridge circuit in order to make the motor reverse directions.

We've had this discussion before, Jim. I suggested we agree to differ :wink:

I'm squinting at the diagram, and it looks like the switches are directly handling the current required by the seat motors.

This current might be quite large, so the idea of feeding 12 volts may be harder than you think.

The switches work in pairs: each switch is the ground return for the other switch when that switch is running the motor. This is where the clockwise-anticlockwise is being handled.

So neither can you just use relays in any simple way I am not awake enough to conceive.

You'll be going deeper into this than just hacking the switches.

But… great project!

a7

Wow, thanks everyone for the replies! My thoughts/comments below!

I thought about this, but I want the arduino hidden under the seat, and not pulling power from the conspicuous cig lighter. With the buck converter or linear regulator I should be able to have the arduino completely hidden.

I wont be messing with any seat anchor points, just controlling the power seat motors. My hope is that, to the vehicle, it would only look like the passenger is trying to adjust the seats, as if they are activating the seat switch.

I too thought the 5V pin was an output, not an input? I will need the arduino to ouput 5V in order to control the buzzer and UT sensor, so my plan was to use that as a power output for those items.. Why do you suggest that using the Vin pin at a higher voltage would cause problems? I read that it's suggested input is 7V-12V, with min/max at 6V-20V...?

Thanks for the input on the buck converter! I purchased that one because it was cheap and I liked the idea of seeing the voltage for other projects. It was like $1 more than without the display so I just went with it. I will look into auto-rated components. But also, if it's not a sure thing that I'd fry the arduino, I might just take the chance on this cheapo one haha.

Why would you use the linear regulator instead? It seems like the buck converter does what the linear regulator would do but without me having to add the additional protections/ output filtering?

ok will do, thanks!

I believe the switch circuitry already does that? If you look closely at the switch diagram, I believe all it does it connect power to the pin for the hot side of the seat motor it's controlling. All others are connected to ground so it automatically drives the appropriate direction..?

They do, but aren't all of the grounds connected all of the time? So as long as the switch is connected, I think if I send power to one side of any motor, it will automatically flow back through the switch to ground? This is the part that has me the most worried, as I dont want to fry my truck ECU or anything like that...

Yep, some researching leads me to believe 5A-10A. This has turned out to be WAY deeper than i originally intended, but now i'm in it, so I want to figure it out haha. I believe I can handle the current though if I size all the MOSFETs for that kind of current.

No.

When you press LEFT, the left switch routes 12 volts to the left side of the motor, and the right switch remains connected to ground providing return from the right side of the motor.

When you press RIGHT, the right switch routes 12 volts to the right side of the motor, and the left switch remains connected to ground providing return from the left side of the motor.

I'm still not awake and caffienated sufficiently to see how to do that using MOSFETs, no matter their current carrying capacity, as switching elements.

And the few ideas I have make trash of using the normal switches in the usual fashion, which I am very sure you want to preserve for your F150.

a7

How did you arrive at that conclusion? Do you have the schematic for the buck regulator?

I believe the switch circuitry already does that? so it automatically drives the appropriate direction..?

Yes it does but I thought you wanted to replace the switch functionally with the arduino. Am I wrong?

Damn, is that what the dashed lines represent? My electrical schematic ignorance is showing...

I guess I could power the motors directly with something like an H-bridge? This sounds like its going to become more effort than its worth :cry:

In reading various posts in this forum, it seems like people talk complicated circuits (ie linear regulator, capacitors, resistors, etc etc) or they just say buck converter, so I assumed it handled all that. Also, if it regulates varying voltage to a constant output, I kind of figured it has something that filters out the spikes and noise within it's design. Nothing more than assumptions.

Well my thought was as long as the switch is still plugged in, I could send 12V to one pin and the switch would automatically run the other side to ground via the motor, but per @alto777 's comment above, my understanding of that is wrong.

You need an H-bridge

For your Uno, it's an output if you are connecting Vin to 7~12V. If you are not connecting Vin, it's an input for 5V to power the Uno. So you can adjust your dc-dc converter to 5V and connect it to the Uno to power it. Your other devices can also be supplied by that same 5V from the converter, so their power does not go though the Uno at all.

The problem with using Vin is that if you use that and then use the 5V pin to supply other components, and those components draw more than a small current, the linear regulator on the Uno can quickly overheat and shut down or burn out. It's not easy for a beginner to replace the Uno's regulator, so you would probably have to replace the Uno.

The Uno is a 5V device. It's perfectly natural to supply it with 5V power. But you can't do that by connecting 5V to the Vin pin because the Uno's regulator needs at least 6.5V input to make 5V output. Connecting a 5V power supply to the 5V pin bypasses the Uno's regulator.

Other types of Arduino have different power arrangements, so if you change to a different Arduino board, come back for more advice.

2 Likes

Yes. An H-bridge can run motors both ways.

How would you connect an H-bridge in the OP's circumstances, with the idea that the origianl switches would like to remain usable?

a7

The solution is not so simple.
Consider the case where the Arduino wants to move the seat forward but the driver pushes the back button. There need to be some failsafe safety interlocks so you don't start a truck fire.

I don't see any way to accomplish the goal without powering the motors from H bridges, and rerouting the manual switches through the Arduino.

So there'd be only one way to actually provide power, and some intelligence available that could run interference on competing ideas of which motors should move which way or at all.

Def heavily into warranty voiding activity.

a7

Dang, yea I think that's getting into more effort than I want to put in :cry: I really appreciate the help though! I guess the ejection seat will just have lights and sounds for now unless I can think of some other creative things to do!