Posts

Showing posts with the label Arduino

Sonoff S31 Disassemble and Flash Instructions

Image
I recently bought some Sonoff S31 "smart outlet" switches, as I like the form factor better than the Sonoff Basic and the larger Sonoff S20.  I was able to disassemble and flash them with the fantastic Sonoff-Tasmota firmware from Theo Arends . Disassembly instructions: 1. The darker colored square panel with the button on it snaps off.  Pry it carefully off from one side to remove it: 2. There's two "slide-out" corner pieces on the male plug side. Slide these towards the button side: 3. Remove the three screws that are now exposed: 4. The case containing the female outlet side should separate easily now.  No prying necessary: 5. The circuit board is actually two boards soldered together in an "L" shape.  The small edge with the button on it contains the serial header for the ESP8266.  From the top down, the connections are VCC, RX, TX, N/C, N/C, GND   (Notice the two unused pads labeled TX & RX.  They don'...

Generic $5 128x64 OLED SPI display with Arduino Pro Micro

Image
I bought a couple of ~$5 generic 128x64 graphic OLED displays on eBay to play with.  It took some trial and error to figure out how to get the Arduino Pro Micro to talk to them, and there's lots of different information on the net about doing so (probably owing to the wide variety of implementations of these displays and generic controller chips.) This particular one uses the SD1306 controller and is wired for a 4-wire SPI interface. I used the u8glib library to talk to it.  The "gallery" page on the library repo provides lots of examples of people's various combinations to make these work.  This particular one wasn't shown, but by perusing through the different examples I was able to find a combination that worked. Wiring: I'm using the SW SPI function of u8glib, so I don't have to use the ARM chip's native SCK or MOSI pins.  I found that this device will accept data without the CS pin connected (pulled low instead), so I left that out to s...

Programming a generic STM32F103C board in Arduino

Image
A while back I purchased some generic STM32F103C8T6 development boards on eBay for about $4 each.  I initially had some limited success programming them using the GCC ARM Embedded (eabi) toolchain and a generic STM32 loader program.  Since then I've discovered a project to get them working with the Arduino 1.5+ toolchain. There's a lot of different information about the various STM32 boards out there.  I'm documenting my notes here mostly for my own sanity since I don't play with these boards often.  Maybe you'll find it useful too. Arduino hardware library for these boards: https://github.com/rogerclarkmelbourne/Arduino_STM32 "Support" forum:  http://www.stm32duino.com/ The USB port The generic boards do not have a meaningful USB bootloader.  The USB port is only useful for power.  (TODO: Flash the "Maple Mini" bootloader onto them for future ease of use?) Arduino Board Selection & options Tools -> Board -> Generic S...

Arduino-based barometric altimeter / altitude deviation alerter

Image
While working on my instrument training, it occurred to me that I had everything I needed in my parts bin to build a device to help alert me to deviations in altitude. So, I built MonkeyAltimeter. It started off on a breadboard while I worked on the code: Then, I took it for a flight test (primarily to see how accurate it was in the cabin and see if my VSI routine worked): Finally, I designed and printed a simple case for it: The details,  parts list, operation manual, &etc are here: http://www.thingiverse.com/thing:942832 The source code is here: https://github.com/phreakmonkey/MonkeyAltimeter Enjoy!