copy from that site and added extra 3 more lamps to work on.
Hello, how did you solve the reverse state of PWM?
@jon123456 to reverse state is pretty simple, use code from arduino ide is using map, i.e. reversedpwm1 = map(pwm1,0,255,255,0); where pwm1 is your actual pwm and reversedpwm is the reversed state of pwm.
@jon123456 or change the state of the LED, i.e LED cathode connected to ground and anode is the input via a resistor, to reverse the state put anode to 5v and the cathode is the input via resistor. Take your choice.
Hi, I make the same you but the R1, R2, R3, R4 (100k 2w) is so hot. Does your R1 hot too?
Ps: I use with 230VAC input
@rfid.viet yes, with the 2W resistor think max out with a little breeze 160C, that should be ok. Keep a gap between the resistors and the PCB. Temperture would increase more in a box. I have a look at other alternative like mini SMPS to reduce to 24V instead of 340V. although cost more.
@rfid.viet Yes, mine too is a 230VAC
1,303,594 Engineers Chose EasyEDA
© 2019 EasyEDA All rights reserved