How to provide power to..... stuffs ?

Posted on
  • First, as a background, I'm a .Net developer with limited or no electrical knowledges linked to microcontroller usage.
    Until now I've used Espruino board with USB to my computer, with limited devices connected on it.

    My question is : how and with what do we have to power our "stuff" ?
    I mean that the goal would be to have an autonomous board.
    And what if we have a 220-240v near the location of the board ?
    Additionally, what about all the stuff (LEDs, devices, etc) that require different voltage or power ? Espruino has 3.3V output, right ?

    Example (I will detailed everything in the "Project" thread soon) :

    • Espruino board (5v ?)
    • FingerPrint (3.6v - 6v)
    • KeyPad
    • Wireless communication, like CC3000, NRF24L01+ or HC-05
    • PN532 NFC/RFID module
    • PCD8544 LCD driver (Nokia 5110) [Optional]
    • NeoRing LED (4v-7v, ~300mA)
      (But what about 5m LED strip that would require lot more power, for example)

    So, in general, how do we power stuff with different voltage from 220-240v ?
    Is there any small power converter board to use, to keep the footprint as small as possible (compared to the size of Espruino board) that can provide several different output voltage ?
    And... in the case described above, can I power all of those ?

    Thanks for helping...

    Chris

  • The espruino can provide 3.3v, but only at 150ma - so you can't run heavy stuff off that at 3.3.

    The espruino itself will run at 3.3-15v (it has a regulator built in). VBat will be at the supplied voltage - it's not 5v like it is on USB.

    It looks like everything there is 3.3 or 5 volts, and the 3.3 stuff has low current requirements, so you can run it off the Espruino's supply (note that for CC3000, you need to use the Vin pin and the +5v - it's peak current is 350ma, which the Espruino's regulator can't handle - but the Adafruit CC3000 board has it's own regulator built in, powered by VIN). Other than large LED strips, you should be able to run all that stuff powering the Esprino off of a USB wall charger.

    You can also wire it up to a 5v wallwart, or use the +5v and ground from an old computer power supply, or any other source of 5 volts. You can also power it off batteries, though Li ion batteries are 3.7v, and some of your parts need something closer to 5, so you'd need a dc/dc converter to get the 5v (these are readily available for dirt cheap - small, light ones are available as "UBECs" for model airplanes)

    For high current applications (long LED strips, etc), you should not draw the power off the Espruino's VBat pins - get the power before it goes into the Espruino.

    Although the Nokia 5110 screen says it will take 3-5v, on 5v, even the pixels that were supposed to be off were partially darkened - it was hard to read. At 3.3v (running off Espruino's 3.3v), it looked much better.

  • Thank you a lot for your response.

    So ok.... I can use a 220v -> 5v to power Espruino and almost all things.
    3.3v provide 150mA... if provide 5v/1A, using the Vbat pin can drive much power, to 1A I presume ?
    Is there any power limitation with Vbat ? Espruino board take 3.6v to 15v for input, but what about amperage ?

    In case of high power requirement (LED strip) use another converter and not use Espruino (which seems fair :) )

    If I provide 5v to be safe and almost all devices would be able to use it via Vbat.... and for the screen having to use the 3.3v pin.

    But more generally, what would happend if one of the device would require, let say, 12v or 24v ?
    In that scenario, it would mean 3 converter ? :

    • 220v -> 5v : espruino and stuff (Vbat or 3.3v pin)
    • 220v -> 12v - 24v: the "special" device
    • 220v -> ???v with high power : LED strip

    Do you know any board (arduino, spark, etc) that could convert 220-240v ?
    Best, a board which would supply different output voltage in parallel ?

  • I would not mess with 220V in the same enclosure as your device(s) and rather use a pre-made power supply. Modern power supplies use optical isolation between high and low-voltage sides, sufficient gaps between high and low voltage and thermal protection.
    It really depends on what your devices are. Many of the LED strips come with a power supply that is made for them. I would just get a 5V Power supply (e.g. 5V 2A) that pretty much allows you to power anything you need. If you need a 3.3V supply with more power, get a 3.3V regulator and put it behind the 5V supply, e.g this one which can handle 1A (http://www.newark.com/texas-instruments/­lm3940it-3-3-nopb/ic-ldo-volt-reg-3-3v-1­a-to-220/dp/41K5126). (Also think about your own safety, the safety of your family and your home owners insurance.)

  • I second @DrAzzy, though I would not recommend an old computer PSU (ATX). The low voltage supply, 5V, is not stable when no current is drawn from the 12V output. For stand-alone operation using mains, a phone charger would be the best option - it's 5V, commonly ~1A these days and compact/efficient due to a switching topology. The Espruino power setup is also documented here.

    @ChrisB, using the bat_in or usb_vbus, vbat will be protected by a 1A fuse so no matter the input voltage you will be allowed to draw more than <1A on vbat. If you choose to power the Espruino directly on vbat be warned that you do not get reverse polarity protection nor a fuse to protect you peripherals and the board. You can still switch high currents safely with the Espruino using mosfets or relays though.

    If you have peripherals connected that runs on higher voltages, yes, then you would need more than one power supply. Alternatively you can use one mains PSU that delivers 24V DC and then use voltage regulators to give you 12V and 5V as well from the same source. No matter what, all your devices must share a common ground to function properly.

  • Hm, I didn't know that about computer power supplies. Is that universal? I've used them as power supplies, and I had no problems with stability of the +5v - but this may vary by model.

  • @DrAzzy, if no load is on the 12V output you can see some nasty spikes on the 5V supply. I have observed this behavior myself, but others have also reported this like Paul Stoffregen at PJRC. It might be universal in the sense that the PSU design is pretty standard - they must provide the bulk of the power at 12V. However I have not seen it go past 9-10V so if your regulator/device can cope with this, you might never notice :)

  • Thanks all for sharing information.
    I've successfully powered the NeoPixel Ring with the keypad via Espruino board, starting to play with. I found a wallplug to USB (5V 1A) converter and this is working fine for now :)
    I have a better vision on powering stuff now, thanks to all of you.
    Even if I might come up with a question (or two) in the future ;)

    In the meantime I found this article from Gordon about powering LED strip with MOSFET.
    I might be wrong but I do not understand a point from the picture.
    The yellow cable is for GND and each MOSFET is picking it and Espruino is connected to each MOSFET.
    The black cable is for power but it seems the cable is not used ?
    How it is powered ? Espruino board seems powered via USB...
    Is something missing on the picture ?

    Sorry to bother you with potentially stupid question.

  • Power to the rgb led comes from another power source not in the picture (could still be sitting in the breadboard power strip with the black wire). In this case, with just one rgb led, vbat could be used as well. The main point is you don't source power from the GPIO pins.

    Just to be clear: led power goes to the common-anode terminal (black wire), the cathode of the r,g and b leds (r/g/b wires) is connected to the drain of each mosfet. All mosfet sources are connected to ground. The espruino drives the mosfet gates. I can recommend the many tutorials on the same topic for Arduino. The exact same principles apply.

  • Thanks ltj
    I was just wondering why yellow (GND) is from espruino.
    I understood the power was from another source,
    But how come that espruino has USB, LED another source but GND from strip linked in the board....
    I will look at Arduino tutorials.....

  • Both supplies, USB + led, has it's own ground. These must be tied together for the circuit to function. The pin strip is connected to the led supply ground, so the yellow wire simply connects the ground of the Espruino to the ground of the led supply.

    I will look at Arduino tutorials.....

    ...and don't hesitate to keep asking questions here :)

  • Thanks for your help everyone...

    That tutorial is one that Christian contributed... Come to think of it, it could probably do with a circuit diagram - as could a lot of them :)

    It may not help in this case, but there's a bit of information on powering Espruino here: http://www.espruino.com/EspruinoBoard

  • Hi Gordon,

    Thanks for the link http://espruino.com/EspruinoBoard . Where is this exelent page linkt to ? When i click on "Refenrence" -> "Espruino Board" i get this page:

    http://www.espruino.com/ReferenceESPRUIN­OBOARD

    Thanks

    Sacha

  • It's linked from:

    http://www.espruino.com/Espruino+Kits

    and the search link - but yes, it's hard to get to. Where would you have looked for it, and I'll try and add a link?

  • Hi Gordon,

    I expected it, when i click on "References" in the main menu left. Maybe a merge if the following two pages would be great:

    http://espruino.com/ReferenceESPRUINOBOA­RD
    http://espruino.com/EspruinoBoard

    Best regards

    Sacha

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

How to provide power to..... stuffs ?

Posted by Avatar for ChrisB @ChrisB

Actions