We are committed to building in public, which means that you get to see the details of every small step we take towards production of The Mighty Oak.
WS2812Bs are individually addressable RGB LEDs, commonly known as neopixels. They are my favourite thing.
Traditional RGBs will have 4 legs: one for each colour (red, green, blue), and either a ground or power leg, depending on the polarity. Chaining together these RGBs is simple enough, if you want them all to be the same colour. But if you want each LED in the chain to be a different colour, then you're in for some complicated hardware design.
In order to control the colour of individual LEDs, Neopixels are your answer. Each LED has it's own microcontroller that reads in data and sends it on to the next LED in the chain - meaning that only one connection (data) is required for the Arduino to control all of the LEDs individually and simultaneously.
Usually these LEDs come in premade strips, perfect for cosplayers and millenial home "improvers", but finnicky for specific prototyping setups. After some searching I found some individual Neopixels that have breadboard friendly holes - all I needed to do was solder on headers. Thanks to the open source power of the Arduino language I was able to get them up and running in minutes.
I'll be using these LEDs as bypass indicators in the final design, with the added benefit of adding in some colour animations for a striking visual effect. For now I'm contented watching the pretty lights.
The MCP23017 is a GPIO expander for MCUs that is well supported by the Arduino. Being an I2C device it requires only two connections to the Arduino (data and clock) in exchange for an extra 16 general purpose in/outs.
Early experiments with The Mighty Oak had the user's settings displayed through an array of RGB LEDs, which meaning the expanding the Arduino's pin options was essential. The LED array would provide a visual display of all of the user's settings, though would require the user to read/have a rough understanding of binary numbers. This idea was scrapped, for obvious reasons.
The design has been simplified by the inclusion of an LCD display, rather than an array of LEDs. This reduces the number of GPIO necessary, and may even eliminate the necessity of the MCP230127 altogether.
However, for now I will use the expander to handle all of my button inputs (6 footswitches and 2 tactile), leaving my Arduino pins free for further experimentation. This has the added benefit of moving all of my buttons to a soldered perf-board, rather than pressing tactile switches on an extremely loose connection prone breadboard. It has already saved me much frustration. Since I had the space I soldered in a rotary encoder too, you never know when it might be handy.
It's been a good number of years since I've touched a microcontroller. I remember being dropped in at the deep end in university with some variation or other of the Texas Instruments MSP, and being asked to make an optical theramin. I ended up hating it. Can you imagine going straight from OOP Python to addressing registers and dealing with memory management? Talk about a shock to the system. It's no wonder that I was put off microcontrollers altogether - thanks, university.
You can imagine my elation, then, when I discovered how simple the Arduino is to use. Why was this little bundle of joy not my first exposure to MCU development?
The Arduino language itself is easy to grasp, and pairs excellently with the Arduino IDE to make writing and uploading code siwft and easy. The open source libraries make things like debouncing buttons a doddle, and offer a level of abstraction to rival Python istself.
I'll be using the Arduino to develop the user interface for The Mighty Oak, and communicate through ISP to digital potentiometers that will control the analog circuit. Eventually I will embedd the atmega 324 into my own PCB for protyping and production. For now though I'm happy to have achieved some button presses and flashing LEDs, in less than half the time it would have taken me with the uni provided development board. It's fair to say I've fallen in love with the Arduino so far.