computer control

First, this project is fantastic, I found it today and bought one on the spot (from sparkfun). Kudos to all involved.

To business. I have an old dell (700 mhz, running Gentoo with acpi and suspend2 support) that is going in my car to play music. The idea is to have a jukebox in the car, that I can update over wireless from my main computer, so I always have all my music with me. The Arduino is hopefully going to handle power on/off events and control a little serial LCD if I have enough pins left over that displays the currently playing song. I know that I am in WAY over my head, my degree is in IT and I've never done an electronics project of this scale before, so I'm hoping for a little sanity check from you all to let me know if this is even possible.

The LCD part I don't think I'm going to have a problem with, it is well documented all over the place, but the power problem, not so much. I have a 12V DC/DC power supply I bought from mini-box.com (pico PSU) rated at 120W but I very much doubt the computer is drawing near that, the AC PSU that came with the dell is only a 90W, and I've ripped almost everything out of the box except the motherboard and the hard drive (I did add a wireless PCI card though).

The goal is to have the Arduino sense power on the accessories line of the car (+12V whenever the key is in) and activate the power supply. A few seconds later, send a pulse to the power switch of the computer, turning it on. When the car is turned off (ACC line drops to 0), do the opposite, send a pulse to the power switch telling the computer to hibernate, and then a few seconds later, disable power to the power supply.

Questions: Not being an electronics guy, how do I step down the 12V from the accessories line on the car to the 5V (I'm assuming) that the Arduino can handle so it knows when the car is on. Or can the Arduino handle 12V on an input somewhere, so this is a non-issue?

Which is more appropriate for use to control the PSU? a relay/transistor/scr or something else entirely I've never heard of? And as a corollary, if anyone has done something like this before, what did you use? while my googleing skills are pretty good, I don't really know what I'm looking for, much less where to start looking for it (digikey/mouser/jameco/somewhere else)

And last but not least, is this even possible, and with my limited experience doing something like this, is it even within the realm of something I'll be able to handle on my own?

Thanks all, Elliott

Well here's the point, find the circuits you need first ;)

You will need something like LM7905 and two capacitors to generate regulated 5v from your 12v (all DC) source. As for controlling the 12v for the computer, you'll probably want to look into a solid state relay (unless someone has a better idea?). In both cases all the circuits should be widely available on the net. I'm pretty sure you can find both on http://www.epanorama.net/, but google is your friend, as always. As for a pin count, you have more than enough for the serial LCD and the relay(s). You'll probably want to had a few buttons or a keypad too for control (play/pause, next, prev, etc) and maybe an analog input or two for the lcd and volume. If you ever run out of I/Os, have a look at the Shift register tutorial and keep in mind that it is possible to do the same with inputs too. Lastely, if you haven't already I'd suggest you have a look at the Wiring electronic ref, for some quick examples.

And obviously, check the forum and playground a lot of common answers are posted there.

Have fun ^-^

how do I step down the 12V from the accessories line on the car to the 5V (I'm assuming) that the Arduino can handle

make a voltage divider with two resistors ... only three cents.

+13.8 V accessory line---------8.8K ohms--------5V signal here---------5K ohms-----------GND

you might want a 5V zener in there, just in case.

Hej,

if you plan to use relays to switch the power on the supply to your computer, you could take a look at the following drawings explaining how to drive a relay using a transistor from Arduino:

and

You can find the high resolution version of those sketches at:

/David

I've got a similar project in the works, only I need to send commands to a radio via RS232.

You want to power the arduino with a voltage regulator, but there's one built in to the arduino NG so you can hook up your car's 12V system to the coax power jack (or the "9V" input header). Make sure you move the power select jumper so that you're getting Vcc from the regulator instead of the USB connector. You may also need to add a resistor (10k or so) between pin 0 and ground to keep the bootloader from hanging up the arduino.

For your power sense circuit, use a voltage divider as shown above to feed the analog input pin. Don't try to power the arduino with a voltage divider especially in a car, as there are wide voltage swings (from 10V to near 20V every time you start the engine) that would cause problems.

In addition to switching the load with a relay you can find solid state switches, some of which are designed to take TTL levels directly and switch large loads up to 40A or more. Some example part numbers are

IPS5451L VN820

These are 5 lead devices and will need a heatsink to switch maximum loads.

I've got one of these http://www.aprsworld.com/apo2/ which performs load switching based on vehicle system voltage. That has since been replaced by a relay-based model http://www.aprsworld.com/apo3 This might be a useful project to get ideas for the load switching part of your circuit.

You can also switch the load with a small transistor turning on a bigger transistor, and the big transistor would switch the load to your power supply. The power switch ICs just mentioned are basically this arrangement in a single package.

-j

You'll probably want to had a few buttons or a keypad too for control (play/pause, next, prev, etc) and maybe an analog input or two for the lcd and volume.

I actually have a very tiny usb thumbpad that's going to be handling all the input to the computer, the volume will be controlled by the head unit in the car (computer will be turned all the way up, and I will adjust the volume on the head unit as necessary)

Thank you all for the tips, going to decide which methods I'm going to use and start sketching things out today.

The apo3 schematic is here: http://www.aprsworld.com/apo3/apo3_schematic.pdf and his bom is http://www.aprsworld.com/apo3/tech.php#bom

my understanding of that schematic is he has his pic controlling 1 transistor http://www.digikey.com/scripts/DkSearch/dksus.dll?PName?Name=568-1369-1-ND and 1 relay http://www.digikey.com/scripts/DkSearch/dksus.dll?PName?Name=Z208-ND

Which is exactly what I'm trying to do? Although I don't understand the point of R6 on his diagram, 10k resistor? And you have a resistor in your diagrams as well David, is that to prevent the Arduino from overpowering the transistor?

If you use a relay, be sure to connect a protection diode reverse biased across the relay coil, as illustrated in this diagram:

This will protect the transistor from harmful voltage surges when the relay is turned off.

Just got back from holidays with the parents and found my shiny new arduino waiting on the steps for me :-)

Here is what I'm building for the "is the car on" circuit http://www.tkk.fi/Misc/Electronics/circuits/psu_5v.html (actually have a 7805 laying around from some other failed project, will that work smurf? you said 7905)

Thanks Kitty, I went to school with an electrical engineer, he told me the same thing :)

(actually have a 7805 laying around from some other failed project, will that work smurf? you said 7905)

I'm not smurf, but a 7805 will work. A 7905 is a -5V regulator which won't work for this application. I suspect 7905 in an earlier post was a typo.

-j

I suspect 7905 in an earlier post was a typo.

It was, my bad! 7805 is the proper IC.

I'm not smurf

Aren't we all Smurfs? :P