Current output smoothing ideas?
T Chap
Posts: 4,223
In the photo the top line is a counter ramping FRQA from 3.3 down to 0 in 512 steps feeding a comparator. Second line is the comparator output design the Prop. Third line is a BLDC motor driver current amp output. The output is scaled to around .8V running the motor at 1/2 speed under no load. This gives headroom for max load. The output is rather noisy and I’d like to first see how to make that a lot smoother. I have a 1uf on the output of the sense amp connected on the motor driver shunt and also a 4.7uf on the low pass filter pin on the AD628 sense amp. Still I’d like to see a smoother signal. Ideas? I got in a 12 bit ADC today ADS1015 I2C as there are no pins for SPI. I will see if I can get a finer resolution for trip points in over-current vs the comparator method. The comparator method works perfectly on an existing system(higher voyage swing under stress) but the new system has a lot higher gear ratio of 75:1 and it is far more difficult to create a trip condition if the motor is under unusual friction so that’s why I’m trying to use a better method of detection with tighter trip threshold since with the high ration there is a much lower current output voltage swing, the motor>gbox can do damage before the current trips. So smoother current measurement output and finer detection resolution is the goal for today.
Comments
If this is the case, you already have a motor-current indicator in the output of the PID.
My PID tracks an error. New position - current pos
Pretty neat device http://www.ti.com/lit/ds/symlink/ads1015.pdf
Sure but there are two possible setups for a servo-drive:
1) Velocity mode: Speed regulation is handled within the drive, using feedback from the motor. In this case, the output from the controller's PID is a velocity command. Max PID output results in max motor RPM.
2) Torque mode: In this case, the output of the PID is commanding current output of the drive. 50% command = 50% of the scaled current output of the drive. Monitoring this value is the same as reading the drive's current analog output.
Regarding over-current trip as a means of normal stop detection: The mechanics should be built to not be overly stressed when motor is at full toque against the stop. Anything else won't last.
Alternatives would be use a measuring device like an encoder or just a basic limit sensor to tell the controller when to stop - before reaching the mechanical end! And you still should have electrical cut-outs backing those up.
yes, you need the (correct) drop across the shunt, but the simplest is to use I^2*R for power loss - here you have 2*2*0.1 = 0.4W (that 0.1 ohms drops 0.2V at 2A, & 0.2V *2A = 0.4W)
"The maximum differential input voltage for accurate measurements
is 0.5 V, which produces a 100-μA output current. A differential input voltage of up to 2 V will not cause damage."
Or what about a trim pot divider on the plus input (V+)
Side note, since the ADC is a 4 input, I would like to find a way to get the voltage drop difference from the shunt into one of the ADS inputs so there could be a shutdown if that max value 2V was exceeded. What circuit would allow the difference to be determined and sent to the ADS input? The INA138 is a differential input with a specific output based on the difference but it would be nice to just have a raw voltage to an input to measure without having to run the math involved if only using the INA138, since the output the INA138 will be gained with a trimpot.
Man, you really don't let the grass grow under your feet