This lab module will walk you through connecting the components to test the operation of the dispenser without having to build the entire dispenser at this time.
By the end of this module you will:
Building the dispenser takes up a lot of room. For now, just remove the parts mentioned below and leave the rest in the zip-top bag. Promise: you will build the entire dispenser!
The LED Ring is controlled by the microprocessor, and is used to display the status of the overall application. It is powered and controlled by the microcontroller and the firmware you will compile and flash.
The Controller Board serves a few functions.
Follow each step in order and use the Click to open for detailed step-by-step instructions if required.
Take these five components from the zip-top bag (you should already have the ESP32 microcontroller and USB cable out from earlier testing):
Install the LED Ring into the WS2812
3-pin connector on the back Controller Board with the tab aligned with the connector slot. Turn over the Controller Board and attach the 9 Volt battery lead.
Align the microcontroller to the dual inline socket on the other side of the Controller Board, aligning the large metal square package over the 9 Volt battery extending out from the controller board. Make sure all pins on the ESP32 are aligned with the socket, the pin tips slightly inserted, then gently insert until all the way in.
It is very easy to accidentally bend the pins on the microcontroller. Turn over the Controller Board with the socket facing up, and then with your other hand gently position the microcontroller pins into the holes. Once all are in place, gently apply pressure equally (center of microcontroller works best) to insert all the way in. If you accidentally install backwards, place a finger underneath one end of the microcontroller and apply pressure to lift slightly. The do the same on the other end and alternate back and forth until the microcontroller is out of the socket.
Insert the USB cable’s Micro USB connector end into the microcontroller, and the Type-A connector into your laptop. The red LED on the microcontroller indicates power, and the Ring LED may light up, but if it doesn’t, that is okay. Next, check that the serial port tested in the Laptop Setup module is there. Use the serial monitoring software to connect to the serial port. Press the button to the left of the USB connection (reset) and verify that you see text scrolling in the serial monitor window after each press. Exit your monitoring software.
A Micro USB to Type-A cable is provided as part of the kit. If your laptop only has Type-C connector and you have a Micro USB to Type-C cable, make sure that it supports both power and data connections. The workshop presenter may have Micro USB to Type-C cables to loan out.
If after connecting the microcontroller, the controller board, and the LED, you get errors about insufficient power or the red LED doesn’t not stay lit, your laptop or USB adapter may not be able to provide sufficient power. In that case, remove the microcontroller and connect a 9 volt battery to the controller board. It is connector under the microcontroller and not the one on the back next to LED Ring connector.
Please ensure the following checkpoints are validated before moving on to the next module.
screen
(CTRL-a CTRL-\
, the y
).Why are we only installing a few pieces of the entire dispenser instead of building it now?
When doing embedded software development, it is easier to work first with a microcontroller development kit and the accessories you will be controlling. Normally this would be done with a breadboard or some other development kit (devkit). However, for those that are not familiar with that process, using the minimum pieces now will allow us to incrementally test the system up to the final build of the dispenser.