ESP32-CAM breakout

While I'm waiting for a Brian Lough to make a proper breakout board I scratch built one for the fantastic ESP32-CAM board.

It's a bit ugly but it lets me program these up easily while I'm testing my code. The reset line isn't brought out on the headers. So you have to push the button on the underside of the module while simultaneously pushing the 'program' button I put on the breakout. Fiddly but it works.

Something I've also noticed is that if you use a Sparkfun 3.3V FTDI basic board to power the ESP32-CAM 3.3V line directly you get awful problems with power brownouts. This means that you might be able to program the board but it won't reliably boot and work. This isn't surprising, the board needs quite a chunk of power.

So I'm using a Sparkfun 3.3V FTDI basic with the power link changed on the back to 5V. This connects the 5V from the USB straight through to the device. The logic level is still 3.3V, so you won't kill the ESP32.


Ender 2 troubleshooting

To my shame I have left my DOA Creality Ender 2 to lurk in a corner pretty much ever since I got it. I managed to get a replacement PSU as it cut out when the hot end started but it just behaved the same with the new PSU.

My attempts to follow this up with the seller turned into a wrangle with them wanting me to contact Creality for support and I ran out of enthusiasm as I was busy and I had fixed the other printer. I just never take my own advice about not accepting repairs on new goods instead of demanding a replacement. One day I'll learn.

This weekend is quiet so I pulled it out and had the cover off the controller. It's a really easy printer to work on, just undo the three outer screws on the cover and it pops off giving you easy access to the board. I know it's never actually worked but I'm still impressed with how nicely this is put together for the money.

As I suspected, with the hot end heater cartridge disconnected the printer no longer cuts out when you apply power to the hot end. The heater cartridge isn't a dead short, but it's only about 2 Ohms.

To test things further I connected a 35W incandescent 12V light bulb to the heater terminals and everything works fine, so the board and PSU are almost certainly good.

I've now got a replacement hot end on the way, thankfully parts for these are dead cheap. You can get better quality upgrade parts for the Creality printers but when a good hot end is as expensive as the whole printer I'm unconvinced of the worth of this. Everything I've seen from other owners is that the stock hot end is perfectly adequate.

Chimera

I bought this weird "WeMos Mega" combo board from Banggood on a whim. It's an Arduino Mega 2560 clone with an onboard ESP8266. They both operate independently but you can flip some DIP switches to connect the serial pins together allowing them to send messages back and forth. I assume there's some level shifting onboard to match the 3.3V/5V levels too. You don't have to link the two processors, they can in principle leave them disconnected although with a single USB serial you still need to use the DIP switch to set which one you're programming.

As the Mega has four serial ports it gives you the option flick a switch and connect the ESP8266 to Serial3 leaving Serial0 for USB comms/programming the Mega. There's also a separate pin header giving you access to the ESP8266 pins directly.

This is either the best of both worlds, or the worst of both. I've got a project coming up where I would like to use a few more pins than an ESP8266 has as standard and I grabbed it for that. It could easily be argued an ESP32 board with all the pins broken out would cover the same ground.

What's the target market? I'm unsure, I guess people who are used to old-school Arduino kit and want to use the ESP8266 in its somewhat old-fashioned role as a Wi-Fi co-processor rather than as the really useful microcontroller it is in its own right.

Anycubic Photon

I randomly saw a Twitter acquaintance posting about how these SLA printers were currently on offer direct from the manufacturer and couldn't resist.

My now incorrect world view includes SLA 3D printers being too expensive for casual hobbyists to buy and I'm glad this has changed.

As of Autumn 2019 you can pick one of these up for ~£275, which is around the same price as an effective FDM printer like a Creality CR-10. The build volume is tiny but if you're buying an SLA printer for the surface detail it can handle you probably aren't making things much bigger than would fit in the palm of your hand anyway.

A good thing about these specific printers is they are a few years old and have built up a strong community around them. This is helped by the fact it's a based around a generic controller board made by CBD Technology meaning it's not 100% locked to support by Anycubic. There is a newer AnyCubic Photon S which isn't markedly improved and suffers from having to use a proprietary slicer from AnyCubic.

The community has a lot of advice, tips and mods and one of the first things I did was to enable the onboard network port which allows you to upload things to the printer over the network. The Duet3D board in my old RepRapPro has spoiled me and messing around with swapping USB sticks or SD cards to provide files for printing seems quaint.

I don't have an immediate clear use for this but there have been times in the past where I want to print something small and detailed that my FDM printer can't manage. The first thing I'll probably try is some custom keycaps for some small handheld devices I would like to make.

These cheap SLA printers work by having a very thin flexible non-stick membrane in the bottom of the vat of resin. As each layer is printed, the plate moves up, the membrane flexes and this peels the print off this membrane. It's quite fragile and both the membrane and screen are considered consumables. So this won't get used for any high volume work.

Once printed the resin is not 100% cured and a strong UV source is needed to finish the job. I've left my test print in the sun for a few days, but I'll need to sort myself out a small curing cabinet.

Mesh network site test

We're running a game in March where I'd like to use my mesh network stuff in anger.

As a Londoner I find it really hard to test any of this stuff properly as open space is at a premium and if you put boxes on poles up on the public land near where I live, people will think you're spying on them or doing something nefarious. It's just one of those things you get from living in London.

This weekend though, it got the real test as we conducted a site visit so we could plan out how we are going to use the various buildings and areas which allowed me to test in the actual environment.

I'm glad to say it all worked, but the heavy foliage on all the trees and shrubs really killed range and I had to put the test nodes much closer together than I hoped. Of course the point of all this is that the wearable/portable devices should gap-fill to ensure coverage but for one thing I need a guaranteed 'corridor' from one area to another so it's guaranteed to be always up.

I really must design those custom LiPo powered PCBs for the ESP8285 modules I have and order them from China. The current test boxes are based around WeMos D1 Mini Pro and Poundland NiMH batteries so they work but are a bit inefficient and simply won't run a whole weekend. My power budget suggests an ESP8285 powered by two 18650s and the high efficiency switched mode power supply I've specified will.

The wonderfully cheap ESP32-CAM

I have a vague aspiration to build networked bodycams for our Sci-Fi LARP system. You see it often in movies where people back in a control room can see what the 'away team' are doing. Action movie emulation is where we're at.

Since the first ESP32 based camera boards arrived I've been eyeing them up but there's been a sudden influx of cheap ones (about £4.20 delivered) on Banggood and I bought a small batch to play with.

There are a few bits of example code floating around on the Internet so I uploaded what proved to be a very solid 'streaming webcam' sketch and I'm very impressed. Now I need to port my ESP-Now mesh network code to ESP32 and see if I can do video, or at least frequently refreshing stills, over that.

ESP8285 programming

For the boards I'm planning on building I'm going to shift to using ESP8285 modules instead of ESP8266.

The main reason is the integrated flash and the secondary one is it's smaller, with more usable pins than an ESP-01S in less space. I'm not at all space constrained for the first iteration of my project but I will be for later items.

Nice as these are they're really designed for surface mount use so I had to build a little breakout to work with the handful I bought to test with. It's a bit rough and ready but works just fine.

A side effect of the integrated flash memory is you don't need to mess about with pulling pins high to boot. You just need to pull GPIO0 low if you want to program it. I put a couple of buttons on my breakout, one to reset and one to hold GPIO0 low, making for easy programming.

I did a little test with this and my mesh code works perfectly. Another bonus is these chips seem to use slightly less power, ~70mA instead of ~80mA for the ESP-01S. Some of that will be the lack of LED indicators but it's welcome nonetheless on a battery powered project.

Solar charging

I'm still working on my mesh network stuff but sometimes it feels like I'm working on so many things at once I never make any progress with any of them.

One of the things I want to make sure I have in place is a number of fixed nodes with decent batteries and passable antennas to do the heavy lifting of infill coverage.

I built ten of these and they worked but battery life with cheap NiMH cells was disappointing so I'm doing a second iteration where I'm throwing more serious batteries, better efficiency and top-up solar charging into the mix. The hope with this is that they will run for 2-3 days at least.

For the batteries I've purchased twenty brand new 2500mAh 18650 LiPo cells, planning to put them together in pairs. A quite naive calculation on battery life, assuming the nodes use about 80mA gives me 60 hours, but I know it'll work out less than this.

For efficiency I'm looking at an efficient PAM2301 switching regulator recommended to me by Mike, who's used them in some of his projects. This will generate the 3.3v needed for the ESP8266.

I'm also going down to ESP8285 modules with no status LEDs or clutter, which should help a bit. I've yet to measure their typical load.

The solar charging is a whim that may not deliver. I've picked up ten 1W 5.5V panels from China and after a bit of reading round the subject settled on using an MCP73871 charger chip and bought an official development board to play with.

With LiPo cells you can't just connect a charger to the batteries at the same time as the load. The charging algorithm for LiPos has constant current/constant voltage modes to ensure safe charging and attaching the load directly during charging messes with that.

The MCP73871 was very specifically chosen because it's not a simple charger but a power management device designed to supply power to the load as a priority, charging the battery if there's excess current available from the supply. It also manages switching the load from the incoming supply to the battery when there's no incoming supply. It's not an MPPT charger but it does reduce charging current when the supply voltage drops and tries to stabilise it. Which should achieve a similar end.

If I've read the datasheet correctly all this means it should fairly transparently 'top up' the 18650s if the solar cells can provide enough current.

There's a LOT of IF coming off this plan. One of the 1W panels delivered 100mA in the morning sun to an LED so I may not be completely out of luck.

I've got some INA219 current monitoring modules coming too so I'm hoping to get some fairly true readings of how this all behaves by putting them into the proof of concept build. I may be able to monitor the panel, charger and battery individually at the same so I can see what's going on and do fairly good efficiency measurements.

Or I may just give up, buy some bigger panels, better NiMH cells and connect the panels straight to them via a diode. :-)