Espruino wifi - RTC and power?

Posted on
  • Hi, I just saw the espruino wifi and it looks like a fantastic product! A couple questions:

    1) the Tindie page mentions an RTC with external oscillator. What does that mean? Is there an xtal oscillator on the board that's independent of the main chip? Are there pins for battery-backup of the RTC when the main power isn't available?

    2) If I could wish for one more feature, it would be a lipo charger on the board. Absent that, is there a simple add-on that I can put between a lipo battery and the board, that allows running from either USB power o r battery, and charges the battery from USB? Something like the Adafruit Feather series.

    3) [added] How does the STM processor communicate with the 8266? Is that an ESP12 module with the 4MB SPI flash on it? It would be nice to be able to use that flash.

    Thanks!

    Paul

    P.S. I think it is ok to make the board a little bigger, to support these features! Once it's no longer in the usb plug-in form factor, a few more square mm doesn't matter as much. It's still smaller than the Teensy and comparable boards. Here's another one that I really like:

    https://www.tindie.com/products/onehorse­/dragonfly-stm32l4-development-board/

    It has a supercap to power its RTC, an interesting idea. No wifi though. Could use a separate module for that.

  • Hi, I'll just answer each in turn.

    1) Yes, there is an external oscillator and the RTC is built into the chip. There is no external battery backup, so you need to keep power applied to the chip. You could always add an external RTC if that's an issue, but realistically you'd probably just keep power on the chip all the time anyway since it can enter low power modes very easily.

    2) There was actually another thread about this a few days ago. The simplest method would be to use a LiPo charger, 5v switching power supply, and 2 schottky diodes (so with a low voltage drop), but you can do a lot better if you don't need the 5v rail.

    One issue is really that the ESP8266 really isn't very power efficient - so you're only really going to be able to battery-power the board for a sensible amount of time if you're having WiFi off most of the time... Hence why I chose not to push the price up by adding battery management circuitry.

    3) It uses Serial. When I was designing the board this was brought up, but the flash would only be usable when the ESP8266 was off, which limits its use quite a lot! If you really want you can boot the ESP8266 up into bootloader mode and use that to access the flash memory, so it is possible - but it's a huge faff.

    Think of this board more like a NodeMCU, but smaller, and where the USB interface chip has been replaced by a powerful ARM chip.

    The board was designed trying to take forum member's input into consideration over the course of a few months - during that time nobody mentioned LiPo charging at all as far as I remember... I guess I might end up making another board at some point, but I've invested a lot of time and money in getting the current one into production, I have a bunch in stock, and I can't afford to change it now!

  • Thanks! I found the thread about a potential new board and was planning to comment there. I like having the wifi separate from the ARM because of my application niche but for others, the ESP32 will probably change the picture a lot. If you do a new board the (now slowly becoming available) ESP32 looks awfully attractive. Ridiculously powerful, wifi and bluetooth both, and quite cheap (those not familiar, see esp32.net).

    If the ARM and 8266 are both on at once, can I write some protocol for the ARM to ask the 8266 to read and write flash blocks? Speed wouldn't be a huge issue.

    I do think battery backed RTC is essential for most everything I do, so I'm always puzzled why more boards don't have it. Yes I guess I can put the board in an enclosure with a lipo but I liked having it USB powered when in use, and a tiny battery running the RTC when the board is unplugged.

    I do expect to not use the wifi much of the time, at least on battery power, allowing turning off the 8266.

    I have to say I find all the current Espruino hardware (Pico, Wifi, and Puck) really wonderful, tasteful designs. Everything in them is there for a reason and everything missing was omitted because of a sensible trade-off. Kudos!

  • The issue about LiPo charging was sort of interesting - it's something that just didn't come up at all in the planning thread I don't think. And yet, as soon as you release, everyone asks about it. Possibly we have underestimated people's desire for devices with "cell-phone like" battery life, ie, maybe a few days on a good sized battery?

    Where can I get the schematic for the Espruino WiFi, specifically the power section?
    What regulator does it use?

  • Well I'd hope any espruino would run at much lower power than a cell phone. I guess if I can just add one of those tiny adafruit boards then an on-board lipo charger isn't important. It would be great though if there was an accessible VBatt pin on the board, to power the RTC with a separate backup battery. I actually like the idea of a separate charging board, because of my weird app. I just wasn't sure it was ok to use one.

    For something like the Puck, wireless charging would be awesome. There are Qi charging coils as small as 1 cm diameter that could do the job nicely. That would allow potting the Puck in a solid block of plastic (completely waterproof etc.) that you just drop onto a charger once in a while.

    Gordon, any chance of an ESP3212 shim for the existing Pico? That would be much easier than a whole new board. And does the current wifi shim work with the ESP12? Thanks.

  • I don't think I've posted the schematic up yet actually - but it's pretty basic. Just the MCP1703T the Pico had, capacitors, and a fuse between USB 5v and the 5v pin. No separate 'battery' circuit.

    If you were hacking something up you could remove the fuse and then solder to the board to get USB 5v, but it's not great.

    I'm still not 100% sure on ESP32 . It seems it's still missing USB, so for any boards you really need a USB-serial chip, which is extra space + cost. Also, EspressIF did a great job on the WiFi, but folks like ST have had a massive head start with on-chip peripherals.

    What I'd really like to see is a USB charger + power supply board that forwarded the USB data lines from input to output. That way you could just put it in-line and still have a data connection. I'm yet to see one though... @DrAzzy? :)

    I keep meaning to at least add a solder jumper for the VBat pin, but I never get around to it. I'm not entirely sure what you have planned, but because Espruino goes into relatively low power sleep modes, generally you wouldn't ever power it off - you'd just have it go to sleep and then use a button press to wake it back up.

    In terms of wireless charging on the Puck, I just don't see it as an issue. The battery should last about a year, but equivalent CR2032 rechargeable batteries are about 1/4 the capacity. IMO it's easier/cheaper to change a $0.2 battery once a year than to buy a £50 inductive charger and then recharge the devices 4 times a year.

    Even so, I designed the board such that you could put a rechargeable battery in with a few tweaks (cut a solder jumper and add a diode to drop voltage) if you needed, so you could hack in inductive charging if you cared.

    I don't really see the need for an ESP32 Pico shim? After all, the ESP8266 works well enough for Wifi, and the ESP32's claim is that you wouldn't nee another uC. There is an ESP12 adaptor shim available, you'd just need an adaptor kit (which I'm out of stock of) or to send the design off yourself: http://www.espruino.com/Shims

    All the designs are available for download, so if you wanted you could re-arrange things to put the ESP12 underneath and make it more Espruino WiFi-ish.

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

Espruino wifi - RTC and power?

Posted by Avatar for user58984 @user58984

Actions