Show Posts
Pages: [1] 2
1  Products / Arduino Due / Is the Due fast enough for BLDC commutation? on: August 21, 2014, 11:35:08 am
Hi, I'm planning on using the Arduino Due for 3-phase commutation for a Brushless DC motor. The motor is 8-pole, and I would like it to run up to 10000 rpm. With 6 commutations pr. electrical rotations, it equals 8000 state changes pr. second which equals 125 micro seconds between state changes. However in order not to loose too much torque, i would like to make the state change within 5% of that period, which means 6.25 micro seconds.
I would like to avoid direct port manipulation etc. and instead use digitalRead, analogWrite etc.

So I imagine a process like: React to an interrupt triggered by one of 3 hall sensors - set flag in interrupt routine - check for that flag in main loop before any other processor intensive tasks (like lcd display, PID calculations etc.) - If flag is set then read 3 hall sensor states and analogWrite to the 6 outputs to the half bridge drivers according to the hall sensors  (cross conduction and over current is taken care of in hardware).

My question is: Is the Arduino Due able to do the above process in 6.25 micro seconds?

Another question is: Is it possible to do digitalRead on pins that are setup for interrupts.

Regards, Peter
2  Using Arduino / Motors, Mechanics, and Power / Re: Driving a Car Alternator as a Motor on: September 20, 2013, 07:42:10 am
You can run an alternator as a motor by connecting the three wires from the stator to an relative inexpensive sensorless ESC for BLDC (electronic speed control for brushless DC). I have done this, and it works. However, because it's sensorless, the motor can't start under load and looses synchronization if your apply too much load to it while it's running. I would speculate that in order to make good use of an alternator as a motor (BLDC), you would need to add sensors to it and use a BLDC sensored controller. The supply voltage would probably need to be at least 24v, but ideally a lot more, like 48 - 96V. An alternator easily generates more than a 100V, without regulation. Also the controller needs to be able to supply a lot of current, probably at least 100A.
You should not supply the rotor with 12V, but instead something like 6V, or better use PWM regulation. With a regulated supply to the rotor you can get "electric gears". Hi power to the rotor equals hi torque and low rpm, and low power equals hi rpm and low torque.

Check this link:

Good luck,
3  Using Arduino / General Electronics / Re: Size of bootstrap capacitor on: September 13, 2013, 05:04:08 pm
Thank You for helping out on the math, and also thank you for the good advises, I'll make sure buy plenty of backup components  smiley
4  Using Arduino / General Electronics / Re: Current protection/monitoring circuit on: September 13, 2013, 04:41:19 pm
Thank you very much. I just looked up how to use the Arduino's analog comparator to trigger an interrupt, and that's perfect for this application!
5  Using Arduino / General Electronics / Size of bootstrap capacitor on: September 13, 2013, 02:23:45 pm
I'm trying to make a circuit for a brushless dc motor controller, and struggling with understanding how to choose the appropriate value for the bootstrap capacitors. In the datasheet it says: "In order to properly size the capacitor CBOOT, the total gate
charge must be known. Too large a bootstrap capacitor and the
charge time will be long, resulting in maximum duty cycle limitation.
Too small a capacitor and the voltage ripple will be large
when charging the gate.
Size the CBOOT capacitor such that the charge, QBOOT, is 20
times larger than the required charge for the gate of the MOSFET,
where VBOOT is the voltage across the bootstrap capacitor. The
voltage drop across the bootstrap capacitor as the MOSFET gate
is being charged, ΔV, can be approximated by:

The total gate charge of  the mosfets I would like to use is 160 nC (how does nC relate to farad?)
I will be using two mosfets in parallel  for high and low side for each phase. Also a 10 ohm gate resistor to prevent ringing. The controller is intended to be used with voltages between 12 to 48 V. Below are links for datasheets
I hope that someone more experienced than me, can figure this out.,d.Yms
6  Using Arduino / General Electronics / Current protection/monitoring circuit on: September 13, 2013, 01:57:55 pm
Hi All,
I would like to make a BLDC (brushless dc) motor controller based on the Allegro A4915 I would like to add current protection and monitoring to this, and I was wondering if the attached circuit would work for this. The logic behind is that the ouput from the shunt amplifier (INA 168) is connected to an analog input on the Arduino for calculating current draw, and also connected to a zener diode with a zener voltage of 4.5 V which in turn is connected to the base of a PNP transistor. The idea being that a current larger than 180 Amps cuts off the PWM from the Arduini and pulls the PWM/enable input on the driver ic to ground.
Do you think this will work as intended, or how is it normally done?
7  Using Arduino / Motors, Mechanics, and Power / Re: DC motor speed regulator using Arduino Uno on: March 25, 2013, 11:15:14 am
I would suggest using this PID library:
You could then pass a desired speed via serial, and use that for the "Setpoint" variable.
For measuring the speed with an optical encoder, you could connect that to one of your external interrupt pins, and write an interrupt routine, that increases a variable by one on every interrupt, then calculate your speed in the main loop, there are a lot examples on this forum for this.
If you get stuck on specific issues, there is probably help available here.
8  Using Arduino / Motors, Mechanics, and Power / Re: Arduino 3-phase motor control shield : feedback & advices needed on: February 16, 2013, 05:31:29 am
Hello SebClerckx, that sounds like a great project. Is it intended for use with brushless DC motors, and if so, do you plan plan for sensorless or sensored feedback? Also, when it is for use with Arduino, I think it would great to have as many feedbacks to Arduino as possible, so in addition to current sensing; voltage, rpm and temperature would be great. I’m sorry I can’t give any technical advise, as I’m untrained in electronics and programming, but I’ll be following with interest. It seems to me that members of this forum is very generous in answering questions, especially if you keep it specific, and backed up with schematics, datasheets etc.
Good luck with your project!
9  Using Arduino / General Electronics / Re: Current measurement on positive or negative side? on: February 15, 2013, 07:27:47 pm
I bought the Allegro sensors on ”breakout” boards with large double sided conductive path (looks gold-plated, not sure about that though) with 6mm bolt holes. I can´t find them on eBay anymore, so i don’t have a link. As I already have them, I’ll try them out, but if it proofs too inefficient, I’ll give you a call Docedison, thanks.

The motors are replacing a 13hp ice motor (maybe the right term is ride-on lawnmower rather than tractor). So about 4 hp for drive, which I think is more than enough, and about 4 hp for the blades which might be too little, but if it works I’ll probably be happy to cut the grass before it gets to long. With this setup, I can also eliminate some pulleys and the clutch, which hopefully will reduce the power requirements a bit. I’m going to use four 85ah marine batteries, and I’m hoping to get a couple of hours juice for just driving, and maybe 40 minutes of grass cutting.

The Arduino will try do reduce power to 130 amps per motor, and will allow 150-200 amps for max 5 seconds, and will shut of power completely if consumption is more than 200 amps for one of the motors. The Arduino also handles speed control, rpm-safety-shutdown, general safety, voltage monitoring, battery protection etc., but more on that when my code fails, and I´ll be looking for help in the programming sector smiley-grin

I bought an small electric forklift a while back for a different project, and the drive motor seems very similar in size and weight to the motors I'm going to use. It’s also 24 volts and series wound, but there no dataplate, so i cant be sure about the specs. I think it’s popular to use series wound motors for forklift, because its easy to reverse rotation by reversing power to either the stator or the rotor?
10  Using Arduino / General Electronics / Re: Current measurement on positive or negative side? on: February 15, 2013, 11:45:31 am

The motor is 133 amp 24 volt series wound dc. I don´t know what they where intended for (maybe forklift), but i managed to get hold of 6 of them, maybe 10 years old, but unused. I´m converting a lawn tractor to electric with a motor for drive, and a motor for grass cutters. Arduino is at the heart of the operation. I promise to make a ”bragging” post when the project is finished smiley
11  Using Arduino / General Electronics / Re: Current measurement on positive or negative side? on: February 15, 2013, 04:57:10 am
There is little risk of personal injury, as the system is only 24 volts. But I see your points about troubleshooting and also it makes sense to not have permanent power on ground leads. I will have to find the best compromise between physical layout, possible interference and safety. Thank you.
12  Using Arduino / General Electronics / Re: Current measurement on positive or negative side? on: February 14, 2013, 08:32:45 am
Thank You, I thought so, but it's nice to be sure. I'll probably need to read up on my electrical basics smiley
13  Using Arduino / General Electronics / Current measurement on positive or negative side? on: February 14, 2013, 05:26:05 am
Current measurement on positive or negative side?

I´m going to use this sensor: ACS758ECB-200U-PFF-T (, and I was wondering if it makes any difference if I place the sensor on the positive or negative side of my motor (130 amp dc). If I could place on the negative side, it would allow for much shorter sensor wires. Thanks smiley
Planned setup is: Battery positive --- motor --- current sensor --- contactor --- mosfets --- battery ground
14  Using Arduino / Project Guidance / Re: Help Needed: Android Controlled 8 Channel Relay on: October 19, 2012, 01:28:07 pm
Yes, the 4 pins fit in a breadboard, it needs 5v, ground, tx and rx.
15  Using Arduino / Project Guidance / Re: Help Needed: Android Controlled 8 Channel Relay on: October 19, 2012, 12:54:11 pm
I use this bluetooth modul: with Amarino, Arduino Uno and HTC Desire, I've never had any problems. Hope it helps smiley
Pages: [1] 2