this post was submitted on 04 Sep 2025
19 points (100.0% liked)

Ask Electronics

3839 readers
15 users here now

For questions about component-level electronic circuits, tools and equipment.

Rules

1: Be nice.

2: Be on-topic (eg: Electronic, not electrical).

3: No commercial stuff, buying, selling or valuations.

4: Be safe.


founded 2 years ago
MODERATORS
 

I am wiring this up, and I would like to limit the current being drawn from 18v DC/DC converter.

What would be the simplest way of doing this?

you are viewing a single comment's thread
view the rest of the comments
[–] litchralee@sh.itjust.works 5 points 2 weeks ago (20 children)

I don't think there's a good way to adapt this circuit to provide current limiting on the 18v rail. Supposing that it was possible, what behavior do you want to happen when reaching the current limit? Should the motor reduce its output torque when at the limit? Should the 18v rail completely shut down? Should the microcontroller be notified of the current limit so that software can deal with it? Would a simple fuse be sufficient?

All of these are possible options, but with various tradeoffs. But depending on your application, I would think the easiest design is to build sufficient capacity on the 18v rail so that the motor and 5v converter inherently never draw more current than can be provided.

[–] boojumliussnark@lemmy.world 1 points 2 weeks ago (19 children)

Thanks for taking time to look at this! :)

The issue is that if something is blocking the motor, or the limit sensor is not working, the motor should stop before burning itself out or breaking stuff.

I did buy a hall effect current sensor (https://www.aliexpress.com/item/1005006222090940.html) that I was thinking of connecting to the pi pico on an interrupt enabled pin, so I could cut off the engine output at the source, and alert my upstream controller. But I just couldn't wrap my head around how to implement it.

Another option that I considered was putting some kind of fuse on the 18v rail and try to figure out how to detect if the 18v rail was dead and feed that to the pico - but then I'm not really sure how much simpler (if at all) that would be.

The picos inputs are 3.3v btw.

[–] litchralee@sh.itjust.works 4 points 2 weeks ago (18 children)

In that case, I would suggest looking at a different motor driver. The driver you've specified doesn't seem to have any provisions to detect a motor stall, which is something that other drivers can potentially do. Ideally, the driver would detect the back EMF from the stall and inform the microcontroller, which would then decide to stop movement.

An external current sensor might work, but that's adding to the part count and might not be as capable as built-in functionality within the motor driver. Plus, fancier motor drivers have some neat features that you could take advantage of as well. I think it would be more prudent to consider a different driver before adding additional parts.

[–] boojumliussnark@lemmy.world 2 points 2 weeks ago (1 children)

Ah... Since I am not a smart man, I have already invested too much (for the project) in several of these motor drivers. :-(

[–] litchralee@sh.itjust.works 1 points 2 weeks ago (1 children)

Out of curiosity, what is this project?

[–] boojumliussnark@lemmy.world 2 points 2 weeks ago (1 children)

It is a networked window opener/closer for my house, all with parts sourced from China, since the commercially available openers are very overpriced IMHO. Which I guess also speaks a lot to the fact that I am a man with more time than money...

[–] litchralee@sh.itjust.works 2 points 2 weeks ago* (last edited 2 weeks ago) (1 children)

I like it!

I once endeavored to do something similar, but it would have been for opening the blinds in the morning and closing them after sunset.

[–] boojumliussnark@lemmy.world 2 points 2 weeks ago

Thanks. It has been fun, both doing the software, where I feel at home, but also the challenge of trying to do electronics, where I am completely lost :D You can't imagine the amount of DC converters I have burnt out, or my absolute confusion why I couldn't turn a motor on and off using a couple of relays! I must confess I still don't understand, but at least now I know.

load more comments (16 replies)
load more comments (16 replies)
load more comments (16 replies)