Alternative power switch?

A place to talk about all the Operating Systems, Software & Hardware
Forum rules

- Posts are to be made in the relevant forum. Users are asked to read the forum descriptions before posting.

- Members should post in a way which is consistent with "normal writing". That is users should not post excessive numbers of emoticons, large, small or coloured text, etc. Similarly users should not SHOUT or use excessive punctuation (e.g. ! and ?) in topic titles or posts.

- Members should use an appropriate, descriptive subject when posting a new topic. Examples of bad subjects include; "Help me!", "I'm stuck!", "I've got an error!", etc. Examples of good subjects include; "Getting an TABLE FULL error upon login", "Cannot restore a backup".

- Members are asked to post in English only so that posts can be well received and properly monitored.

- Spam is not tolerated here under any circumstance. This includes offering hosting services (charged and free), installation services, solicitation etc. Recruiting members for your own projects (moderators, designers, professional MOD work, etc.) is not permitted and is also considered spam. Users posting spam will be warned and their post removed.

- Members should post in a way that is respectful of other users. Flaming or abusing users in any way will not be tolerated and will lead to a warning. Vulgar language and inappropriate material is not allowed and will be removed. We try to maintain a family friendly atmosphere whenever it is possible within the main subject matter of this community. Please keep this in mind when participating.

- Each user is allowed to create one account. If you would like to change your username, please contact us and, most likely, we can do it for you while you can keep all of your profile data, posts, and other content.

- If a user violates our guidelines and shows a disregard for them, our staff and our community, they run the risk of losing their account. We reserve the right to deactivate any account and to edit or remove any content without warning. These guidelines are subject to change at any time without notice.

Thank you for visiting LattePanda.com!
Post Reply
User avatar
kalum98dm1
Posts: 1
Joined: Wed Oct 04, 2017 3:28 am

Wed Oct 04, 2017 3:39 am

I am using the LP for a car PC/ head unit... i have it figured out to where the LP powers on when i turn the key, i am looking for a way to maybe power the Lp down safely once i turn the key back off maybe using Arduino or the remote wire. Is there a way to wire a button via Arduino or sensor connectors?

User avatar
LazyBunny
Posts: 65
Joined: Mon Oct 24, 2016 10:38 pm
Location: USA
Contact:

Wed Oct 04, 2017 11:46 am

This is not an easy to fix problem. Since you need it to remain powered for a short time after the car is off.
I can give you a solution if you aren't using Auto-On, with the panda, but you'll still need to use a power button to start it up. But it'll turn off automatically. But if you have it set to turn on automatically when powered, then this solution won't work for you.


Using a couple Li-Ion cells in parallel, with a 3.7v to 5v charge/boost board. (not li-poly), make/buy a UPS for the panda. Really it only needs to keep it on for a couple minutes.
Program the arduino so it reads 5v through an analog pin from your 12v->5v adapter, on the 5v side.

Ok here's how it works. The UPS will keep the panda on for a minute or so when the car shuts down. The arduino will sense that the power to the UPS Charge board was cut, and the arduino is programmed to work as a keyboard HID. That will then send a shutdown command to windows (like the shutdown key on a pc keyboard). Which will cause the panda to shut down.
The battery should be enough to keep it going in case of a long shutdown.

The only auto-on solution i can think of, is using a mechanical relay that is powered by both the arduino AND the 5v power source. And programming the arduino to check for a system response from windows, and if it doesn't receive anything for 2-3 minutes, to cut the relay (setting the pin low). (A suicide relay)
Where as if the car is on, the relay will be enabled by the car's 5v source for the panda/charge board. So i'll get power from the car and/OR the arduino.


I've used suicide relays in projects before. The way i'd do it, is i'd press a power button to a microcontroller, wait until the microcontroller passes it's boot loader and enables the relay, bypassing the power button. (i just hold the power until it clicks) and then when the microcontroller is ready to suicide, it just brings the relay low and it cuts the power.

Edit: http://www.ebay.com/itm/192001811155
Here's a relay module. the IN goes to a gpio, and then the VCC goes to the panda's 5v, like from one of the CN2 connectors.

Don't want to run a relay coil right from the gpio, they draw too much current so a transistor driver, like in those modules, is the way to go.
My Gameboy: http://imgur.com/a/lhY1x
My SBC Joystick: http://imgur.com/a/vtc5C
My Rockin' Dreamcast: http://imgur.com/a/kI50p
I'm Kiera, the Laziest Bunny in all of Bunny Town.

User avatar
gwynethh15
Posts: 14
Joined: Tue Mar 13, 2018 1:47 pm
Location: Maine USA

Wed Feb 05, 2020 12:45 pm

Check out using a DCDC NUC car PC power supply. It is "smart" and can control start up delay and shut down. We have it set to send power to the auto start Delta 10 secs after car Ignition hot and shut down (by USB signal) the Delta some time after car turn off.

Post Reply