Doll House Dimmable Lights

I have a Dolls house and I want to have lights (led) in the rooms.
There are about 20 Led in total - I want each of these Led to be dimmable.
i will be using a Nano along with a Adafruit_PCF8574 for the buttons to turn the individual lights on/off.

I think I need a breakout board for the Nano but not know which one.

Any suggestions would be welcome.

Might be simpler to use addressable LEDs for this since you'll only need one output pin for all of them.

I will look into that, however some of the led are already in items of furniture and I think it would be difficult to change them.
ie. I have a lamp that is prewired and currently works as on/off .

A few years ago, I did this with shift registers and software PWM, running 72 LED channels.

Basically shiftOut() with a bunch of 74595s pumping out the individual LED PWM streams.

Youtube link.
Of course - you don’t have to v chase bli or dim anything if. you don’t need to.

74HC595 shift register (Q7S to cascade more 595s with more LEDs)
https://wokwi.com/projects/357578992212960257

Nice. What refresh rate were you able achieve, and how many levels of dimming?

What was the microprocessor cocktail clock frequency?

Asking for a friend.

a7

that was using a 4MHz PIC about a decade ago !

I can’t remember the refresh rate I achieved, but it was using a corrected 8-bit PWM to get near linear dimming of the LEDs.

You can see very slight ‘stepping’ in the slow fades on the video.

Many ways to skin a cat.
I have used the 16-channel PCA9685 12-bit PWM driver to dim LEDs.
12-bit dimming is a lot smoother at low light values.
Leo..

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.