# Light control module for light control of the "convi" zone of Electrolab

***

This project is an open-source control module for the lights in the "convi" zone of the association HQ.
The Electrolab association has a "convi" zone with multiple light sources that need remote control for conferences and presentations, and also for energy saving.

## Description

This repository contains all the hardware design.

Multiple MCU boards target are proposed :
- Discovery STM32F746G evaluation board from ST. It features a touchscreen that will provide the HMI for the light control, as well as Ethernet connectivity.
- Nucleo STM32F207ZG from ST. It features Ethernet connectivity.
- ESP32-POE module from Olimex. It provides Ethernet and Wi-Fi connectivity.
- ESP32-WROOM-32 (or equivalent) module from Olimex. It provides Wi-Fi connectivity.
Only one of these boards can be used at a time, but the footprints for both are provided, in order to give some flexibility for the choice of the main MCU bard.

The target enclosure is a [G373 from Multicomp](http://www.farnell.com/datasheets/1724048.pdf?_ga=2.97583647.1827600163.1585775382-1006352058.1573488393
), compatible with [Gainta G373](http://www.gainta.com/en/g373.html).

The board provides a hardware interface between the 8 PWM outputs of the MCU board, with power supply and 0-10V analog outputs through filtering and voltae scaling.

## Pinout

Pinout for the Discovery STM32F746G is:
- PWM1 - TIM1_CH1		-> PA8 / D10
- PWM2 - TIM1_CH2N	-> PB14 / D12
- PWM3 - TIM4_CH3		-> PB8 / D15
- PWM4 - TIM4_CH4		-> PB9 / D14
- PWM5 - TIM5_CH1		-> PA0 / A0
- PWM6 - TIM5_CH4		-> PI0 / D5
- PWM7 - TIM12_CH1	-> PH6 / D6
- PWM8 - TIM12_CH2	-> PB15 / D11

## Embedded software

See the corresponding SW repo : [LightControConvi_SW](https://code.electrolab.fr/Flax/lightcontrolconvi_sw)

## Tools
- [Kicad 7.0](https://www.kicad.org/download/)
- [Discovery STM32F746G](https://www.st.com/en/evaluation-tools/32f746gdiscovery.html)
- [Nucleo STM32F207ZG](https://www.st.com/en/evaluation-tools/nucleo-f207zg.html)
- [Olimex ESP32-POE](https://www.olimex.com/Products/IoT/ESP32/ESP32-POE/open-source-hardware)
- [Olimex ESP32-WROOM-32](https://www.olimex.com/Products/IoT/ESP32/ESP32-WROOM-32/)
