How to interface Arduino to a (real) car

Hi. I’m new here, relatively new to electronics and microcontrollers but fortunately long term programmer. I’ve been asked to do a small project by a friend and would like some advice on how to go about it. This friend has a very expensive ‘slide on camper’ - one of those things that can slide onto the back of a 4wd pickup and be used for camping in remote locations. The roof is extended upwards when camping, and lowered when driving. The problem is that it’s impossible to know if the roof is up or down when in the car, even the driving characteristics don’t make it obvious, so he lives in fear that one day he will forget to lower it, not notice, and drive off. Catastrophic when he meets a low clearance bridge.

The ideal solution would be something in the cab of the pickup that buzzes or flashes lights when the driver starts the engine and the top is not down. A sensor or two will tell us when the top is down, but how would you interface that to the car so the driver gets the warning. I have done various searches for connecting to cars but only come up with model cars - not real cars.

We would also like that the minimum intrusion is made into the car electronics as possible - new car warranty reasons plus not wanting to get stuck in the outback because of my beginners approach.

So how would you meet this need. I have an Arduino UNO and a wide range of sensors etc.

Cheers
Arron

how is the electric connection done between the camper and the pickup? Any chance to use free pins on that socket?

1 Like

The simplest idea with least component p.s. would be fail safe.
A simple micro switch wired to fail ‘on’ would be the safest.

One wire plus chassis 0v return would gibe you a signal to drive a buzzer and lamp in the cabin,

Add other switches off the ignition, transmission and park brake will provide an interlock to avoid false alerts.

Does it have a USB port in the console?

noiasca
He did mention that there wouldnt be a problem getting wires from the car to the camper. Whether that is via unused pins in the socket or just running another wire along the harness I didnt enquire.

jim-p.
yes, there is a USB socket in the car. I expect there is one in the camper as it has everything else.

lastchancename
yes, fail on is essential. Its far better to receive a false signal then to wreck your camper. The camper is some type of hybrid carbon fibre construction so no chance of chasis return but not really an issue. I dont really understand your final sentence.

The wiring to and from the sensor is not really the problem. My main issue is how to interact with the car without interfering with the warrantee or the reliability of the vehicle. Is there some type of sensor for example that will detect current flow in the ignition wire without having to chop into it.

For sensors, I was thinking maybe have two for a bit of redundancy. Maybe a hall sensor and a magnet, and a tilt sensor or something. I guess there are many options there.

Its also important that the device that provides the warning (led on dashboard, buzzer, or whatever) only works when youre actually starting the car. If it runs at other times then the driver may become accustomed to it.

I should also point out that im in Australia, and my friend uses this rig to wander all around the outback, so sometimes hundreds of kilometers from any help if something goes wrong. I cant really imagine what could go wrong with this little device that would cause him to need help in an isolated spot but its better sure then sorry.

and thank you all for your responses.

When you mention someone in your reply, put @ before their name and they will get notified. Like this: @noiasca @jim-p @lastchancename

1 Like

Then USB is your source of 5V power, no need to dig into the wiring.

Simplest option (in my humble opinion)...
Get a cheap 12v wireless relay set (keyfob and receiver relay). They are next to nothing.

Keyfob

Get an old car cig lighter assembly/housing and install the receiver inside with a small buzzer/piezo etc
That will work fine if the cigarette socket is on the ignition. Just remove it to turn it off. If you add a switch, he might forget to 're-arm' it.
Alternatively, run it off the 5v USB you have.

As for the sensor... may nothing more technical than a tilt switch soldered onto the keyfob button pcb.
3d print a housing + mounting bracket that it slots into and you are done.

when I assume you can run wires from the camper to the pickup, I don't see the need of any "Arduino".
Plain switches + Signals.
When the top gets opened, the switch closes
When the ignition is turned on, and the switch is closed, ring a 12V bell.
When there is no camper on the pickup, the circuit doesn't get closed and the 12V bell will not ring.

Problem solved.

1 Like

Ok thanks.

Yep, that sounds perfect. Simpler the better.
So a normally open switch on the camper, a 12 volt noise maker, and wire it into the ignition switch.
And when the camper comes off - well that’s covered too.
Thanks

Thinking about it further, there are probably times when he wants to run the car when camped - maybe to run a generator or the air conditioner. Diesel vehicle so can run these things idling. That makes it difficult.

Working with similar safety and designing "alarms" the failsafe filosophie is this way: Don't detect alarm conditions. Create a "clear to go" line of brakers, relays, wires...
If connecting a cable is forgotten, if a relay or swich fails, there will be no "clear to go".

make an extensive list of all conditions you want to have solved.

that would be illegal in my country anyway.
However there will be ways to detect the moving car or a simple in gear/ parking / neutral also.

No wires required
RV Steering Wheel Reminder

I’m still not sure why adding a level of complexity and dubious reliability is needed.
Switch/sensors wired sensibly… buzzer & light.
No computer or software needed.

You could mount a red light that turns on when the top is open, then power it from from one of the cables in the connector so it energizes when the ignition, brakes, lights or whatever is energized.

@lastchancename
agree now. The simpler the better.

Simple?

Post-it note on the dash when you park up

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.