In 2015 I decided to try out the ESP8266 line of WiFi modules. I did a lot of reading and I determined that I didn't like they normal way people used them. I decided that the ESP modules needed an additional microcontroller to be truly useful in terms on analog to digital conversion and other IO features.
The Quark One was born. I will write about the hardware details in another post. Suffice to say, I wanted to try out the Atmel Xmega microcontroller due to it's relatively low cost and great feature set. I also wanted everything to work with the Arduino IDE!
Typically, when people connect an ESP module to a microcontroller, they flash it separately and then integrate everything. I didn't like this way of doing things and so I hacked together and then polished a new bootloader for the Xmega which presents two separate USB devices to the computer it is connected to: the first device is the CDC Xmega bootloader, as one would expect. The second device is a CDC that passes through the chip to the ESP module! You probably guessed it by now, but I used the USB device built into the micro and then one of the hardware serial ports to interface to an ESP-01 module.
The Quark One bootloader deals with the reset signals to enable the ESP to be programmed from the Arduino IDE as if it was simply connected to a USB to Serial converter! To write code and flash the ESP, you do so in the usual way. To write code for the Xmega, I had to extend the xmega-arduino library to include the Quark One pin mapping. Otherwise, this is also standard!
To activate the bootloader I took some inspiration from the Arduino Lilypad type devices. A quick "double click" of the reset button on the edge of the Quark One puts it into bootloader mode.
Check out the source code on GitHub: https://github.com/ManCaveMade/QuarkOne-Bootloader
The bootloader should work on any Xmega chip that has quite a bit of bootloader flash... I used the Xmega128A4U.
Let me know what you think!
After several stability issues with my home automation controller I have decided to separate things across different devices. My latest (and...
For a project we are working on we invested in a ThorLabs KPA101 Position Aligner and a very sexy looking piezo actuated mirror mount as wel...
Although Mikrotik do sell a nice metal case for their excellent RB433 RouterBoards, I have a RB435 because I need gigabit Ethernet and there...
It seems like an obvious thing that's missing from the excellent Sonoff modules out there: an input for an external button (or two or fo...