M5Stack Core 2 ESP32 IOT, STAMP PICO and ATOM LITE

M5Stack Core2

Regular readers may recall a couple of years ago I wrote about the M5Stack – at the time I didn’t have much to say about the original as I could not find much in the way of software tools for it – yet here we are again with the M5Stack Core 2 – the ESP32 IoT development kit which comes complete with 2 inch touch display. Now, I know what you’re going to say – why discuss an old blog entry? What what’s changed? I also now have M5Stack Atom Lite and Stamp Pico – see below…

WELL, I just learned about this ESP32 variation having 16MB, not 4MB of FLASH – and that could not be timed better as Tasmota are in the process of upgrading the graphics capability of their alternative firmware and I’ve just spent the better part of two days talking with their guys and beginning the process of turning the Core2 into a truly useful addition to my home IOT – if ESPHOME doesn’t beat them to it. I just wish all the sales companies would make it clearer when selling ESP32 boards, what size FLASH they come with – it can make a BIG difference – anyway, read on…

The upgraded Core2 has 8MB or RAM, a 390maH battery and you can easily add a bunch of peripherals.

M5Stack Core2 box

Doing nothing more than pressing the ON button, my CORE2 actually DOES something – ideal for ESP32 novices. Some say a picture is worth 1000 words so here goes – this is all internal – I have no SD mounted – this is straight out of the box. There’s a little Chinese in there but hey, these are (were) early days and the images are just the default demo.

I can’t wait to have a go at the Arduino library on Github which also has sample code, and I suggest rather than me copying a load of specs, interested readers check out the Core2 documentation in the Wiki

M5 Stack Core2 standard demo

This is exciting – there’s a microphone and a load of other sensors inside the Core2 unit. See the “Sound FFT” section above – I just said “hello” and it started reacting. I’m also seeing a charging indicator – shame I’ve no idea what the Chinese bits mean. There is a sound system in there and some kind of motor/vibrator. In short, lots of things to play with before lifting a programming finger.

M5 Stack Core 2

September 14, 2021 Update

THIS is fun… SO, taking the PC-downloadable M5BURNER software, I grabbed (one button press to download, another to burn) the Core2_tools software (replacing the original demo which ships with the Core2)…

Core2_tools

I now have the UIFlow IDE set up for both the Core2 and the M5Paper. I’m in the early stages of experimenting with the various demos and up to now, pretty much no technical knowledge required.

I then used the tools to set the time and date (NOW I can go back to that calendar and actually use it properly)

Note that because of the ESP32 core, the device can onl;y recognise 2.4Ghz WiFi and not 5Ghz WiFi.

AND now I realised the bottom of the Core2 comes off exposing the connector, I guesss I’ll have to find out what that is in that defaultt installed cover (one chip) – I’m sure it is all detailed somewhere but somehow I missed that – still – all part of the fun. So, taking off the first cover exposing the edge connector is easy – taking off the back to expose the PCB needs an Allen key – simple enough – and from there you can get to the 3v7 replaceable battery.

‘Now isn’t that handy? The connector diagram above tells you what each pin on their connector does and how they relate to ESP pins – Tasmota users will find that VERY handy for setting up the config.

Note the 4 magnets in the base. I KNEW I’d find a use for all those 3D-Printer-Kit Allen keys some day. Anyway I only needed one. As the CORE2 unit uses an ILI9342 (not ILI9341) display it isn’t a problem making use of this unit with Tasmota for anyone who feels that way inclined. I’m so excited because I need a wall display with touch and that until now that meant finding a decent case with battery compartment etc to handle the ESP32, display etc…. now thanks to this I can use the CORE2 with Tasmota tools I love. I need MORE of these units!

Are you READY? Minutes later – with the Core2 plugged in – I grabbed the CORE2 bin file from Tasmota and using my usual flashing tool… one Tasmota’d Core2. I entered my WiFi credentials – which meant I could now continue on my PC.

The very first thing to do is give the unit a decent name in Configuration – see all those peripherals running in the Core2 – no battery consumption as I was running on USB. After removing the USB the consumption went to 60ma on average.

Initially the display showed back to front – but “jason2866” in Tasmota DISPLAYS in DISCORD told me about an as-yet undocumented command DISPLAYTYPE.

In the Tasmota console I entered DISPLAYTYPE 2 and that fixed the display. He and “s-hadinger” have been of GREAT help in the tasmota-displays area and all of our conversation is there for others to benefit from.

The Core2 device itself has a temperature sensor which is not far off – it’s warm in my office.

But this is only the beginning – now I have the new FLASHER and as of this evening – with requests for help leading to some changes – we now have a great development base on the 16MB FLASH-BASED (and 4MB RAM) CORE2.

Notice the gyros, temperatures, voltages etc in the Tasmota console to the right – that’s all built in to the CORE2 and the relevant Tasmota build – AND NOW – LVGL with support for PNG files and various fonts – I’m excited. I’ve yet to do anything useful with the new LVGL capability but I’ve already read the temperature in MQTT from the unit and once I get some graphics in there and have a play with the on-screen buttons – the sky’s the limit.

Ok so the photo below says Pete’s Demo – it’s not actually mine – SFROMIS and S_HADINGER on Tasmota DISPLAYS Discord set this up with buttons in Tasmota LVGL and at this point I’ve only JUST figured out how to change colours, font and text so I could not resist personalising it. See Simon Horner’s comment about the side power connector. Hmmm, it would be better out the back.. I hope soon to see an ESPHOME update to handle the ILI9342 on the CORE2.

I also have the M5Stack ATOM Lite ESP32 Development Board – but more on that later when I get some peripherals – coming soon despite Spanish customs.

Atom Lite
Atom Lite

September 28 Update – The Stamp Pico DIY Kit

The peripherals for the Atom Lite have not yet arrived, but as you’ll see elsewhere in the blog, I’ve made preliminary use of this tiny board with ESPHOME software. I have it running an SSD1306 display (with multiple display pages) and a LED (no big deal but that’s as far as I’ve gotten as of today) – I also have tried some ws2812b serial RGB LEDs on it but up to now, stability problems have been an issue for the ws2812b and Atom Lite – however I’ve only tried one GPIO, maybe not the best one? The same ws2812B LEDs run just fine on an ESP8266 and a standard ESP32 board so look at the ESPHOME blog entry for more on that. Meanwhile, while I’m here, check out this M5 Stamp Pico which just arrived along with cute RFID board (I’ve no idea why I received the latter) – there’s no APP for this but NFCTOOLS on my Android phone reads the card – but I digress. As I intend to try this PICO out with ESPHOME I’ll stop soon – but first – check out this M5Stack page – SHEDLOADS OF INFO.. including schmatics, pin-outs etc – great stuff.

M5 Stamp PICO

Off with the top – step 1: Remove the MAC label – step 2: Use the supplied Allen key to remove the plastic top. This is FUN…

M5 Stamp Pico kit

Next – I soldered on the female connectors and put the cover back on with its tiny Allen bolt – I didn’t bother with the sticky label as it wasn’t that sticky -handy to have, though. Now I’m ready to program the board using the FTDI that came with the kit. Now that I’m ready to progrm the beast – I’ll refer you over to my ESPHOME blog entry. Not that the PICO has 6 more connectors than the LITE – good start.

M5 Stamp Pico
Facebooktwitterpinterestlinkedin

12 thoughts on “M5Stack Core 2 ESP32 IOT, STAMP PICO and ATOM LITE

  1. I hope their software support is improving. I have an M5stack Basic and an Atom and the software support is patchy.

    It would be interesting to understand how easy it is to produce those UI’s from the images. Currently, trying to use the screen on the Core is very complex. I use the M5easy library instead of the M5 library but even there you have to do quite a bit yourself.

    They also have MicroPython but that is even patchier since their implementation is based on a very old version of MicroPython. Then there is UIFlow and that doesn’t even support some of their basic hardware features.

  2. I’ve just got a Core2 device together with the “Bottom2” which give me a larger battery (500ma) plus additional multi coloured led strips. It also adds extra analogue/digital/I2C ports.

    I get the impression from reading various forums that the software support has improved but still has some “holes”. It seems a bit silly that you can make various tones/beeps on the older Core device but the Core2 only lets you play wav files. Still, I have easily linked it into Home Assistant using MQTT and it now alerts me with flashing led strips, a musical tune and a bright red screen with the time when a PIR at the door senses a delivery/postman. I can send commands to Home Assistant from the Core2. I’ve only had it a few days but it seems quite promising. The neat container, touch screen and leds make it far more “wife friendly” than bare boards wired and proto boards. The built-in magnetic mounting is also neat.

    1. Agree that these and the M5Stack Paper are much better than some jury rigged bits and pieces glue gunned into a hacked about prototyping box. But….

      Why do they have to have the power connector coming out of the side or the bottom of the unit. Imagine this on a wall somewhere. I can see for example the M5Stack Paper being mounted over a patrass which you’d normally use for a light switch. But instead of a switch, you could put a 5V power supply. Except that instead of the power entering the back of the M5Stack device, it has to come out of the wall box and then back up into the Paper device USB port. That would look a bit naff.

      I guess you could solder a lead onto the internals of the M5 device and take that out of the back of the case. But wouldn’t it be better design if the power supply could enter the back of the case?

      Simon

      1. Jury-rigged – that pretty much sumes up lots of my prototypes ๐Ÿ™‚

        Agree, back would have been better – maybe they somehow neglected to ponder the obvious use-case as a wall control.

        I thhink you are right. I can’t tell you how many clever designs I’ve abandoned because I could not get a decent case – I even got into 3D printing thinking that would be the solution, but somehow the 3D printed cases STILL usually end up looking ever so slightly dog’s breakfast compared to commercial wall units… so yes, someone needs to ponder getting power out of the back of this board. Meanwhile I’m working on how to get the Tasmota LVGL graphics up so I can have a bunch of weather icons and temperature icons instead of boring text… I’m quite excited that they use the 16MB ESP32 and LVGL does PNGs – not yet tested to make sure I can use transparent PNGs. If anyone’s ahead of me on this please do comment. Up to now all I’ve managed is to take the nwe demo, change the font size, wording and colour… but… one step at a time. Oh, I’ll add the screen I have to the blog in a minute….

        1. Back on the cases – it’s weird that M5 describe all of their devices as ‘development’. Seems they somehow think you’ll use the device to prototype something and then go about putting it into production.

          They need a big wake up call that these units that are in nice cases will do fine for almost everybody – if only we could get the power in the back of the case………….

      2. I have a Basic and an Atom matrix and a few accessories. All purchased during sales because this stuff isn’t that cheap.

        The hardware is really nice. The software support SUCKS! You can choose from an outdated version of Micropython or either own Scratch-type environment which fails much of the time and doesn’t even support most of their accessories (last time a looked).

        Mercifully, I’ve managed to get ESPhome working on them after some faffing. For the older basic, you have to hack the display driver slightly but other than that it works fine. The matrix also works fine.

        So now I have a proper firmware platform that I can use across many different ESP based devices just by throwing in a configuration file or two but that still supports custom code when I need it though most things are already covered.

        ESPhome rocks ๐Ÿ™‚ I am now replacing all other ESP firmware with it even though I don’t use HA.

        Anyway, back on-topic. Nice hardware, shame about the software.

        1. I have my first ESPHOME working on an ESP8266 flahing a couple of LEDS – that’s how advanced I am – Got HA reading the results but like you I’m not planning on using HA. I have onbly the atom Lite – which is sitting on a shelf until I get some peripherals to try. I think I will put a little more work into ESPHOME…. it would be nice to see how it handles various displays. I have the ILI9432 working on tTamota but had no joy up to now with the new Tasmota display driver and some other SPI screens. Anything you’ve larned about ESPHOME and displays feel free to pass on ๐Ÿ™‚

          1. I’ve had both the M5 basic screen and a TTGO screen working.

            With the M5 basic, I’ve put together a configuration that lets me write to rows/columns more easily and the device is sat in my office showing temps and humidity from around the house with highlighting if the values go outside a certain range.

            Probably best not to share my code in the comments as they will probably be mangled anyway. The code isn’t published anywhere right now either I’m afraid. But let me know if you want it and we can find a way to sensibly share it.

  3. Wow – I have missed this info about Tasmota and the M5Stack! I feel sucha fool as I use a Core2 as a desktop MQTT based alert display/sounder for a PIR sensor at the front door via Home Assistant. Must go and have a search to see where you got the info from. I must be skipping the right videos, blogs and newsletters! Really pleased this arrived in my inbox as a forum alert!

    Incidentally, I also use a C-plus Stick to turn on/off a Dimplex electric fire via MQTT from Home Assistant as it has onboard Infra Red so I can simulate the heaters remote.

    1. Tasmota โ€“ best I can tell you is โ€“ DISCORD โ€“ go to TASMOTA โ€“ DISPLAYS. People who come to mind include @S-HADINGER (I can never remember if that’s minus or an underscore), @JASON2866, @SFROMIS, @BARBUDOR and @BLAKADDER – they can be really helpful (there are others) โ€“ I spend more time in there at the weekend than I care to think about.

      Erm I donโ€™t think I’ve had a C-Plus stick yet.

      Pete

Leave a Reply

Your email address will not be published. Required fields are marked *

Leave the field below empty!

This site uses Akismet to reduce spam. Learn how your comment data is processed.