Hello everyone,
I need to buy a board (STM32?) like Arduino in order to read in input two RPM values from two different RPM sensors and to send in output two PWM signals to two different ESC (Electronic Speed Controller) that will drive two brushless motors.
Basically I need something that will provide these features:
- 12-bit resolution
- read in input two RPM values
- send in output two PWM values
- control frequency in the order of 2 kHz
- USB-connection in order to load the software from my PC
I am very sorry, total noob in Electronics!
Thanks in advance
I do not understand what is the purpose of the ADC ?
For your RPM input, I suggest you use an IR sensor
like this one to send you pulses for every revolution. You would need to put a reflective tape piece on your bldc/ wheel. Then sense the positive edges and measure the time gap between two edges using timers. This will give you RPM. However doing such a measurement requires some skill in real-time programming, so ask if you don't know how.
To control ESC's, you need to send out a Pulse-width controlled signal varying between 1mS- 2mS, every 20mS or so. Also very easy to do with any uC. However it's advisable to use a PWM expander board like the SC08a, otherwise your uC will get bogged down just sending these pulses. You cannot use the uC inbuilt PWM system, since this is entirely different.
Not sure what "frequency ... of 2Khz" you mean, but if you mean RPM of about 2000, then make sure you choose a BLDC with a KV number small enough. KV of 360 or so would allow decent control. Higher KV tends to control poorly at such low speeds.
Since the speed change response of your motor takes a finite time, you have to use appropriate algorithms between speed varying pulses, such that your motor doesn't start "oscillating" above and below your desired frequency. Control systems theory - but you can use some simple heuristics and experiment.
The Arduino Nano supports USB interface programming, and is quite capable of doing all of the above with ease, even at 8Mhz
I advise all of the above with confidence since I have just recently completed a project which has exactly these elements in it (plus many additional features & capabilities)