Powering 48 28BYJ-48 stepper motors with ULN2003s

Hi I'm looking to power 48x 28BYJ-48 stepper motors with ULN2003s to build a clock. The steppers will rotate every minute.

My circuit consists of a DOIT ESP32 WROOM, a DS3231 RTC and 24x 74HC795 shift registers daisy chained together. For every shift register, there are two ULN2003s attached, each driving its own 28BYJ-48 stepper motor. Via SPI I pass out bytes as required to step the stepper motors. This works as expected running 5 stepper motors. (https://youtu.be/al-xNNQv7To). As soon as a stepper arrives at its destination there is no signal passed to the ULN2003, so it turns off and as far as I know, draws no power (i.e no holding power required). The ESP32 will not be connected to the internet, or doing anything else other than passing the signal via SPI and powering the RTC

I'm now after some guidance in powering the project in the safest way.

See below my calculations. Each coil needs 110mA, and have 2 coils on per motor at any given time = 220mA per stepper. Each stepper is 5V, hence we have 220mA * 5V = 1.1 W per stepper. We have 48 steppers, all of which could be on at the same time. Hence a total of 52.8W. So if I bump that up to 55W to be on the safe side to power the whole system (ESP32 etc.) And given the steppers are 5V, I need 11A power supply.

So I guess my question is, is this safe? and how would I go about doing it? I'm in Australia, so 240V AC.

I'm guessing I need something that will convert 240VAC into 5VDC at 11A. And then something else that will convert this to say 7v to run the ESP32 (using its internal voltage regulator)

Would a 5V 12A LED driver (like this https://www.aliexpress.com/item/33052797791.html) be suitable? Although, then how do I power the ESP32 (with a boost converter?)

Thank you.

cbeckingsale: My circuit consists of a DOIT ESP32 WROOM, a DS3231 RTC...

Why both. The ESP32 keeps perfect time on it's own, and can be periodically synchronized with NTP.

cbeckingsale: ... and 24x 74HC795 shift registers daisy chained together.

If you use TPIC6B595 power shift registers, then you don't need the ULN2003 boards.

cbeckingsale: As soon as a stepper arrives at its destination there is no signal passed to the ULN2003, so it turns off and as far as I know, draws no power (i.e no holding power required).

Only if you add that to the stepper code yourself.

cbeckingsale: The ESP32 will not be connected to the internet, or doing anything else other than passing the signal via SPI and powering the RTC

Then a small board, like a Nano, would be more than enough.

cbeckingsale: Each coil needs 110mA, and have 2 coils on per motor at any given time = 220mA per stepper.

Not necessarily. For light work, like moving clock hands, one coil at the time could be enough.

cbeckingsale: And then something else that will convert this to say 7v to run the ESP32 (using its internal voltage regulator)

The ESP32 is designed for 5volt (USB supply).

Did you read this thread. Will be posting pictures of an 48-motor setup soon, including the home-grown 10x10cm driver board for those 48 motors. With connectors, so you can plug the motors straight in. Leo..

Edit: Just saw that this is a cross-post (same project here).

Wawa: Why both. The ESP32 keeps perfect time on it's own, and can be periodically synchronized with NTP.

I would prefer the ESP32 not to be connected to the internet, however would like it be accessible via a soft AP. Thus the RTC to keep time over a longer period, and also if power is lost...

Wawa: If you use TPIC6B595 power shift registers, then you don't need the ULN2003 boards.

The ULN2003 boards come the 28BYj-48s I am buying. And there were 'concerns' around the number of TPIC6B595s i could dasiy chain together, as per Paul__B in the DIY ClockClock thread ("There do occasionally seem to be some problems using too many TPIC6B595s in a chain"). The loss of 1V through the ULN2003 isnt the end of the world for me, as I'm only turning clock hands.

Wawa: Only if you add that to the stepper code yourself.

Yes, I have added that to the stepper code myself, as there is no library that I could find that used SPI to communicate to multiple steppers.

Wawa: Then a small board, like a Nano, would be more than enough.

A small board does not have the memory requirements for my program, and an ESP32 is cheap and on hand.

Wawa: Not necessarily. For light work, like moving clock hands, one coil at the time could be enough.

Okay, in that case I will modify my code to only run one coil at a time and see if that works. If that is the case then I should get away with 5V 6A.

Wawa: The ESP32 is designed for 5volt (USB supply).

Oh - I should have known this. My bad, just assumed it would be similar to the Nano.

Wawa: Did you read this thread.

I have read that thread comprehensively, however, there is nothing I can find in it about actually powering the thing. Atleast nothing that is at my 'level'.

Edit: Just saw that this is a cross-post (same project here).

Yes, apologies if this is not appropriate. But thought that considering it was on a different topic in regards to the same project then I may be able to get more specific information by posting it in the 'Motors, Mechanics, Power and CNC' board. I should have linked that original thread.

I guess I'm just after a tick of approval as to whether a 5V 6A LED driver going to do the trick and not be unsafe? As I don't know enough about this stuff myself to be comfortable making that call without getting a couple of second opinions.

cbeckingsale: The ULN2003 boards come the 28BYj-48s I am buying.

And there were 'concerns' around the number of TPIC6B595s i could dasiy chain together, as per Paul__B in the DIY ClockClock thread ("There do occasionally seem to be some problems using too many TPIC6B595s in a chain").

I bought the 12volt version without driver boards.

Long/messy wiring and build quality could be problematic at higher SPI speeds. I have been running 24 smd TPIC6B595 chips (48 motors) on a 10x10cm board on test for days, without any problems and at the default SPI speed (4Mhz) of a 16Mhz Nano. Post#227 in the BMW thread. About to wire up the 48 motors on the 1.8m long frame, pictures soon.

My 5volt motors measured 22.5 ohm/coil. You can calculate current requirements from there. Or measure your own motors. A 12volt supply is of course unsuitable for 5volt motors. Leo..