Go to content Go to menu


First prototype

I started considering the development of an LED control unit that would replace the TC420 unit about a year ago. The reason was insufficient TC420 unit’s parameters; mainly its low PWM resolution (just 101 levels) which avoids smooth transition of the light intensities. So, with an idea on what the unit should do and motivated by several people I started developing.

Due to lack of time, I was mainly developing during my commuting to work by train. First, I started looking for a suitable MCU which would be capable of LED control and allow communication as well. I chose ESP32 that has a PWM peripheral designated for the LED control. Further, it has BLE (Bluetooth + Low Energy) and WiFi. I didn’t want to use any cable communication.

Well… I had never worked with ESP32. I had to study how it works. It is programmed in the C language. It uses the FreeRTOS system I had to learn as well. On the computer side I had to learn how to write applications in Windows 10 using the C# language. And yet one more challenge: understanding BLE on the controller’s side and on the Windows’ side.

I started coding at the end of the summer of 2018. By the beginning of May 2019, I had the first prototype capable of 4-channel PWM generation with the frequency of 600 Hz and resolution more than 0.001 %. The calculations are performed in 64-bit integer types. The channels are updated with the frequency of 100 Hz, i.e. 4 times faster than the human eye. It is controlled by a UWP Windows 10 application connected via BLE. For the time being, the application allows adding/removing a unit, turning on/off, setting time and monitoring. The table is pre-programmed.

In the last couple of days, I created a simple hardware for a one-channel test with the LED. The pre-programmed table was:

Time PWM
13:00:00 0 %
13:00:10 13:00:40 0 % 2 %
13:00:40 13:01:10 2 % 10 %
13:01:10 13:02:30 10 % 0 %
13:02:30 13:04:00 0 % 100 %
13:04:00 13:05:00 100 % 0 %
13:05:10 50 %

The test is filmed with a light on an aquarium. To facilitate the comparison of the light intensity to the current PWM value, I put a phone running the application in front of the aquarium. The application is same on PC. An advantage of the UWP application: one code, diverse platforms…



Add comment

Overview of comments

There have not been any comments added yet.