I want to control to control the current of the motor upto 3A using LM324 OP AMP. I have BLDC motor driver circuit L6234. I have made the OP amp circuit of it and now i am lagging in the software part. I want to take the current input in my arduino uno and then i want to give output to my L6234 from arduino which gives a control current output.
Firstly controlling the motor is with PWM just as if you weren't doing current sensing, so get that
working first.
Then get the current sensing working (separate sketch, just to show that it works).
Then you will have to tie the parts together with a PID loop. Read up about PID loops.
I suspect as this is a 3-phase driver you'll first need to get your head around 3-phase PWM driving, which
can be trapezoidal or sinusoidal. If you don't understand the difference you'll have to do a bit of research
to see what's appropriate for your project. You haven't provided us with much information about your
motor or project...
You can buy an electric bike 250W 3-phase BLDC/PWM controller for as little as £7 on ebay - which expects a 1-4v input input from a hall sensor or a potentiomer... but requires 3 hall sensors to time the coil energisation
allanhurst:
You can buy an electric bike 250W 3-phase BLDC/PWM controller for as little as £7 on ebay - which expects a 1-4v input input from a hall sensor or a potentiomer... but requires 3 hall sensors to time the coil energisation
I have been working with BLDC motors a bit. I am attempting to control a BLDC motor over a range of < 1 rpm to 1500 rpm's. So far the MOSFET/Driver circuit for discrete steps does not work well for slow speed. Currently, I am working on using PWM outputs from Arduino in three phases, duty rated with sinusoidal wave forms. I am using three sin waves out of phase by 120 deg., generated at setup when Arduino first loads. Each sin wave is an array containing 300 individual steps generated in a for loop. Using a low pass filter on each of the PWM outputs, I have created a smooth sinusoidal wave on the output of an op amp for each. My plan is to use 3 power op amps rate 3A and adding current control with 100 Watt, 3 Ohm resistors and using the op amp outputs to power each phase of the BLDC. Op amps can sink and source current. I have an oscilloscope (PC- based), so I can check to see that everything is as it should be. The timing of the output pwm waves is controlled using dealyMicroseconds(). Using an encoder on interrupt to feedback the speed of the motor, a function call averages Microsecs between each pulse. The delay is put in between the for loop steps while the outputs are commanded with analogWrite(Pin#, sinPwmA), etc. This is only practical for slow, sync speeds. The high speeds will be handled using another MCB, switching the motor winding terminals with relays. I am new to Arduino and C++. I will keep sending updates on my progress.