New Espruino Board

Posted on
Page
of 7
/ 7
Last Next
  • Hi,

    I've been finding recently that 95% of all the sales from my Tindie store are for the Espruino WiFi shim - which, let's face it, isn't the easiest thing to solder up. It kind of points to the fact that quite a lot of people want WiFi.

    Now the Pico can do HTTPS with the ESP8266, and given it uses so much RAM there isn't a great deal left for other things, I've decided to make another board with both an ESP8266 and a chip with a little bit more RAM on (probably 128kB).

    Earlier this week I sent the first PCB off - it looks as below. It's roughly an inch by a little under an inch - about the smallest I could get it with the WiFi module on board, and pretty much everything is available on 0.1" pins so it's quite breadboard friendly. This one's got Micro USB too, rather than an on-board connector.

    Does anyone have any thoughts, or things they'd really like to see on it?


    2 Attachments

    • espruino_wifi1.png
    • espruino_wifi2.png
  • Just to add, this has one button and two LEDs. However no JST power connector or battery switchover circuitry - nobody really seemed to be using it that much and it makes layout a headache and adds to the cost.

  • Is it worth considering hardware flow control on the usart with the ESP8266?

  • Well, I found that power management is critical in iot...
    So, since the esp is not as power saving as it should be to use it on its own. I would suggest to carefully integrate the opportunity to switch completely off the esp from it's mcu fellow. And more or less let this mcu handle all of the io and realtime stuff before waking up the esp.
    That's just an opinion.

  • Hope the Real Time Clock is kept in the new design.
    Another thought: would the new Espruino board be also available in a SMD version ? I trust it may be of great use as soon as you move from prototype to small series "production".

  • @Snerkle I'm not sure if that's available in the firmware - if it is then yes, that could be an option. Of course I didn't think of that, but Espruino can do software flow control. If that could be turned on in ESP8266 via some AT command then it'd work right now.

    @asez73 I'm definitely connecting the power-down pin, which should totally power the ESP8266 down - I'm sure it will still draw some power, but it won't be much. I'll just have to add some functions to allow the user to toggle it, but that should be pretty easy.

    @verdeimpacat yes, I'm definitely keeping the pads for the low speed oscillator, and will see if I can fit it in this version. It'd make a big difference.

    There's still some work that could be done on the Pico that'd really improve the RTC accuracy though - I'll see if I can get it in soon.

    I'm afraid an SMD version is unlikely, because the ESP8266 has to be stuck onto the back of the board. I guess if the PCB was castellated then you could stick it onto a board with a hole milled in it, but I wonder if anyone would actually do that - especially since I don't think you could reflow it or the ESP8266 would fall off the bottom! Since there are no 0.05" pins, you could just fit a socket onto your board though - I'd imagine that'd be ok for small production runs (or soldering directly?).

  • Kudos for such great functionality crammed onto such a small PCB.

    I guess it wouldn't be feasible to put the low-profile main processor on the back, with the ESP8266 on the top side - not that it would really make the board surface-mountable, unless a depression (not quite a hole) was carved for the STM to nest into to the "host" PCB. ??

  • Does this version have dummy-proofing power protection against ground shorts?

  • For anyone else thinking about flow control, it looks like AT_UART_DEF is the command you need to turn on hardware flow control in the AT firmware, and then it'll use the MTCK pin (GPIO13) for CTS. I'll make sure I tie that up to some IO in the new Espruino board just in case.

    Yes, the board will have a fuse in it - while there is a diode it's only there to stop voltage flowing back into USB, so it won't protect against reverse voltage I'm afraid.

    The ESP12 module is actually pretty tight on the back - putting the STM32 on top means there's enough space to (finally!) have pin markings where they can be seen - which I think is probably better than being slightly more SMD mountable :)

  • I would reconsider the uselessness of the battery support... (JST header and/or step-up/down)
    This is definitely the first feature I look at when I want to leave something running in the field.
    If no remaining place on the PCB, why not providing only 2 pads, BATTERY_IN and GND ?

    Just a tip for the reverse voltage protection, you can try this mosfet based solution, which requires only 1 component rs20.mine.nu/w/wp-content/uploads­/2013/02/pfet.png

    Could we imagine this board providing a mechanical hole, in order to ease the mounting ?

    Thank you @Gordon, for always trying to improve the Espruino and its user experience.

  • I'm too new at this but my immediate thought was why not use ESP8266 as the host for Espruino and have the board be the shim - with the USB and extra storage et al. I don't really understand why it would use two chips, which are both capable of running Espruino.

    I've missed stuff, I'm sure I must have. My apologies in advance.

  • @Ollie there are plenty of ESP8266 boards that you can buy, I'm not sure that there's much to be gained in having an espruino specific one.

    There's also some advantages in having a chip with more functionality, hardware spi/i2c etc, multiple ADCs, more I/O, etc.

    Not to mention that if @Gordon is selling a board, I'm sure he's going to be doing something he can be in control of the quality of. He wrote Espruino for STM32s and I imagine it'd take plenty of effort to keep up the stability and quality of the official builds. The ESP8266 firmware is going great (I'm planning on using a couple of ESP8266 boards at home) but it's not feature complete yet and very much depends on the contributions of other people to keep up with bugs and features. I think that Gordon's set a high standard for the official boards and their firmware, it'd be difficult for him to maintain it for a completely different chipset.

  • @Gordon have you thought about keeping the same pins as the pico to try and keep some similarities between the boards?

    Have you considered going for a slightly bigger board in exchange for cheaper larger components? I imagine shrinking things like crystals would bump the cost of the board up by a few dollars.

  • Which power regulator are you using?

  • @the1laz thanks yes that makes some sense.
    @Gordon On the subject of board design, having "tried" to solder shim to Pico it has occurred to me that a slightly longer Pico with the docking holes for the esp8266-01 would have been perfect. Just drop the legs in and solder the underside. Could even put pinheader in so removable. The design above obviously has to be fatter to accommodate the pads. And if only providing a wifi service to the board 01 would be fine the lack of Gpio not a factor, though I'm told the 12 style boards have better wifi range.

  • That looks pretty slick - looks like it will be a great tool for a lot of jobs. Which micro are you planning to go with?

    What do you mean by removing the battery switcher? What will the power section look like now?

  • @Gordon,
    Thank for your answer.
    About power saving, I suggest to use an ultra low quiescent current power regulator. I mean nA not ten's of nA.
    I am biaised toward 1 year autonomy on a pair of AA batteries and now considering Stm32l476 mcu. I would suggest to have a look at it's integrated capability to charge a super capacitor. Just to go on dreaming, power it from a cheap 1,5v solar panel such as those found in solar powered garden lights.
    May be that could be an optionnal shield, part of a new Kickstarter campain and, somewhere retrofit the Pico with it too...

  • @Jean-Philippe_Rey the VCC and GND pads are right next to each other on the edge, so you could solder a JST connector on if required. I did see if I could find space, but the board is just too small (unless I go for one of those micro JST connectors, but then it's hard to find batteries!).

    The MOSFET-based solution is what the other 2 Espruino boards use. It's just painful to find space for it, and I imagine a lot of people would use a USB power brick anyway :)

    @Ollie, @tve has done an awesome job with the ESP8266 port, but I think something like HTTPS would be almost impossible on it because of the lack of RAM - and that's what people will want for 'proper' IoT (and for even communicating with a lot of online services now). I could see the ESP8266 making a great board for local networks though - but many people make ESP8266 boards far more cheaply than I can manage, so anything I sell would look like a rip-off :)

    Also, you're going to need some chip to do the USB connection - so if that chip were an STM32 then it could run Espruino :)

    It would have been cool to have a bit on the end of the Pico for the ESP8266, but actually I think that there are a lot of people who would rather not solder at all - and if I'm going to do something that's tied to ESP8266, it's probably better to go all the way :)

    @the1laz I'm keeping the pinout similar to the Pico, but there are more pins on the end, and the 'Bat' pin is removed and the pins on that side are shifted up by 1. It helps me keep more of the analog pins together.

    I think smaller boards appeal to people a bit more, and actually it doesn't add too much to the cost. You're right about the crystal though - I think I found a good 8Mhz one (it's got the caps in, which saves money) but I still have room to put pads for a larger 32kHz crystal in, and I might do that.

    @tve the regulator is the same microchip one as on the Pico (mcp1703) - 400mA max, ~200mA continuous, and I added a massive capacitor to keep the ESP8266 happy. It's not perfect - I'd thought about the switching supply you suggested, but it seems like an extra potential source of issues (noise when CE testing?) that I didn't want to worry about. I want to save as much time as possible so I really want to get as close to jamming an ESP8266 on a Pico as possible :)

    Also, it seems like the switching supply might not have been able to 'step up' if the voltage got below 3.3v (that would have been awesome and would have swung it for me), and the input voltage range is pretty low. The regulator will run from at least 15v - although obviously at that it'll struggle with heat dissipation if 200mA is drawn for any big length of time.

    @DrAzzy I've just removed the FET and resistor, so it's just USB->Fuse->Diode->5V->regulator now. The diode is just so you can't force power back into USB if you run from >5v and connect USB, it also gives the regulator a slightly easier time :)

    I'm pretty sure I'll be using the STM32F411 - so very similar to the F401, but faster (100Mhz vs 84) with more Flash (512kB vs 384) and more RAM (128kB vs 96).

    @asez73 I think with the ESP8266 on there, going after nA really isn't worth it. However I've been toying with the idea of doing some 'bare bones' Espruino boards. Something like 5 snap-out ones that are literally just an STM32 (no USB) and capacitors. The voltage range is 2-3.6v usually so maybe a schottky diode and you'd be able to run them safely off a LiPo with no quiescent current from a regulator. Selling 5 at a time would make it worth me selling them, while still keeping the per-unit cost really low.

  • Amongst all this I missed the point about the mounting holes. That always gets me - as on these boards a mounting hole (with nothing around where a screw head might be) ends up taking up a huge proportion of the board.

    Have you seen what MicroPython does? That's really cool - they have snap-off tabs with holes in on the edges.

  • @Gordon

    @DrAzzy I've just removed the FET and resistor, so it's just USB->Fuse->Diode->5V->regulator now. The diode is just so you can't force power back into USB if you run from >5v and connect USB, it also gives the regulator a slightly easier time :)

    For some projects, I needed to power other things with the 5V of the USB. In order to do that, I had to solder an extra wire just between the USB connector and the schottky diode, because the latter causes a voltage drop of nearly 0.3 or 0.4V depending on the current. Do you think it is possible to add a pin, providing the direct 5V of the USB?

  • Honestly, I don't think so - I think that's quite a rare thing to want to do, and given how much of a premium the pins are I don't think I could justify it (if I had a free pin, there's a little bit more IO I could bring out!).

    However, I could just ditch the diode and rename the pin USB to avoid any confusion. Makes it simpler, and you then get the full voltage right out. It's not like the diode will help with any batteries plugged in that were less than 4.7v anyway.

    ... but actually most USB wall supplies give you ~5.5v to allow for voltage drop, so the diode might work in your favour there.

  • Anyway, that point is not of great importance, I understand your point of view. I don't think that removing the diode is relevant. For some reason, at Particle.io, they chose to put a reverse voltage protection diode on the Core, even if they put a micro-usb connector on it, just as this board you are designing.

  • @Gordon I think running off a separate 5V simultaneously would be a niche case, so there's no need for mosfet or diode. If anyone wants to safely add a battery supply, they'd just need a diode for the battery voltage. I noticed this Adafruit board does it like that and it's a great minimal power supply setup:
    learn.adafruit.com/system/assets­/assets/000/029/703/original/adafruit_pr­oducts_schem.png?1452721271

    A bare bones espruino sounds great. Kind of like an arduino pro mini. I think espruino could really do with a cheaper model for once you've done all your prototyping and you just want to put it in something and leave it there.

  • @Gordon Given that this would be a "connected" thing, what about external storage? I'm thinking about

    • OTA FW upgrade (although not as required as in a non-scripting micro)
    • Storing certificate(s)
    • Storing Js/Css/Html (if this would act as a http server)

    Maybe a uSD card slot, so the user can add any storage?

    Or just the place in the layout for an easy-to-buy uSd socket, and don't populate it by default to keep cost low?

  • It's a thought - at the moment there isn't space for a uSD and it'd be a shame to increase the board size for it, but on the Espruino boards you can use software serial and can connect an SD card to any pins - so I could make an adaptor for uSD cards, but actually pretty much any adaptor should fit on pretty easily.

    I'll be using a chip with 512kB flash, so there should be a bit of extra memory available and I could maybe adjust the memory maps such that at least 2 of the 16kB flash pages were free. I guess the bootloader could be updated to allow it to update firmware over the network, but I'd think that would be a bit of a security risk.

    It'd be nice to be able to fit something like an SPI flash, but I don't think there's really room for that either :( I guess a OneWire EEPROM would fit, but actually if the 16kB flash pages can be made free, that would solve a lot of problems - especially as they could be used with the Fake EEPROM module, which can now memory-map the data so it never actually has to be loaded into RAM.

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

New Espruino Board

Posted by Avatar for Gordon @Gordon

Actions