I'm in the middle of a small 'car-project' and was wondering what is the best of powering the board in a car.
I was thinking about just using a 12v 'mobile USB' charger and plugging the board in.
Is there a better / more correct way?
EDIT - damn you autocorrect (title is wrong and I've can't change it). It's a Pico board!
Hi! Yes, a 12v charger is nice and easy and safe, and would work with most boards.
The Pico itself will run direct from the car's 12v though (it'll do up to 16v, so fine while the engine is running too). Just connect it between the VBAT and GND pins (opposite sides of the board to each other).
Some people have reported that trying to use USB while the board is powered from 12v doesn't work that well, but personally I haven't really noticed any problems. While I don't have one in my car I used one powered from a car battery for ages as a plant waterer :)
Powering directly with 12v would be nice, however both the relay module (https://www.espruino.com/Relays) and the ultrasonic sensor (https://www.espruino.com/HC-SR04) might have a problem I've guess...
why not just use one of those USB chargers that supply 5v and plug into the cigarette lighter slot?
Ahh, yes - if you have other 5v stuff then I'd use a power supply.
Those relay modules can be bought in 12v versions, but as I recall the ultrasonic sensors really like 5v (they don't perform as well off 3.3).
There are some car-ified power supplies that look quite useful depending on how you're doing wiring: http://www.ebay.co.uk/itm/DC-DC-Converter-Regulator-12V-Stepdown-to-5V-3A-15W-Car-Power-Supply-Module-UK-/142407861263
Or there are bare PCB versions too... Or you could use a bare voltage regulator device like the LM7805, but ideally they'd also have a capacitor on each side so a module is probably more simple to wire up.
If you connect those to VBat as well you can then plug USB in really easily if needed, and power off USB or the car.
That just gave me an idea...
Relay module in 12v would be nice.
Ultrasonic sensor... has anyone tried with a normal VW/Audi PDC sensor? They are running 12v (link to eBay for a random sensor: https://www.ebay.de/itm/122453670270)
2: signal (I don't know anything about that)
Sounds like a good idea... Do you have an oscilloscope you could test with? Even better if you could look at the signal when it's on a car :) My guess would be it's just a really basic pulse output where the pulse length is the time taken for the reflection. I guess they might do something like have it bidirectional so you'd have to send a pulse down the wire to trigger it, and then it'd send a pulse back when it got the reflection.
Definitely worth looking into. There's something here called the 'Oxford Flood Network' where they're trying to measure water levels - and they use hugely expensive industrial ultrasonic sensors. They'd kill for a cheaper option :)
Don't worry about formatting, just type in the text and we'll take care of making sense of it. We will auto-convert links, and if you put asterisks around words we will make them bold.
For a full reference visit the Markdown syntax.
© Espruino, powered by microcosm.
Report a problem