Project: Fun with Smart Plugs and Tasmota

This project is by our member Jeffrey Roe and is about saying goodbye to the default firmware on this smart plug.

The project started with a request from an artist for a device to turn on/off up to eight devices that are mains powered with a custom timing sequence. I decided to try out smart plugs as they have come down in price. It would also save building a circuit of relays as I have done in the past. Most smart plugs come with a firmware that connects the device to a private server and requires the internet to control it. The use case called for this unit to be used without the internet.

After doing a bit of research, the open firmware Tasmota seemed to have all the features the project needed and would cut down on the need to code up something totally from scratch. To flash the new firmware, some devices allow this to be done wireless but most require soldering wires to the microcontroller. The ease of soldering the wires varies from device to device due to the placement of the chip. The soldering job can be much harder on some devices.

Wireless flashing seemed the easy way to go as it required no soldering, so I purchased two plugs that the internet said worked with the TUYA-CONVERT. I went for two AOFO 4AC + 4USB Power Strip plugs ( Model C379 ).

This is when the problems started.  After hours of work, getting PI ready, installing the flashing tool and nothing happens. It turns out the blog post that recommended this plug combination with using the flashing tool had a comment at the end of the post (Which I did not read before starting out). It warned people that a recent update by the manufacturer fixed the hole that allowed users to flash a new firmware over the air.

Plan B was now in operation and I knew a soldering iron would be involved. https://templates.blakadder.com/index.html is a great website with a list of devices that can be used with Tasmota, which pins to connect to, how to get access to the pins and the template to control all the features Unfortunately the two plugs I now had awkwardly required the chip to be completely removed in order to flash them.

Due to lockdown, all I had at home was a soldering iron, solder and solder braid. No desoldering tools. After some effort, I managed to desolder the chip and connect the five wires required to flash the chip. Using the great tool Tasmotizer, it is straightforward to flash the chip with the wires in place. You can even give the WiFi details and config template.

Then started the job of putting the chip back in the board, soldering it again and putting all the parts back together. With a quick test, all was back working but another plug was still left one to do. In the previous photo above, you might have noticed a black plastic cover on the board that covers each plug. That cover blocks access to a pin required to put the chip into flashing mode and hence the need for all this desoldering. The second time around I checked if I could remove this cover and to my surprise, it came off.

\o/. With the cover off I could just solder wires to all the pins and not remove the chip from the board. This speeded up the whole process and made flashing the chip much much easier. A few crocodile clips, an FTDI programmer and we were in business. Both plugs are now ready to be controlled via WiFi API call.

I have updated the page on https://templates.blakadder.com/aofo_C379.html so anyone else flashing these plugs can know about this shortcut.

The rest of the project involved adventures in writing code for esp32 & esp8266 and problems with WiFi but that is for another time.

If you would like to see more photos from the project check out our gallery.

Engineering a Cleanroom Power Tool

This project has come about because of the need to use cordless power tools in a cleanroom. Large numbers of screws and fasteners need to be removed and reinstalled on equipment during preventative maintenance. The proposal is to use power tools to speed up the process and reduce operator fatigue. You might think that a brand new or well maintained power tool would not give off any airborne particles, but that’s not the case. Airborne particulates are a big problem in a cleanroom. They can damage equipment and ruin product.

There’s a huge range of cordless power tools available from all the big-name manufacturers that you know well. Testing some of these tools with a particle meter highlights the problem. Background airborne particle readings are zero, down to 0.1 micron.

When the tools are brought near the meter however, the results are off the scale. This is hardly surprising, given that these tools are not specifically designed to be cleanroom compatible. This particular tool was a reversible ratchet with a brushless motor, so the particles were not carbon dust from the motor brushes. They were more likely from bearings, grease, and the reversible ratchet head.

Having discussed with TOG members, the proposal is to build some kind of enclosure around a tool…. a second skin….. with a connection to a vacuum line. That way, any particulates generated by the tool get drawn away. The tool must still be usable obviously, so the enclosure cannot be so clunky as to make it hard to use. An enclosure or covering that is conformal & flexible rather than rigid might be best. It must not collapse under the suction force. Silicone rubber has been suggested and there are some suggestions around vacuum forming, heat shrinking, 3D printing and silicone molding. If you have any comments or suggestions, feel free to drop us a line.    

Lockdown Pinhole Photography

Keeping making during lockdown is important, so time to do some pinhole photography, which we’ve done before at TOG. It’s incredible what you can do with almost nothing….. just a can, a few bits and some photo paper. You can take amazing long exposure photos, like this 3 month long exposure complete with sun tracks.

If you’d like to have a go, we have a limited amount of photo paper available. Get in touch with us and we can post you a sheet.

Continue reading “Lockdown Pinhole Photography”

Raspberry Pi outdoor Camera

The project is to create an outdoor stop motion camera that can be powered over one cable and we can connect to remotely to monitor building site.

  • Shopping list:
  • Raspberry Pi 3 or 3. I bought Raspberry Pi 3 Model B+
  • MakerHawk Raspberry Pi Camera IR Fisheye Wide-angle 150-160 Degree 5MP OV5647 Webcam Automatically Switching between Day-Vision and Night-Vision Shooing Mode for Raspberry Pi 2B/ 2B+/3B/3B+/4B
  • Active PoE Splitter Adapter Power Over Ethernet 48V to 12V
  • POE switch 48V (already had)
  • 6.2″x3.5″x2.5″(158mmx90mmx64mm) ABS Junction Box Universal Project Enclosure w PC Transparent Cover
  • Nylon Cable Gland with Locknut
  • CAT5 cable (internal or external)
  • AmazonBasics Circular Polarizer Filter – 77 mm

Software we are running on on Pi is Raspberry and the image capture is imgcomp by Matthias-Wandel https://github.com/Matthias-Wandel/imgcomp (very easy and well documented how to setup)

Things left to do:
Mount camera on off stands so camera is closer to camera filter.
Setup backup fo images nightly to google drive (rclone) https://rclone.org/