I´ve got a brushless motor I bought, complete with it´s circuit, and it works fine. I adjust it´s speed but changing a 3v signal by a 100k pot, with a very weak current.
I´m in the middle of building a digital way to control the motor. I want to have pre-defined speeds, adjustable by buttons.
So, my approach was to make a circuit and code to control a 100k digital potentiometer by buttons, and then replace the original 100k pot with the digital pot.
And so far it´s going well, and the digital pot works.
But I was thinking on another approach, and I´d like to know if it´s electronically possible.
What changes the speed on the controller for the brushless motor I´ve got it´s this 100k pot that varies the signal from 0V (one pot terminal) to 3 V(the other pot terminal). The voltage on the wiper is the one that changes the speed, right? The pot is needed to create this voltage on the wiper, right?
So could I use one of the PWM ports to replace the wiper terminal of the potentiometer, so I could not even need the digital potentiometer? Could I "insert" a pwm varying this signal from 0 to 5V on where the wiper terminal would be connected? I´d have to connect the ground of arduino in the ground terminal on where the pot connects also
Then could I change the PWM output to 3V instead of 5? A simple voltage divider would do the trick?
I this feasible, possible or the digital pot is safer and makes more sense?
You need a low-pass filter (R-C circuit) to "smooth out" the PWM signal into an analogue signal. Then use a simple voltage divider to produce the 3 volt maximum signal level required. Note that the R component of the filter will "lose" some of the 5 volts and the C component will cause a delay in the circuit responding to a change in speed request. If you chose relatively low values of resistors in your potential divider (say in the order of a 10k chain) then the delay effect should be minimal.
Thanks!! I was just reading about the low pass filter and just found some examples!!
But attaching a low pass filter to the digital pwm output pin, could I replace this physical pot with just this signal pin and ground connected in the places where the pot's ground and wiper are?
I woud'nt need to connect anything on the pot's "leg" where it is 3V, right? Is it there just to provide a voltage divisor (on the wiper) from ground to 3V, correct?
MarkT:
Please post full details of the motor driver you are using - it may not be as simple as that.
Hi!
I really don´t know much more about the inside of the control box. My only goal was to replace the pot that controls the speed with a digital pot. and have the speeds pre-set and controlled by buttons...
I didn´t want to mess with the circuit inside (so far). I wanted a simple ... pot replacement... I already have a circuit with a digital pot that works, but I haven´t finished the code yet to test it with the motor.
I was only wondering if I could not use the digital pot instead... If the digital pot is more efficient and stable, I´ll stick to it... It´s hard to find in my country and it takes 2-3 months to arrive from ebay when I purchase them..
I have measured the 3V between the outer pot connections and the current was tiny(don´t remember the exact value). I could measure it again to have exact numbers of voltage and current.
The control box has an input of 24VDC and 4.8A, and it´s rated for 150W.
Of course the current is "tiny"
You are driving the pot with a 3 volt supply into a 100k pot so the supply current will be 30microamps
The control box must have some form of identification on it such as manufacturer name, model number etc
I surmise, if you go for a PWM (with RC filter), you can ignore the control supply of 3 volts and simply connect the filter output voltage between the control ground and control input - after having ensured it can never exceed the 3volt signal maximum. But information as requested previously should indicate the input limitations.
I really don´t know much more about the inside of the control box. My only goal was to replace the pot that controls the speed with a digital pot. and have the speeds pre-set and controlled by buttons...
Well we know even less - I've asked you to identify it, and you haven't, you've just given some
specs that you copied from somewhere, but are keeping that somewhere a secret.
Hi guys... Sorry, i'm newbie in electronics... Here are the details and pics.
My motor is a prosthetics lab brushless one, complete kit. Kind of a mini Dremmel. Bought over ebay. Meant to be built in (in one of my workbenches)
As I'm no expert, what exactly mean complete motor details, so I can try to find out more.
Attached are some pics of the control box and it's manual.
There's also a button to invert the rotation, and I'll also control it with the arduino through a 4066 CI. And of course, an on/off switch, on/off led... But the speed control is my goal now.
It needs 24V AC, so I bought a huge 12-0-12 6A transformer
I don't know how much of this 24V AC inside the control box gets transformed into DC, and how much of it powers the bldc..
Does this help? If not, tell me exactly what I should look for then I'll try to provide the details... I've got a small oscilloscope if needed.
I've got one more question...
As arduino is one circuit... And the motor set is another... When using the pwm-to-low pass filter set-up, I would need to make the grounds of both circuits commom, right? I mean, I would need to connect the arduino ground to the ground terminal where the motor's pot is.
Is this possible? Two different circuits, powered differently (even though they are dc at the connections points to the pot) sharing the same ground?
Thanks again for your help! I'm still learning at an older age...
I'm having a problem uploading pics from my iphone! Even resizig them is not working. Will do in a couple of hours when I get to my office... Done. Pictures added to my last post before this one
Rimbaldo:
My motor is a prosthetics lab brushless one, complete kit. Kind of a mini Dremmel. Bought over ebay. Meant to be built in (in one of my workbenches)
You know what I'm going to say - post the eBay link please, secondhand information is not
what I'm after.
So this is a chinese unit (you failed to mention this - no english docs), I would guess made by
the same kind of manufacturers that do pedal-cycle electric motors and controllers, which means
it probably has fail-safe detection on the throttle potentiometer.
You can test this by disconnecting the ground lead (most negative) from the pot while running
at mid-setting. If the motor revs up to full there is no fail-safe, if it cuts out it has failsafe.
To defeat failsafe its probably enough to replace the pot by a single resistor of the same
value. Then control the wiper voltage directly from the Arduino by low-pass filtered PWM output.
There are other ways to do failsafe which are harder to defeat, but the simple scheme I
describe is able to stop run-away motor speed if a wire falls off or is shorted out.
It worked! I can control it by pwm - low pass filter! I had to adjust the filter though...
I tried the filter with 1k ohm and 1 uF, and although it was stable with no load, over the multimeter, when connected to the control box, the motor oscillated, as the voltage was increasing and decreasing slowly, trying to keep the signal steady..
I raised the capacitor value till 47 uF (electrolytic), and although the response time is slower now, the signal is steady and the motor runs smoothly, exactly the way the pot used to run it.
As I'm going further in my digital control of this bldc motor, I want to control torque. The unit's control already has it's max torque/current allowed, but I want to do the opposite. I want to be able to decrease it's torque until a min.
So I thought on using a current sensor, and based on it's readings I could stop the motor by the pwm-rc-filter already done...
My problem is... Where can I measure this current? Can i wire this sensor
Into one of the three phases of the motor? Is the current the same for all phases, and the value read on one of them means the current being used by the motor? As the power requirements for the whole set-up are 4A, I chose a 5A current sensor.
In the short term the current isn't the same in each phase. They are turned on and off in sequence to make the motor rotate. Over a full revolution, the average current would be zero because the phases are driven positive and negative by the controller.
It would be better to measure the input current to the controller.
It worked! I can control it by pwm - low pass filter! I had to adjust the filter though...
I tried the filter with 1k ohm and 1 uF, and although it was stable with no load, over the multimeter, when connected to the control box, the motor oscillated, as the voltage was increasing and decreasing slowly, trying to keep the signal steady..
I raised the capacitor value till 47 uF (electrolytic), and although the response time is slower now, the signal is steady and the motor runs smoothly, exactly the way the pot used to run it.
Thanks for all your help!
No need to experiment, the time-constant of an RC filter is simply R x C. So 1k, 1uF gives 1ms
time-constant (Arduino PWM is about 1kHz or 500Hz, depending on the pin, so the time constant needs
to be a lot more than 1ms. You've ended up with 47ms time-constant which will filter out the PWM to
a percent or two.
You can also deduce that a farad is the same as a second per ohm.