Vehicle applications and how to boot and turn off safetly.

Discussion in 'General Discussion' started by scott_fx, Nov 25, 2013.

  1. scott_fx

    scott_fx New Member

    Joined:
    Nov 5, 2013
    Messages:
    16
    Likes Received:
    0
    Hey guys,

    I'm planning a project that will have the udoo at it's core. I've done a few car pc's before that have dedicated startup/shutdown controllers and was wondering how i'd be able to do the same thing with the udoo.

    Basically the functions I need would be turn on the computer when the car starts. I know there is a power switch on the board, but are there any i/o pins that i could short to act as a button press (like an atx motherboard)?

    Second, can i safely power down the board using the power button too? If not, I guess i can monitor the acc line via a voltage divider. But if I do it that way, Is there a way to shut down the udoo via an arduino sketch?


    thanks in advance.
     
  2. Lifeboat_Jim

    Lifeboat_Jim New Member

    Joined:
    Sep 16, 2013
    Messages:
    399
    Likes Received:
    1
    Re: Vehicle applications and how to boot and turn off safetl

    Interesting questions.

    Turn on/off: Well, the Board is on when power is available (IE you just plug it in or unplug it).

    However, whilst that's OK for turning on it's not great for turning off due to the potential of uncommitted cache contents not written yet. You could turn 'write_cache = off' to head off that issue. A Journalling Filesystem is of course a plus here too.

    Perhaps a better solution would be to put a micro UPS between the power supply and the board. One off-the-shelf option is a PicoUPS. Of course you could do your own along those lines, sensing the whether power is coming in to the micro UPS and doing a controlled shutdown.

    In time I'll look into power saving. The i.MX6 does of course, but I don't fully understand it yet and I know the SAM3X8E has something similar (don't know if it's active though, or again how exactly it would work). It would be nice for the UDOO (typically 3-5W) to drop down to < 1W whilst keeping an eye on things ready to burst into action.
     
  3. scott_fx

    scott_fx New Member

    Joined:
    Nov 5, 2013
    Messages:
    16
    Likes Received:
    0
    Re: Vehicle applications and how to boot and turn off safetl

    great, thank you for your quick reply.

    yeah i just looked into the power on thing in the n00b section of the getting started.


    the write_cache=off is an interesting solution. if i were to go that route, would i be able to somewhat safely just disconnect power to shut down?

    As far as the picoUPS, I like that idea. it will probably help avoid a dead battery if udoo were to hang on the shut down. I do have a similar board for the atx boards just laying around that i may just retrofit to work (to survive cranking and also avoid battery drain in the event of shutdown hanging)

    my next question is:
    how would i do a controlled shutdown via arduino though (if i'm using that to sense if the power is coming in)?

    thanks!
     
  4. Lifeboat_Jim

    Lifeboat_Jim New Member

    Joined:
    Sep 16, 2013
    Messages:
    399
    Likes Received:
    1
    Re: Vehicle applications and how to boot and turn off safetl

    I assume you'll be doing some sort of logging to disk/card? If so, then yes a Journalling Filesystem with 'write_cache = off' stacks the odds very much in your favour.

    SD Cards don't last forever though so that is a 'point of failure' concern. Booting from SATA (and perhaps further down the line, Flash) is on the horizon which would be better. Better yet would be to have a boot sequence: Flash, SATA, SD Card, USB of course... perhaps in time.

    Well, if your 'micro UPS' is capable of letting you know if power is coming in to it or not, then it's easy. Just use a GPIO pin and watch that from the i.MX6. From that you can issue a 'shutdown -h -t0 now' or whatever. If it doesn't there are several ways to measure voltage/current, one way is a small shunt other options include voltage dividers and comparators. I'm sure electronic guru's can chip in with more specifics.
     
  5. scott_fx

    scott_fx New Member

    Joined:
    Nov 5, 2013
    Messages:
    16
    Likes Received:
    0
    Re: Vehicle applications and how to boot and turn off safetl

    thanks. i'll give it a shot. the atx vehicle power supply has a lead that hooks up to the atx motherboard's power button connector and simulates a button press. I'll just try to wire something up so when one of the gpio pins goes high, it'll issue the 'shutdown -h -t0 now' command...

    now comes the waiting time for my udoo quad!
     
  6. Lifeboat_Jim

    Lifeboat_Jim New Member

    Joined:
    Sep 16, 2013
    Messages:
    399
    Likes Received:
    1
    Re: Vehicle applications and how to boot and turn off safetl

    Glad to hear you're back on track.

    Linky your power supply? Sounds interesting!
     
  7. scott_fx

    scott_fx New Member

    Joined:
    Nov 5, 2013
    Messages:
    16
    Likes Received:
    0
  8. Lifeboat_Jim

    Lifeboat_Jim New Member

    Joined:
    Sep 16, 2013
    Messages:
    399
    Likes Received:
    1
    Re: Vehicle applications and how to boot and turn off safetl

    If you didn't already have them then that would be massive overkill. The UDOO only takes 3-5W you know.
     
  9. scott_fx

    scott_fx New Member

    Joined:
    Nov 5, 2013
    Messages:
    16
    Likes Received:
    0
    Re: Vehicle applications and how to boot and turn off safetl

    oh yeah. but they can also be used to (cleanly) power lcd screens, usb hubs and other peripherals. Also it protects the board during cranking. not sure if the udoo would benefit from that or not
     
  10. scott_fx

    scott_fx New Member

    Joined:
    Nov 5, 2013
    Messages:
    16
    Likes Received:
    0
    Re: Vehicle applications and how to boot and turn off safetl

    Oh, and about your earlier comment. It's not going to be used as data logging. I'm making a digital gauge cluster/command center for some basic functions of the car (seat heater control, parking sensor/camera, etc...)
     
  11. Lifeboat_Jim

    Lifeboat_Jim New Member

    Joined:
    Sep 16, 2013
    Messages:
    399
    Likes Received:
    1
    Re: Vehicle applications and how to boot and turn off safetl

    Sounds interesting, what language/framework do you intend to use for the GUI?
     
  12. scott_fx

    scott_fx New Member

    Joined:
    Nov 5, 2013
    Messages:
    16
    Likes Received:
    0
    Re: Vehicle applications and how to boot and turn off safetl

    going to do everything in processing. it's the closest thing to arduino (since they are based off the same IDE) and i'm still pretty new to the software side of things. I already have a good start to the project. I'll post something up here when i finally get the car back from the shop.
     
  13. Lifeboat_Jim

    Lifeboat_Jim New Member

    Joined:
    Sep 16, 2013
    Messages:
    399
    Likes Received:
    1
    Re: Vehicle applications and how to boot and turn off safetl

    Ah, Processing 2... very good!

    Several here have their eye on that too and are busy porting that over.

    Do you have a library of widgets in mind or are you going to do it from scratch (IE draw your dashboard using primitives and build it up piece by piece)?
     
  14. scott_fx

    scott_fx New Member

    Joined:
    Nov 5, 2013
    Messages:
    16
    Likes Received:
    0
    Re: Vehicle applications and how to boot and turn off safetl

    Yeah! i've been closely watching that thread! :)
    I'm doing most of my design in photoshop and then animating the 'layers' in Processing2 using alpha channels and some other animations. My goal is to have a professional looking display. The lcd will be flanked by two 'analog' type gauges for speed and tach which; i believe, will lend itself to the overall 'oem' look that i'm going for.
     
  15. Lifeboat_Jim

    Lifeboat_Jim New Member

    Joined:
    Sep 16, 2013
    Messages:
    399
    Likes Received:
    1
    Re: Vehicle applications and how to boot and turn off safetl

    Sounds good. How about a URL to your mockups so far? (I'm doing something very similar, as an end goal but not via Processing).
     

Share This Page