Hi! I've been continuously searching for all the parts needed to fully control a BSDC motor from an Arduino. I got many words in my head and I need some help organizing them...
Actual BSDC motor
Actual Arduino
ESC controller (but ESC can't contol the position, only the speed as far as I know!!)
BSDC Absolute encoder??
BSDC Driver??
3/4S lipo + DC step up/step down
If someone worked with motors before, could you list the parts needed to fully control it from code(absolute position and speed)
A brushless DC motor is like a stepper motor. You cycle power through three windings to control the motion of the motor.
If your motor only has three wires (like most RC model motors) the ESC uses currents induced in the windings to figure out the position of the motor and timing of the drive pulses. They can't be run at very low speeds because the induced currents are insufficient.
Some motors have internal sensors to give the driver feedback about when to switch windings. Those can run at any speed.
Neither type of motor will give control of absolute position. Like a stepper, you can keep track of relative position by counting steps but if the motor ever stalls or misses a step you lose position.
If you put an absolute encoder on the motor it will give you the feedback you need to go to any position.
You cant control the position of a brushless motor or drive it to a given position . You might have more success if it was geared down to rotate slowly
That's exactly the problem, since, as @hammy said, I wanted to put a gearbox on the top of the motor.
The absolute encoder is usually placed under the motor, and it works just fine if there's justthe motor on its own. If I add a gearbox, then I'd need to place the encoder on top of the gearbox ,which would block anything from being attatched to the motor, essentially making it useless.
Is there a way to mount the absolute encoder on top of the gearbox, while still allowing parts to be attached to the shaft?
Impossible to answer unless you give details of the gearbox and encoder! It's usual to put the encoder on the output of the gearbox anyway so you see the actual movement of the output unaffected by backlash. You can't expect mechanical components to just slot together, it is usually necessary to make brackets etc to mount them on.
Then you have chosen the wrong encoder. Get one with a through-hole for the shaft and get a gearbox with a shaft long enough to go through the encoder and still be useful.
Did you look at that windshield-wiper servo design I linked in the other thread?
To get servo-like behavior, You can attach your position-feedback device (encoder or potentiometer) ANYWHERE in the drive chain; it doesn't need to be directly attached to the shaft, and it doesn't have to be "rotational."
See also the Wikipedia description of a servo motor: Servomotor - Wikipedia (and in particular the part where "the actual type of motor doesn't matter.")
If we place the encoder right on top of the gearbox shaft, won't that make it impossible to mount anything else on it, thus making it not usable?
I'm quite confused because I'm not sure what you guys mean by "absolute encoder". When I google search "absolute shaft encoder", I get a multitude of different pictures. Could you clarify which is which?
Could you tell me if any of these encoders I found are what you mean or share any useful links towards manufacturers? Also, aren't there really any other, more cost-efficient, options? (or maybe I just found some overpriced ones... Generally I'm good with encoder less than 150$)
Welcome to the world of mechanism design. Unfortunately it isnt as easy as stringing together parts on a breadboard as they have to line up accurately and need to be supported by custom frameworks. You cant just expect them to conveniently fit together.
One encoder style as you have found looks like a motor or potentiometer with a shaft sticking out. You might use one of those coupled to the gearbox output shaft using a pair of timing pulleys with a ribbed belt. The other one you showed is a disc that carries a pattern that can be read by a suitable sensor array, the disc could be mounted on a moving element of your machine to measure its position.
An absolute encoder is one that tells you where the moving element is relative to a fixed part. An example is a potentiometer - if you feed the track with a known voltage the wiper voltage is proportional to its position. This can be digitised and used to tell the controller the wiper position. Pots can be cheap but not too precise, or you could pay a lot more but still not too precise. Digital encoders have several tracks carrying patterns on a disc that can be read optically or magnetically, which give a binary (often Gray coded) number representing the position of the disc relative to the reader. Making the discs and readers is quite involves so they aren't cheap (as you've discovered).
Relative encoders just have one track with a pattern that's read with 2 offset encoders which doubles the resolution and can tell you what direction i's moved. But these can only give relative position by counting pulses so some kind of home sensor is needed to initialise the system; and on switch-on it's necessary to move the output member usually to one end of its travel (though it can be possible to store the current position in non volatile memory of you can guarantee it won't move when switch off). These can be a lot cheaper.
There are new integrated products that look to be very precise and low cost and have Arduino support. They do need homing, and will need suitable mechanical couplings such as a pulley to the gearbox output. I've seen costs of ~$10 quoted.