Electrical
Last updated
Last updated
A part of my role in the group was the electrical and software designer. To enable maximum control for the users, I designed the following electrical system:
Here is the list of parts and their functionalities (click to expand):
It is the brain of the device, controlling the motor, LCD screen and listening for users' commands from cloud input or physical buttons and dials.
The complexity of the project required multi-processing, which was never taught in our engineering coursework. After deep research, I successfully split the control into two systems, operating individually in each of the ESP32's cores.
This part required 12 wires, including 4 power wires and 8 information channels, to be operational. The purpose of the screen is to show users the shaking speed and remaining time. Due to the back EMFs and noise generated by the motor, the LCD screen is prone to display errors. I tried various approaches to debug:
Adding capacitors. I added a "big" capacitor (100 micro feret) between the 5V and ground and a 0.1 micro feret capacitor between the motor power wires. Their job was to reduce noise and provide current to stabilize the power supply, since the motor demands a tremendous amount of electricity going from stationary to moving.
Modify the WIFI and MQTT settings. I strategically changed the timeout time in wifi startup and MQTT (part of the IoT integration) to prevent those commands from drawing too much CPU resources, so that other commands can be processed in a timely fashion.
The combination of two approaches finally reduced the probability of error from 1 out of 2-3 operations (when the user uses the shaker, it counts as one operation) to 1 out of 15+ operations.
The entire system is powered by an 11.1 V LiPo battery. However, since all electronics components require 5V power, and the motor requires 6V, I used two power regulators to ensure a stable and accurate voltage supply.
The blue regulator (step-down) drops the voltage to 5V, and directly powers the circuitry, while the red regulator (step-up) increases the voltage to 6V for the motor.
Allows the users to start the shaker manually. The indicator light on the push button is tied to the status of the shaker: when the shaker is running, lights on; if the shake completes, off.