UnderService.Org
General Category => Schematics diagrams. => Topic started by: Vincent on March 16, 2014, 12:20:57 PM
-
Hi,
Sorry for the delay, but here it is :
Motor Controller - Arduino Uno
This version handle better the interrupt and the lcd overhead, so the output signal is stable over the time. Also I did a little routine
to charge and discharge a capacitor. Beta version but it works !.
I think will be the last version with a non linear hall sensor. As soon as I will finish my new rotor, I will do more tests
with another approach.
Configuration
Pins
// Pin 13 to Main Coils.
// Pin 12 Capacitor Charge Module (BEMF)
// Pin 11 Capacitor Discharge Module
// Pin 2 Hall Sensor (Not linear).
User Variables - Change as you need.
#define mpoles 8; // Poles motor. ::: Please put your number here !!!
float pulse = 3.25; // Length Pulse in ms of your coils. ::: Please put your number here !!!
float lag = 1.00; // Lag between Hall and firing pulse. ::: Please put your number here !!!
int tc = 4; // Period to capture and charge capacitor ::: Please put your number here !!!
This version don't have auto-start, so you need to measure the output at the hall sensor when you do the kick start by hand and calculate your values here :
float pulse = 3.25; // Length Pulse in ms of your coils.
float lag = 1.00; // Lag between Hall and firing pulse.
The keyboard can be tricky. For professional applications and long term development I will share another version with a better handle of menus.
Timing
Channel 0 : Hall Input.
Channel 1 : Coil Output.
Channel 2 : Capacitor Charge.
Channel 3 : Capacitor to Load.
I hope this will help with your tests. If anyone have any questions or want to improve the code, feel free to ask and help.
Thank you,
Vincent
-
Thank you Vincent!