Powering Espruino

Posted on
  • Hi

    I'm designing a project which will be a little tight on space, and having a micro USB
    sticking out of the edge may use up too much room.

    Are the power inputs available on any other pins?

    (Maybe I missed it, but a discussion of power in general - i.e. USB voltage and how much we can draw from the regulator would be good :))

    Thanks

    Martin

  • Hi Martin,

    It's a good point - I've been producing a page on the board itself, and I'll make sure it contains that information. As a rough guide though:

    • USB voltage is ideally 5v, but can go anywhere up to 16v.
    • There's a battery connector (JST PHR-2 type) that takes anywhere from 3.5v-16v, and which is marginally more efficient than USB because it uses a FET rather than a diode. This is inset from the edge of the board by 1mm or so, so it won't protrude much from the edge.
    • Both USB + battery connector have a 1A thermal (self-reset) fuse in series with them before they go to the board's VBAT pins - however it's easy to short out if you need more power.
    • The voltage regulator is a MIC5205, which provides up to 150mA 3.3v supply - so enough for most simple things, but not enough for anything heavy.
    • You can power the board directly from the VBAT pins on the 0.1" header, but there is absolutely no protection - especially reverse voltage.

    Hope that helps - let me know if you have any other questions...

  • Hi Gordon,
    I Have just received my start kit, thank you.
    The servomotors and the lights are working very well when I power them via the board ( which itself is powered via USB ), but when I power up them with 4 AA batteries ( which generate about 6V, slighty more than the 4.7V from USB ), they do not respond to controls.

    Basically the GND of the board is connected to the "-" of the 4 chained AA batteries, the red wire of the servo/lights is connected to the "+" of the 4 chained AA batteries, and the control wire is B5 or C7.
    When the red wire is connected to the board's VBAT, everything is fine, but when the red wire is connected to the batteries, the servo and light do not respond.

    What am I doing wrong?
    Can I power up the espruino board while it is usb-connected to my PC?

    Thanks,
    Olivier

  • Have fun with the kit :).

    Have you actually tried to power the board without the USB connection? That could very well be the issue since things all work a bit different when the USB cable is connected. Be sure to save your code first though on the Espruino by using the save(); command. That way the code that has been saved will be executed once the board powers up.

    Your wiring seems correct though, but I don't have anything handy to test your configuration.

  • Wait, do you have the black wire of your batteries also connected to the black wire of the servos (as well as to GND)?

  • Yes, the "-" of the batteries is connected to the GND of the board and the marron wire of the servos is on the same line.

  • Thank you for your answer.
    I am a complete newbie. Can you just confirm:
    Can I connect a battery ( in my case 4 AA batteries daisy-chained ) to VBAT / GND ?
    Can I connect the batteries to VBAT/GND while USB is connected to my PC ?
    I would rather not toast my board too quickly. Thanks for your help.

  • No problem. Mind you, I'm a newbie as well and just learning as I go along. So far though it seems that the Espruino boards are very robust, so I wouldn't worry too much about toasting them ;).

    Can I connect a battery to VBAT/GND?
    Definitely, I just did it with a 9V battery.

    Can I connect the batteries to VBAT/GND while USB is connected to my PC?
    It seems like you can. In your previous circuit this was not the case and I can verify that the behaviour is unexpected. It also seems to be dependent on whether that pin is a 3.3V pin or not (which is kind of expected). I have a circuit, much like your previous one, up and running with a LED. It works fine when only connected to the battery (light goes on and off), but when also plugged into USB the light just goes from very bright to slightly less bright. Using the same wiring as when the USB is not connected, while the USB is connected, seems to provide the expected behaviour. This is exactly what you are suggesting and my board hasn't blown up just yet ;)

  • Ok, at the end of the day I found out that my breadcrumb did not work as I expected: the power lines at the top and bottom were not propagated along the whole length.

  • Glad it's working!

    Just to clear up about Battery/VBAT/USB:

    There's some info here including the circuit if that helps: http://www.espruino.com/EspruinoBoard

    In short:

    • If you use the proper JST battery connector for the battery then you're sorted. You can power by USB on any battery.
    • You can connect your battery to BAT on the pin headers and power the board via USB, but only if the battery voltage is above 4.3v. If the battery voltage is below 4.3v then you'll end up charging your battery to 4.3v from USB at currents up to 1 amp (which is probably not good for your battery or PC).
    • If you use the pin headers to connect the battery and you get the polarity wrong then it'll probably break your board and anything connected to it - so be careful! The proper battery connector has reverse voltage protection though :)
  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Powering Espruino

Posted by Avatar for mgg1010 @mgg1010

Actions