Take control!

January 29th, 2018 3 min read

Series

This post is part of the Activity Board series. Check out the other posts here:

    Tags

    Ads via Carbon

    In my last activity board blog post I finished the final part of the control panel. It is time to start working on the electronics. Or to use a bit more exciting terminology: it is time to work on the activity board controller!

    image

    Enzo did enjoy playing with the current test setup. But a breadboard with an explosion of unorganized wires probably wont last forever. Not to mention most of the items aren’t connected yet. Time to work on a more professional and permanent solution.

    image

    To get a rough idea on how I want to connected everything, I use KiCad to make a schematic diagram. The schematics aren’t very complex, but due to the number of items I want to connect, it does include a lot of connections. And since I want to debounce all the buttons and switches, I also need to throw in a hand full of resistors and capacitors.

    The only “exotic” component of the activity board controller is a MCP23017. This is an I²C IO expander. The Arduino Nano I’m going to use doesn’t have enough in- and outputs to connect everything I want. So this easy to use IC is going to help me out.

    image

    I initially planned to build the activity board controller with the help of some perfboard. But after I counted all the connections and components, I quickly decided that a 2 layer manufactured PCB would be a better choice. So, with the help of KiCad and a few cups of coffee, I managed to sketch up the layout above.

    image

    Once again, the KiCad render function helps me to visualize the end result. It sure as hell looks rather impressive for a self made kids toy.

    image

    So now the waiting begins. Luckily I recently discovered AllPCB. Extremely cheap prices with lightning fast delivery. (And no, this is not a sponsored post!) So within 5 days, the package above arrived on my doorstep for only $18,- Sweet!

    image

    This is the beauty of hardware design: It’s so satisfying to physically hold your own design!

    image

    With the huge amount of 0805 SMD parts, I decided to put my hot air rework station to work. So after applying some solder paste by hand (I didn’t order a solder paste stencil), I use some tweezers and a lot of patience to put everything in place.

    image

    A little bit of heat later, everything is soldered in place.

    image

    The JST connectors, the Arduino and one big capacitor are soldered in place with my old fashioned TS100 soldering iron.

    image

    After connecting an USB cable to my Arduino, I’m relieved to say the power led did what it had to do. Time to mount the controller to the activity board.

    image

    With the help of a 3D-printed spacer/mount, the activity board controller is held in place. And due to all the convenient JST-connectors, everything is connected within a few minutes.

    Now, It’s the moment of truth. With the help of some rudimentary test code I can test if everything works as intended. The code helps me to test the following functions:

    • Control the WS2812 LEDs.
    • Control the regular LEDs incorporated in the main switches and rockers.
    • Read the input of the 13 buttons/switches and rotary controller.
    • Control the MAX7219 7-segment display.
    • Read the slide pot value.

    And as you can see in the (not so beautifully filmed) video above, these functions work as intended. Awesome!

    Next step? Work on some more advanced code.

    Loading comments …
    ©2021 - MichaelTeeuw.nl