Skip to main content

Quark One Bootloader

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:

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!


Popular posts from this blog

Simulink 2x1 MIMO Channel Estimation Test

I have been working on a MATLAB Simulink based Alamouti testbed for USRP software defined radio. I am using the Ettus B210.

I have implemented a very simplistic channel estimation scheme whereby I transmit each of the four QPSK constellation points on each antenna consecutively. I then receive using a single antenna, and after all of the frequency and phase synchronisation I divide what was received by the ideal constellation leading to a simple H-matrix.

Check out this video where you can see the pilot constellation change as I move the antenna! Awesome!

Custom VCSEL Bias Driver

I have been working on a laser diode bias driver for a while now, in line with my latest research project. ThorLabs recently released some great looking bias driver "chip" things, the MLD203 series. I felt that I could use these on a custom board to modulate laser diodes and VCSELs using my USRPs.

In the image above (and below) you can see the two red PCBs which I have designed and constructed. The bias driver (left) connects with an SMA connector to a Bias-T from Mini-Circuits to to TO-Can laser diode adaptor PCB which is visible on the right. I have designed everything to be low noise and high frequency compatible.

Unfortunately, I made a mistake with the laser diode footprint and so I had to mount it upside down! I soldered a SMD capacitor at the point where the little red wire connects to the diode to minimise adverse high frequency effects.

Check out the Git repo for this and more:

Aligning an LG Mode Sorter

The so-called "mode sorter" is a great optical device that allows for easy separation of Laguerre-Gaussian (LG) modes [Berkhout2010]. Combined LG modes, which contain Orbital Angular Momentum (OAM) are input to the one end of the mode sorter and on the other end they are output as "spots" which can be detected with a camera, fibre array, etc. This naturally has many uses in optical communications and physics in general.

I have been working with one of these devices and since the alignment is very tricky, I felt that it would be useful to document it here for my own reference and hopefully that of others!

The first thing to make absolutely sure of is the incoming beams' level. This beam must be perfectly parallel to the axis of the mode sorter, otherwise getting the alignment right after the installation of the mode sorter is close to impossible. I find it useful to mount the mode sorter in a pair of lens mounts. Before installing the sorter, use one of the mount…