Pages: [1]   Go Down
Author Topic: The right approach to a project  (Read 1105 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 22
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Neal
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 533
Posts: 26934
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Anchorage, AK
Offline Offline
Edison Member
*
Karma: 42
Posts: 1176
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

http://arduino.cc/forum/index.php/topic,105600.0.html

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

Here's my proposal for a reasonable car PSU:

http://arduino.cc/forum/index.php/topic,106068.0.html

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

Offline Offline
Newbie
*
Karma: 0
Posts: 22
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,
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

Neal
Logged

Seattle, WA USA
Online Online
Brattain Member
*****
Karma: 610
Posts: 49023
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 22
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Cheers
Neal
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 533
Posts: 26934
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Full Member
***
Karma: 0
Posts: 162
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Offline Offline
Newbie
*
Karma: 0
Posts: 22
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Pages: [1]   Go Up
Jump to: