Continue to Site

Welcome to

Welcome to our site! is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[General] Shared hardware programming

Not open for further replies.


Junior Member level 1
Jun 16, 2020
Reaction score
Trophy points
Activity points
Hello :)
I face to a recurrent problem when I program a microcontroller with a lof of actuators. In order, to limit the power supply's size, I allow the user to use only a few of them in the same time. It is easy when there are only 2 or 3 actuators maximum. But it becomes complicated to manage when the number growth.
Just to highlight the problem, let say I have actuators A, B, C and D.
The power supply size allows to use, in the same time :
  • A only
  • B and C
  • D only
  • ...
The number of possibility increases with the number of actuators, and it becomes boring to program all the conditions and hard to maintain. Moreover, I would like to use a kind of queue to allow the waiting actuators to perform their action as soon as possible.

In order to find literature, is there a name for this kind of issue ?
I don't find an efficient and evolving way to do this
I am programming in C++ on a STM32G4 with HAL, so if you know any design pattern relative to this issue, you are welcome :)

Thanks for your help !


The straight forward method is:
* what's the limit if the power supply? On a (DC) supply it's the load current.
* what current do the individual actuators draw? Make a list.
* then write software to add up all "active" actuator currents. And before activating a new actuator decide whether the expected current is higher than the power supply can provide.

It shouldn't be difficult from software view. No need to be very exact.
If you install a single power supply current measurement you may make the system to adjust itself by (initially or by command or key press)activating actuator after actuator and measure it's current and safe the values (in RAM or in EEPROM).

Everything else gives too much limits .... and less safety.


Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to