The MP3car.com Store  

Welcome to the MP3Car.com forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. Registering will also remove advertisements. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

Go Back   MP3Car.com > Mp3Car Technical > Power Supplies

Reply
 
Thread Tools Display Modes
Old 03-27-2008, 02:51 AM   #1
Newbie
 
Join Date: Sep 2006
Posts: 41
My Photos: (0)
AVR based laptop startup/shutdown controller

I'm going to be using a laptop in my latest carpc, unfortunately its battery is totally dead so I'm designing a startup/shutdown controller which will act in very much the same way as the normal pc car power supplies.

When it senses ignition it will start the pc up by connecting some relays, when ignition is lost it will shut the pc down and after about 30 seconds will kill power totally to stop the pc draining the battery.

This is my schematic so far, anybody have any suggestions / comments?

Shad0wca7 is offline   Reply With Quote
Sponsored Links
Old 03-27-2008, 04:33 AM   #2
Raw Wave
Rob Withey's CarPC Specs
 
Rob Withey's Avatar
 
Join Date: Apr 2000
Location: Surrey, UK
Vehicle: '97 Vauxhall Corsa 1.5 TD
Posts: 2,009
My Photos: (0)
Instead of daisy chaining the relays for the main power like that, why not just use a transistor to switch the larger relay. I assume you did it that way because you didn't think the AVR output could drive the large relay directly. It's clunky the way it is.

I think you chose a device with a few too many IO pins, also. My first shutdown controller used a 12c508 (8 pin device), my next one (which includes a bunch of I/O and servo controllers) uses only a 16 pin device (16f88 IIRC). A 40 pin device is huge for such a simple task.

D2 is kinda redundant. I usually do reverse polarity protection by relying on the fuse popping when the zener forward conducts (or another diode in parallel). This just reduces the voltage drop before your circuit gets the juice (all kinda academic since you are using a linear regulator anyways).

You might want to put a pull down resistor on ignition sense too.

Relays are noisy for switching. A lot of power-switch-press circuits just ground out one of the power switch leads with an NPN transistor or FET. Much cleaner design that way, and less noisy, lower power, smaller, more reliable, etc... Similarly for the main power switch. Might I recommend a high side driver or FET.
__________________
6yr old first install died 20/8/2005 as result of bad bios flash.

New system : 6x5x2" contains 1GHz C3 PCM9373, ISR based PSU, 512Mb flash DOM, 8Gb CF HDD, 98Lite, DirectShow based frontend.
GPS : Rikaline 6010.
Display : LTM08C351 + LVDS receiver.
Rob Withey is offline   Reply With Quote
Old 03-27-2008, 06:56 AM   #3
Newbie
 
Join Date: Sep 2006
Posts: 41
My Photos: (0)
Thanks for the input Rob, some great suggestions which I'm going to use so standby for a redesigned version using transistors. Although won't there be the risk of a massive transient going through the transistor which will be activating the laptop PSU relay?

The Mega16 is WAY overspecced for this I agree, there are 2 main reasons I am using it at the moment: 1) I have a few of them lying around 2) I have a Tiny84 which I will probably be using (even that is overkill) but I don't have an Eagle library for it.

I was going to use the internal pull-down resistor for ignition_sense, I also figured that D2 won't harm (and won't cost me anything) so any extra protection is worth a squirt.
Shad0wca7 is offline   Reply With Quote
Old 03-27-2008, 07:10 AM   #4
Raw Wave
Rob Withey's CarPC Specs
 
Rob Withey's Avatar
 
Join Date: Apr 2000
Location: Surrey, UK
Vehicle: '97 Vauxhall Corsa 1.5 TD
Posts: 2,009
My Photos: (0)
Quote: Originally Posted by Shad0wca7 View Post
Although won't there be the risk of a massive transient going through the transistor which will be activating the laptop PSU relay?

Snubber diode? I just assumed you omitted them because they are always taken for granted with inductive loads (even your small relays will have some inductive kick on release).
__________________
6yr old first install died 20/8/2005 as result of bad bios flash.

New system : 6x5x2" contains 1GHz C3 PCM9373, ISR based PSU, 512Mb flash DOM, 8Gb CF HDD, 98Lite, DirectShow based frontend.
GPS : Rikaline 6010.
Display : LTM08C351 + LVDS receiver.
Rob Withey is offline   Reply With Quote
Old 03-27-2008, 07:13 AM   #5
Newbie
 
Join Date: Sep 2006
Posts: 41
My Photos: (0)
Actually I forgot to add them for the relays!

What I meant on my previous post was possible transients coming from the actual car power source which the transistor will be connected to?
Shad0wca7 is offline   Reply With Quote
Old 03-27-2008, 07:25 AM   #6
Raw Wave
Rob Withey's CarPC Specs
 
Rob Withey's Avatar
 
Join Date: Apr 2000
Location: Surrey, UK
Vehicle: '97 Vauxhall Corsa 1.5 TD
Posts: 2,009
My Photos: (0)
Quote: Originally Posted by Shad0wca7 View Post
Actually I forgot to add them for the relays!

What I meant on my previous post was possible transients coming from the actual car power source which the transistor will be connected to?

If you're not comfortable designing with transistors then stick with the relays.

I don't know what you are referring to with the transient thing. Just get a transistor that can handle sufficient Vce (assuming bipolar) involved. I'd switch that relay with an NPN bipolar with the emitter grounded, suitable base resistors and relay coil between the collector and power source. When the base saturates, the collector goes to about 1 diode drop above ground and the relay switches. Whatever you do, don't go for an emitter-follower when switching with logic levels - big waste of time.

Actually, I wouldn't (and didn't) swtch a relay. I use a high side driver.
__________________
6yr old first install died 20/8/2005 as result of bad bios flash.

New system : 6x5x2" contains 1GHz C3 PCM9373, ISR based PSU, 512Mb flash DOM, 8Gb CF HDD, 98Lite, DirectShow based frontend.
GPS : Rikaline 6010.
Display : LTM08C351 + LVDS receiver.
Rob Withey is offline   Reply With Quote
Old 03-27-2008, 07:30 AM   #7
Raw Wave
Rob Withey's CarPC Specs
 
Rob Withey's Avatar
 
Join Date: Apr 2000
Location: Surrey, UK
Vehicle: '97 Vauxhall Corsa 1.5 TD
Posts: 2,009
My Photos: (0)
More info on the high side driver I use. It's a VN30N. This is the datasheet :http://www.ortodoxism.ro/datasheets/...cs/mXryrqt.pdf
__________________
6yr old first install died 20/8/2005 as result of bad bios flash.

New system : 6x5x2" contains 1GHz C3 PCM9373, ISR based PSU, 512Mb flash DOM, 8Gb CF HDD, 98Lite, DirectShow based frontend.
GPS : Rikaline 6010.
Display : LTM08C351 + LVDS receiver.
Rob Withey is offline   Reply With Quote
Old 03-27-2008, 07:33 AM   #8
Newbie
 
Join Date: Sep 2006
Posts: 41
My Photos: (0)
The high side driver is pretty impressive, I think for now though I'm going to stick with using transistors and relays, I have not really used transistors before so now is a goot time to learn and apply. New schematic coming soon.
Shad0wca7 is offline   Reply With Quote
Old 03-27-2008, 08:03 AM   #9
Newbie
 
Join Date: Sep 2006
Posts: 41
My Photos: (0)
Ok, how does this look:


I decided I didn't want to rely on the internal pulldown so added one. The cascaded relay is no longer present, instead driven by a transistor that should have no problem driving the coil. Snub diodes have also been added.

I'm not sure how to go about removing the power switch relay alltogether and replacing it with a transistor to short the contact... do you mind giving me a few pointers with that?
Shad0wca7 is offline   Reply With Quote
Old 03-27-2008, 03:47 PM   #10
Raw Wave
Rob Withey's CarPC Specs
 
Rob Withey's Avatar
 
Join Date: Apr 2000
Location: Surrey, UK
Vehicle: '97 Vauxhall Corsa 1.5 TD
Posts: 2,009
My Photos: (0)
Quote: Originally Posted by Shad0wca7 View Post
Ok, how does this look:

Looks good.
Quote: Originally Posted by Shad0wca7 View Post
I'm not sure how to go about removing the power switch relay alltogether and replacing it with a transistor to short the contact... do you mind giving me a few pointers with that?

Most power switches are between a signal line and ground. You can replace them with an open collector NPN transistor just like the ones you are using to switch the relays.

The relay is more portable in that it will work when the power switch is not configured in this way - might be best to stick with the relay.
__________________
6yr old first install died 20/8/2005 as result of bad bios flash.

New system : 6x5x2" contains 1GHz C3 PCM9373, ISR based PSU, 512Mb flash DOM, 8Gb CF HDD, 98Lite, DirectShow based frontend.
GPS : Rikaline 6010.
Display : LTM08C351 + LVDS receiver.
Rob Withey is offline   Reply With Quote
Sponsored Links
Old 03-27-2008, 05:34 PM   #11
Newbie
 
Join Date: Sep 2006
Posts: 41
My Photos: (0)
I think I might be getting slightly confused about using the transistor to short the wires, would this work correctly or am I on totally the wrong path:?
Attached Images
 
Shad0wca7 is offline   Reply With Quote
Old 03-27-2008, 07:07 PM   #12
FLAC
Curiosity's CarPC Specs
 
Curiosity's Avatar
 
Join Date: Mar 2004
Location: Florence Yall, BFKY
Vehicle: 98 Trans Am
Posts: 1,701
My Photos: (3)
I think you should add a few simple things that you could implement later in code, like a little resistor divider to constant on ADC0 to monitor the battery voltage since yours is dead. Then put IGN on ADC1. A button for manual startup/shutdown. An LED for some feedback. And use the serial I/O for talking to the PC. You'll have more ideas after that.
__________________
XPort 1.24 -GPS port splitter, logger, and USB device resume fix
Curiosity is offline   Reply With Quote
Old 03-27-2008, 10:42 PM   #13
Constant Bitrate
 
Join Date: Jun 2006
Location: Chicago, IL
Vehicle: 2000 VW Jetta VR6
Posts: 143
My Photos: (3)
wow, I'm surprised you ended up using such a weird solution for power button driver. First of all, the power button will accept standard ACPI signal, and since you work with 5VDC already, all you need is just one tiny transistor with pull-up resistor that will make ~0.5ms 0V pulse.

Instead of regular relays, I'd use solid state relays that typically can handle at least 10Amps, you don't need any high-end SSR, just get the cheapest one with triac output.

Your avr may die if you use relays directly, either from overcurrent on IO line or voltage peak from coil transient.

Since you use avr, you can actually implement your battery voltage monitoring (avr has ADC inputs), I think it could be cool feature.

Look also for AVR Butterfly, it's a cheap development board with LDC display and atmega169, it would simplify whole project a lot.
__________________
EPIA TC 1G 256MB 60GB Linux,WindowMaker, Roadnav, Xine, XMMS, iGuidance3
Lilliput 8", Pharos i360, WUSB11v2.6 WiFi
dupa2 is offline   Reply With Quote
Old 03-27-2008, 10:55 PM   #14
FLAC
Curiosity's CarPC Specs
 
Curiosity's Avatar
 
Join Date: Mar 2004
Location: Florence Yall, BFKY
Vehicle: 98 Trans Am
Posts: 1,701
My Photos: (3)
Actually, all you need is a diode for the power button. If it works like a PIC, and I think it does, when off and set to output a digital line pulls to ground with the internal transistor. You just have to make sure it's on the whole time when the main relay is on. I used that for 8x8 LED matrix displays.
__________________
XPort 1.24 -GPS port splitter, logger, and USB device resume fix
Curiosity is offline   Reply With Quote
Old 03-28-2008, 02:28 AM   #15
Raw Wave
Rob Withey's CarPC Specs
 
Rob Withey's Avatar
 
Join Date: Apr 2000
Location: Surrey, UK
Vehicle: '97 Vauxhall Corsa 1.5 TD
Posts: 2,009
My Photos: (0)
Quote: Originally Posted by Shad0wca7 View Post
I think I might be getting slightly confused about using the transistor to short the wires, would this work correctly or am I on totally the wrong path:?

That's about what I use. The pullup is on the motherboard though, and the grounded switch line is not needed (only one line is needed).
Quote: Originally Posted by dupa2 View Post
wow, I'm surprised you ended up using such a weird solution for power button driver. First of all, the power button will accept standard ACPI signal, and since you work with 5VDC already, all you need is just one tiny transistor with pull-up resistor that will make ~0.5ms 0V pulse.

Like the circuit he posted above?
Quote: Originally Posted by dupa2 View Post
Instead of regular relays, I'd use solid state relays that typically can handle at least 10Amps, you don't need any high-end SSR, just get the cheapest one with triac output.

Like the high side driver I linked to (VN30N).
Quote: Originally Posted by Curiosity View Post
Actually, all you need is a diode for the power button. If it works like a PIC, and I think it does, when off and set to output a digital line pulls to ground with the internal transistor. You just have to make sure it's on the whole time when the main relay is on. I used that for 8x8 LED matrix displays.

True, if you can get it to pull low enough.
__________________
6yr old first install died 20/8/2005 as result of bad bios flash.

New system : 6x5x2" contains 1GHz C3 PCM9373, ISR based PSU, 512Mb flash DOM, 8Gb CF HDD, 98Lite, DirectShow based frontend.
GPS : Rikaline 6010.
Display : LTM08C351 + LVDS receiver.
Rob Withey is offline   Reply With Quote
Sponsored Links
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
startup/shutdown controller for laptops available? ideal2545 Laptops, Tablets, UPMCs, etc. 1 08-25-2006 05:50 PM
Newbie asks ? Laptop based carputer vs desktop pc based carputer SAScooby General Hardware Discussion 2 03-01-2004 01:59 PM
Anybody want to show a laptop based setup? blaster General Hardware Discussion 8 12-19-2003 07:08 PM
OPUS startup/shutdown controller problem... rbarr110 Power Supplies 1 11-14-2003 11:38 PM
mp3 player kit / controller based Talldude4evr General Hardware Discussion 2 06-05-2003 09:02 AM


All times are GMT -5. The time now is 03:25 AM.


Sponsored Links
The MP3car.com Store

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0
Copyright © 1999 - 2008 Mp3Car.com Inc.
Ad Management by RedTyger
Message Board Statistics