One Arduino controlling two brushless DC motors

After some changes I have been able to get it working reliably with two motors. But one of the changes I have made is to use a new type of motors that I reckon are better suited to the task. Instead of using brushed motors that are cheaper, I have found these other brushless motors that have several advantages: 
  1. Being brushless there is no other wear than the bearings
  2. They have built-in driving electronics, so they can be controlled with the Arduino digital outputs, that simplifies things and reduces interface cost. 
  3. Motors have built-in encoder disk too, but the one they carry is just 100 lines per revolution (a bit poor in my opinion) that can turn into 400 "steps" per revolution with the 4x decoding of the program. The lower number of lines per revolution puts less stress on the Arduino interrupt code, which may be one of the reasons it works ok now.
  4. I have moved all the encoder signals to pins that are monitored with the interrupt on pin change and I have reserved the two external interrupts for the STEP input signals for each motor. 
Though I am doing my tests with an Arduino UNO, it has to work the same with the Pro Mini (as far as it uses a '328 chip too). 

The motors I am using seem to be manufactured for Ricoh, but I have failed so far to obtain any decent technical information. But they are sold as 20W brushless motors with built-in driver electronics and quadrature encoder.

While they cost around $15 each, these motors have a brilliant behavior, even when powered at 12V (they are rated 24V).  With power to spare I have to reduce the PID maximum output if I do not want my toothed pulleys to skip in the highest acceleration moves of my tests. The video below shows X and Y axis motion while printing a part controlled with Marlin firmware running on the blue Mega board while the red Arduino UNO board runs this code.

Some other interesting detail is that motor electronics will work at 3.3V too, in case you are driving it from a 3V3 processor. But remember output shaft is 6mm and not 5mm which is a bit of a pain.


Arturo Castillo said…
Im building a cnc router and have the BLDC and 2000line encoders they are small bldc and i thought maybe it i can get the controller of these guys it would simplify everything. Can find those on ebay. Can you send me some pointers as i dont want to spend that much more. I even thought going back to steppers but the frame rails and ball bearings were built for the bldc it has. Shoot me a email if you can.
The motors I used are no longer available but thse others are cheap (and do not have the encoder)

Popular posts from this blog

VFD control with Arduino using RS485 link

4xiDraw: Another pen plotter

Arduino mood light