Power on / off Hardware and Software Methods

R

Richard

Topic is more hardware than software.

Does anyone have a clever way to tell XPe to do a normal shutdown when
Primary power is lost?

Example: Battery Power running to device all the time, Power from Ignition
Switch running to box. When Ignition is turned off, tell XPe to save
everything and gracefully power down. When Ignition is turned on, Xpe
reboots.

This seems pretty easy off the top of my head. Monitor a digital input and
have software tell XPe to shutdown. If XPe is sitting there stating "It's
okay to shutdown your computer" screen then that's not really a power down.
How would one power it back up and have XPe reboot.

Possibly a timer relay activated by Ignition switch? Ignition power
activates the main power relay and always keeps it going, but when Ignition
is cut off, the timer relay delays for a minute or two, then disconnects
main power?

Any other clever ideas?
 
S

Slobodan Brcin \(eMVP\)

Hi Richard,
Does anyone have a clever way to tell XPe to do a normal shutdown when
Primary power is lost?

Well normal shutdown in not a problem you have api functions for that and xpepm.dll that came with XPe for some cases.

But detecting power loss is another thing, can you do that?

Regards,
Slobodan
 
H

Howard Smith

Richard

Check out http://www.mini-box.com/itps.htm this may be of use to you. A
circuit diagram and PIC source was available also from them some time ago.

Howard

Slobodan Brcin (eMVP) said:
Hi Richard,


Well normal shutdown in not a problem you have api functions for that and
xpepm.dll that came with XPe for some cases.
 
R

Richard

Our systems are battery operated.

I would run the main power wire directly from the battery then I would run a
wire from the panels on/off switch.
The Panels on/off switch would latch a timer relay for the main power and
allow the system to boot. If the power switch was turned off, the timer
relay would keep Main Battery power on until the timer expired.

Xpe/My Application would monitor a digital input that is coming from a
voltage comparator. So if the external voltage was getting below a certain
point Or If the Panel Switch was turned off, XPe would start do a normal
power down and at the same time the timer relay would start timing to
disconnect. XPe would finish shutting down and eventually (2 minutes) the
timer relay would expire and disconnect power to the SBC.

Our systems don't have ATX power supplies nor do they support Advanced power
management. So the above was the best way to figure it out.

The ITX power board looks cool and is designed for this purpose but it
doesn't fit our voltage/temp requirements.





Slobodan Brcin (eMVP) said:
Hi Richard,


Well normal shutdown in not a problem you have api functions for that and
xpepm.dll that came with XPe for some cases.
 
S

Slobodan Brcin \(eMVP\)

Hi Richard,

The easiest hardware interface I can think of right now can be made using RS232 or Parallel port.

I would use RS232 (if you have it of course) use one opto-coupler to separate comparator from device and to drive one of (any)
control inputs of RS-232. You can have driver that will pool state of input pin at each second and if low power is detected then you
can initiate shutdown, .....

About hardware for shutting down device, I would choose another opto-coupler (or dual opto-coupler in one case) connect this to
relay and opto-coupler should be connected to one pin that will change state when you want shutdown.
Simple driver that you write can wait that all filesystems and other "relevant drivers" are closed and then initiate shutdown pin
state change.

Best regards,
Slobodan
 
R

Richard

I just gave it a try and it appears to work fine. My application calls the
Windows Shutdown function and then Windows gracefully has my application
shutdown which saves all the cfg data to flash. It then powers down.

Cool. Since my DC/DC Converter has a Remote on/off pin, I can use this to
kill main power.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top