User Tools

Site Tools


dimmer

Building up a Dimmer

Please note that this dimmer is for CLF lamp power supplies only that support 1-10V input (Osram DIM interface) as described on the homepage. It is not for connecting lamps directly to it.

Needed Parts and PCB

You need a PCB. You may use the layout from Github and etch it yourself or order the PCB or a complete kit.

Partlist (in buildup order)

Amount Part Placing Picture
1 PCB Dimmer pcb_dimmer.jpg
7 Diode 1N4148 D1-D7 diode_1n4148.jpg
1 Resistor 680R blue-gray-brown R1 resistor_680r.jpg
2 Resistor 1k brown-black-red R2, R6 resistor_1k.jpg
1 Resistor 1M brown-black-green R4 resistor_1m.jpg
1 Resistor 1k3 0,1% brown-orange-black-brown R3 resistor_1k3_0p1.jpg
1 Resistor 100R 0,1% brown-black-black-black R5 resistor_100r_0p1.jpg
1 IC holder IC1 ic_holder.jpg
1 Voltage regulator 78L12 IC3 ic_78l12.jpg
1 Voltage regulator LP2950Z IC4 ic_lp2950z.jpg
2 Transistor BC547C T1, T2 transistor_bc547c.jpg
1 LED 2mA LED1 led_yellow.jpg
2 Capacitor 220nF C5, C6 capacitor_220nf.jpg
2 Capacitor 10µF C1, C4 capacitor_10uf.jpg
2 Capacitor 100µF C2, C3 capacitor_100uf.jpg
1 Connector AVR ISP 6pin JP1 connector_isp.jpg
3 High Voltage Connector 2pin X1, X2, X3 connector_clamp_2pin.jpg
1 Connector 1 pin header (for power + serial TX debugging) JP2, JP3 connector_pinheader.jpg
1 IC ATMega328 IC1 atmega.jpg
1 Fuse holder F1 fuse_holder.jpg
1 Fuse 50mA T F1 fuse.jpg
1 Relay Omron G6D (12V) K1 relay_g6d.jpg
1 Transformer 15V TR1 transformer_15v.jpg
1 Transceiver PCB RFM12B IC2 ic_rfm12b.jpg
1 Antenna (82,2mm wire) antenna.jpg

Buildup of PCB

As always: start from flat to high. Go through the partlist and solder the parts from the top ones to the last ones.

For some parts, you have to consider something special:

  • IC holder: Look at the notch and place it in the right direction.
  • Transistors and voltage regulators: I suggest soldering the pins after one another only after a pause of about half a minute to let the part cool down. If you stick all transistors and regulators through the PCB, you could solder only one pin of each part, then cut the overlapping wire and then continue to solder the next pin of each part.
  • LED: Solder it to a wire if you want to place the PCB in a housing later. Read the instructions on how to solder the LED to a cable. The longer wire of the LED is +. It goes into the hole more in the middle of the PCB.
  • ISP Connector: The notch is marked on the PCB and points to the smarthomatic logo.
  • Capacitors: The marked side on the capacitor is -. On the PCB, + is labelled.
  • ATMega: Before inserting it, you may want to check the voltage levels when switching the power on. Pin7 should have VCC (3.3V) against pin8 (ground). If you have different voltages: don't panic, nothing is broken, nothing is fried. Search your error. To insert the ATMega, bend the pins at 90 degreed by placing the ATMega on the table and bending it carefully. Then insert it into the IC holder. Be sure that you are not charged with electricity (ESD!) when touching the IC pins.
  • RFM12B: You should also check the voltages first before soldering the module. At the place for the radio module the pad beside the antenna and at the opposite side the third pad should read about 3.3 V. For soldering, read the RFM12B mounting instructions.

(Image directly loaded from external GitHub source. If it doesn't work, fix link in wiki!)

Bringing the device into operation

Don't power the circuit immediately by the 230V transformer. It is highly recommended to connect only a DC power supply to JP2 at 14.5 to 20V at the beginning. You can then safely set up and test everything without using dangerous high voltages.

Flashing the firmware

If you have a new ATMega where nothing is flashed onto, download a prebuilt binary package or build your own firmware. If you bought a hardware kit, the ATMega should already be flashed.

After flashing and switching the power on, the LED flashes several times. The relay stays off. If you switch the dimmer on with a switch at JP4 (near the LED), the relay should switch on.

Integrate it into a housing

You can either use an extra housing or integrate the device directly into the housing of a CFL lamp. See the picture on the website for an example.

It is very important to use shielded cables for the 1-10V control voltage. If you use unshielded cables and they are near the high voltage cables, interferences can crash your microcontroller when you switch on the lamp.

dimmer.txt · Last modified: 2015/02/08 19:23 by breaker27