The analogue signal I showed in the previous article feeds into the ADC of an STM32. This was the STM32 can digitise the signal and send it over USB to my Mac.
I’ve seen some cool tricks you can do by measuring the electrical signals of the body. One of these was using electrooculography (the measurement of the electrical signals of the eye) to detect movement of the eyes.
I looked about online and found the Spiker Shield by Backyard Brains, which is a board designed to interface with Arduino and measure EEG/EOG/ECG signals but it didn’t quite match my requirements – I wanted multiple channels and I wanted to work with an ARM processor. Luckily their design is open source so I took their basic analog design and built my own digital interface.
For STM32 development I use STM32CubeMX to generate the project and the initialisation code, and then I load it in SW4STM to edit and compile the code. One of the main attractions of STM32CubeMX is that it sets up all the of the dependencies and middleware in your project configuration.
I was modifying my Post-Build steps in Project->Properties->C/C++ Build->Settings when I accidentally deleted all of the entries in my configuration by clicking “Restore Defaults”. This cleared all of my compiler, linker and assembler settings that STM32CubeMX generates.
A couple of things went wrong on the first PCB. Firstly, the fab I used did not support V-grooves, which meant that instead of being able to mount the BBC MicroBit vertically by snapping off the top section of the PCB, it had to mount horizontally. Secondly, I needed to include level translation so that the MicroBit (which operates at 3.3V) could talk to the LEDs (which operate at 5V).
I don’t have a good track record with mechanical projects – anything that moves. I do much better with purely electrical devices. As soon as you have moving parts you have to deal with things like friction, backlash, wear, tolerances, inductive spikes… I don’t like any of those things. Every couple of years I forget this and think it’ll be different this time, so here is another mechanical project.
A couple of years ago while still at university I started a balancing robot project. I quickly gave up. The reason was that my robot was free standing and balanced on two wheels. There were a number of issues:
- The robot would run around and I didn’t have enough space of my desk to allow it to balance
- The programming cable would restrain the robot so I also had to unplug my programming cable each time I wanted to test it – not ideal for quick iteration
- It was hard to control the environment and get the motors aligned
- The robot could not have an external power source so had to rely on batteries
This time I am still going for a balancing robot but I am going for a rotational robot, rather than a free standing robot.
This project ultimately just uses the power of the BBC Microbit to communicate via radio and control the LED strips, therefore this board started out purely as a passive breakout board to mount the MicroBit and connect it to the LED strip but quickly became more complex.
I used Python all the time but I’m normally a bit skeptical about microPython for similar reasons as I am skeptical about Arduino – both of them seem too much like doing hardware from a software approach. Nonetheless it seemed like a reasonable tool for the job in this case.
For my new room I invested in a pair of nice wifi speakers and I want visuals to match so I decided to build an LED controller. Of course, I can buy off the shelf LED controllers, but I want to program my own light patterns and also it’s more interesting to build my own.
I still haven’t got round to shipping all of my equipment from the UK – until this week I didn’t have a multi-meter and I still don’t have my oscilloscope, so I’ll put off talking about hardware for a bit.
I decided to use a BBC microBit which is most easily programmed in microPython. It seems suitable for the job because my lighting is something that I might want to tinker with from time to time, and Python (and so presumably microPython) is quick and easy to iterate. I could build my own microcontroller circuit and program it in C, but really what new would I learn?
I have an interest in capacitive touch at the moment – I have no particular project in mind but I wanted to see the current state of cap-touch solutions so that I could use it in a future project.
To test it out I made a board with a single touch pixel. I can use this board in other projects as a drop in touch solution. I decided to go with Microchip’s (formerly Atmel’s) qTouch library with their Peripheral Touch Controller (PTC).
This project started about two and half years ago when I took an FPGA class at MIT and the professor happened to give me an HP1662AS logic analyser that MIT were throwing out. Despite the fact that I lived in the UK and this thing is massive and weighs 20kg I took it anyway. I thought it would be a cool project to replace the cathode ray tube with a larger, LCD display. I thought I would get this done before I left the US three months later… Little did I know it was going to take me another two years (although not of continuous work). Now I am nearly done, and just in time to ship it back to the US when I move back for work.
I was soldering a QFN-25 in flip-chip configuration and forgot which way round I soldered it… Here’s how I figured it out.