The right approach to a project

I'd like to run through the feasibility/approach of my first arduino project.
It will be in my old campervan and will be used to control interior lights and intermitant wipers. The key is the intelligent interior lights.

Key fob to turn a relay on to hard power the arduino on. I dont want it on when the van is sitting - paranoid about draining battery.

I was going to run it all my monitoring Millis, (I'm not going to drive the van for 50 days without turning it off so i dont need to worry about it overflowing.

As the arduino turns on interior lights soft fade to on ( if(currentMillis - previousMillis > interval) ), increment by variable y each loop, once full brightness is reached set y to 0.

After a certain amount of time or 12v ignition is detected on a pin the lights fade down, so i set y to negative, when lights dim to eventually turn off, set y to 0.

A potentiometer then controls the size of an interval for intermittent window wipers.

When ignition is then turned off the lights fade up

second channel on key fob turns a relay that is sensed by the arduino to do a lights fade down and then flick a relay to power itself off.

I'm bound to add more functionality but that was my initial plan.

Thanks in advance

Sounds feasible and the approach is described well.
Time to flesh out more of the design.
If create a standalone arduino, you will have more control over the power consuming parts that do not go to sleep (i.e. leave them off: power LED, USB interface, and use a high efficiency switching regulator to make 5V vs power draining linear regulator) and put the atmega into power down sleep mode after ignition turn off vs hard power down, then use hardware interrupt to wake up & start the lights fade-on.

Here's a similar topic with some discussion you'll find relevant:

Especially, read the second page where I try to convince the world that using relays to power-save is not the best approach. :wink:

Here's my proposal for a reasonable car PSU:

Man, Carduinos are hot right now. Maybe I should start a playground page.

Wow, what an active forum!
Thanks for the swift replies, what would be the advantage of soft off instead of just cutting the power?

Looks like i need to do some research on filtering/controlling the inputs (signals and power) to be safe to plug into the arduino.

Anyway, I'll have a crack at writing some code and get back to the forum with the results.

Thanks again


Key fob to turn a relay on to hard power the arduino on. I dont want it on when the van is sitting - paranoid about draining battery.

What is the key fob going to be communicating with? What is toggling the relay? The Arduino can't turn itself on the way you describe.

I have a 2 channel, wireless remote that has a key fob which turns the relays on and off, this is where the power to the arduino was coming from.
Any advice about the benefits of sleep mode vs hard power off

Where does the key fob receiver get its power from? It has to run all the time, yes?

You skipped quickly through the fade up the lights" part.
I assume you'd like to do this with the Arduino analog out, i.e. PWM.
Depending on the number of bulbs, the current can get significantly high.
You'll need some power Darlington transistors, NPN type so you can switch them on with a 5v Arduino pin, yet they control a big current from 12v through the lamp(s).

Alternatively, LEDs are way brighter and can be driven directly from Arduino pins.
If it's acceptable to have these "additional" lights, hopefully neatly mounted or hidden, you can save yourself some trouble and get things up quickly.

Yes the key fob receiver would be on all the time. I was planning to use LEDs directly out of the aduino pins.
Hmmm, not sure I want the receiver on all the time, will have another think.
Thanks again