| CPC H05B 45/10 (2020.01) | 8 Claims |

|
1. A controller for a bathtub lamp, comprising an MCU module, an R2R network module, a DCDC module and an LED module which are electrically connected in sequence;
the MCU module comprises an MCU chip; the R2R network module comprises a plurality of R2R networks, and the DCDC module comprises a plurality of DCDC circuits; input terminals of the R2R networks are electrically connected to the MCU chip, and output terminals of the R2R networks are electrically connected to feedback terminals of the corresponding DCDC circuits respectively; output terminals of the DCDC circuits are all electrically connected to the LED module;
the MCU chip is used for generating digital signals corresponding to different brightness levels and generating, according to values of the digital signals corresponding to different brightness levels, binary codes which are output parallelly to control an on-off state of resistor pairs in the corresponding R2R networks, and adjusting the DCDC circuits to drive an output voltage of the LED module, and stepless change of the output voltage is realized by means of capacitors of the DCDC circuits.
|