The main goal of this device was to control 2 RGB LED strips hanged under the ceiling. However, currently it supports temperature reading
from Dallas 1-Wire DS18B20 sensor, provides a few inputs and outputs as well as buzzer notifications.
6 PWM outputs for 2 RGB LED strips
4 debounced inputs
1-Wire protocol implemented for Dallas DS18B20 temperature sensor
STM32F103C8T6 ARM-based microcontroller running at 48MHz
Input voltage: 12V (DC/DC converter used to provide stable 3.3V)
Programming by the RS232 interface (own USB bootloader in future)
The device is controlled by the powerful ARM-based microcontroller - STM32F103 in LQFP package with 48 pinouts. Previously,
ATtiny2313 was used but, because of the limitations in PWM outputs and lack of hardware USB controller it was impossible to
implement so many features as with STM32.
The device is powered by the DC/DC converter. It allows to power the device with wide range of input voltages (but restricted by
the LED strips) without the need for heat sinks. The usage of the linear regulator is very inefficient here, because the logic circuit
can consume up to 100mA and dropping from 12V to 3.3V at 100mA leads to wasting almost 1W as heat.
The internal USB hardware in combination with [url=https://github.com/KrystianD/stm32-public/tree/master/usb]my own simple USB high-layer framework[/url] for STM32 was used to provide communication
with the KDHome application on the PC.
USART was used to implement 1-Wire protocol as described
[link=http://www.maximintegrated.com/app-notes/index.mvp/id/214 title=here]. As a result, there is no limitations in using of the
interrupts during the time-critical 1-Wire protocol management, because each bit of 1-Wire message is sent as 1 byte using the
internal, independent from the main program flow, USART module. STM32 allows to configure USART to work in the half-duplex mode,
so the only one pin of µC is used (TX).