Spacesucker (CO2 removal tool)
The fan is a 230V single phase type. With a regular dimmer it failed to start or was just uncontrollable. On full speed it makes a bit too much noise, so running at full speed is not an option.
The CO2 meter at the space has three LEDs that indicate how much CO2 there is. The yellow LED lights at 1200ppm, the red at 1600ppm.
The dimmer is built around a U2008 chip which is connected to the microcontroller via an optocoupler. It accepts PWM from the microcontroller. The PWM frequency is fairly low, the opto is a cheap and slow one. But it does not matter much, on the dimmer side there is enough filtering to get a stable analog voltage for the dimmer chip.
The microcontroller system: The ATmega88 controller has plenty of flash memory for driving the LED display, reading CO2, switch and spacestate inputs, reading out the potentiometers, driving the dimmer with PWM and sending messages through the air.
The dimmer chip is a U2008. It was first running in soft-start mode, but the motor was producing more and more noise each week. In the end it stopped running on low speeds. Only a humming noise left. Maybe it was only supplying half wave current to the motor. It might have magnetized something doing that causing the motor to b0rk. Later the dimmer was converted to the current sensing type, the motor has run fine ever since!
Later there was also added a nRF24L01+ module to send the current speed throught the air. This is picked up by the jukebox player system which also gathers other nRF data such as the current CO2 level.
The AVR software can be found at Github