Open Source Closed Loop Motor Controller

Similar projects worth following
This device is designed to control DC brushed motors up to 36 V and 10 A (almost ½ hp) for axis positioning in CNC machines such as routers, milling machines, laser cutters and 3D printers.

This project is now avalilable on Crowdsupply


The board accepts the common STEP/DIR signals that are ubiquitous to low cost machine control boards, such as the RAMPS and parallel port breakout boards for Mach3, LinuxCNC and Machinekit.

Position sensing is achieved by means of an incremental quadrature encoder. The controller is capable of stopping the machine when it detects one of several fault conditions (discussed later) to avoid ruining a job. A full duplex serial port is available for easy configuration and tuning of the servo driver.

Shrouded and keyed headers for the signal connections are installed on the board to keep the end user from accidentally shorting two pins together or plugging a connector backwards. Pluggable screw terminals for the power connections allow the board to be easily installed inside a case or in tight spaces without having the cables getting in the way of the user.

SoC for Closed Loop Control

A Cypress Semiconductor PSoC4 chip (ARM Cortex M0 core plus internal programmable logic and analog hardware) is present to read the STEP/DIR signals from the machine controller, read the encoder input and perform the calculations required for closed loop control of the motor kinematics.

It controls two indicator LEDs for signaling the different fault modes the device is able to detect, such as motor overcurrent, driver undervoltage, missing encoder, exceeded encoder pulse rate and motor not able to reach position. It can also send an alarm to the rest of the motor drivers.

Gate Driver

A full bridge MOSFETgate driver switches four transistors with an appropriate voltage with the appropriatecommutation speed, while also protecting them from being damaged by a shoot-through condition oroverheating due to insufficient gate voltage or anovercurrent event.

The IC also amplifies the voltage drop from an external 5 mOhm shunt resistor for low side current sensing.

Finally, the driver also performs current chopping (set at 12 A) to provide a second layer of overcurrent protection. The current level is set via two resistors in a voltage divider configuration.

MOSFETs in H Bridge Configuration

The device utilizes four ~5 mOhm (at 25 ºC) N channel MOSFETs with a 60 V breakdown voltage. The transistors use the board as a heatsink.

Device Characteristics






Motor side voltage




Continuous current output




Logic side voltage (VLOGIC)




Current consumption



Step signal frequency




Encoder frequency (4x)




Error signal output current



Serial port speed






Operating ambient temperature 1




1 40 ºC is the maximum ambient air temperature for which the current output value is valid

Source files:

  • 1 × CY8c4245PVI PSoC microcontroller
  • 1 × DRV8701 gate driver
  • 1 × 0603 green LED
  • 1 × 0603 red LED
  • 4 × IRFH7545PbF MOSFET

View all 16 components

  • The new boards

    ottoragam02/17/2017 at 04:03 0 comments

    During the past few days I was able to burn the firmware and begin testing the
    new Tarocco boards. I plan to ship half of the batch first, as soon as I'm done
    testing the boards (probably next week), so those of you who ordered the
    controller without a servomotor can begin to use them. The second half of the
    batch will likely be shipped in the following week. The servomotors should be
    ready by the second week of March.

    I've uploaded the final design files for Tarocco and the BOM tothe repo.

  • Crowdfunding campaing status update

    ottoragam01/18/2017 at 21:25 0 comments

    At just 3 days from the end of the campaign, the project is just 800 dolllars away from the goal.

    Now is the time to get your own board at

  • Machining with Tarocco

    ottoragam12/21/2016 at 22:44 0 comments

  • Funding Campaign Started!

    ottoragam12/08/2016 at 16:49 0 comments

    The Crowdsupply funding campaign is now live! If you find the project useful please consider backing it.

  • Testing the new motors

    ottoragam11/05/2016 at 15:33 0 comments

    I borrowed a Prusa i3 from a friend. I wanted to show the performance of the 30W motors I got, so I made a NEMA17 adapter from a piece of acrilyc and replaced the X axis stepper with my servomotor.

    But it has 3 times the mechanical output power!

    I used one of the available headers on the MKS board to supply the signals to my controller, and removed the stepper driver from its socket.

    After getting familiar with the 3D printing software (I used Repetier), I was able to print the classic ship thingy.

    Unfortunately the printer only had space for my servomotor on the X axis, and I didn't wanted to modify it as it was not mine. The good thing is that I have an old router available for more testing. I just need to replace the steppers with the servomotors and do some testing!

  • A little update

    ottoragam10/24/2016 at 23:29 0 comments

    I'm planning to provide a suitable motor for use with Tarocco for those who don't want to go through the trouble of selecting a motor and feedback sensor.

    Last week I got some DC servomotors to test with Tarocco. They are 24V 30W units, with a maximum angular speed of 4000 rpm, and they come with a factory installer optical encoder. The encoder wheel has 360 divisions, so the encoder provides 1440 pulses per revolution.

    Physically, the motor's body is 38 mm (1.5 in) in diameter, and it has a 5 mm shaft, so it can be used to replace NEMA17 and NEMA23 motors. I'm planning to swap the steppers on an off the shelf 3D printer with brushed motors and see how the conversion goes, hopefully the frame will be able to handle the increased speed of the motors. Keep tuned for more!

  • Online project source files

    ottoragam10/14/2016 at 05:50 0 comments

    I've just begun uploading the source files to the Tarocco Github repo. If you wanted to know more about Tarocco, well, now's your chance!

  • Everything up so far

    ottoragam09/21/2016 at 13:40 0 comments

    Almost a year ago I started making my own brushed DC motor controller, after having difficulties finding a commercial unit with the right features, within my budget. As of today, I'm using the controller to successfully run a 120 pund class milling machine. However, I wasn't entirely satisfied with the first version of my controller, so I decided to improve it.

    And for anyone interested on having a ready made controller, there will be a Crwodsupply campaing launching very soon. You can sign up to get the relevant notifications here:

View all 8 project logs

Enjoy this project?



Johann Neuwirth wrote 06/18/2017 at 18:52 point

hello, thank for this great controller. I have two pieces they work with small motors fine. But I want to use bigger Motor and for that I need to push up the Ampere from 5 to 10A, but it is impossible to connect with a serialmonitor. I try to update the software with your manual and the software, but I become every time a timeout. Please can you help me.

  Are you sure? yes | no

ottoragam wrote 06/18/2017 at 19:57 point

Hi Johann! try swapping the TXD and RXD connections on the board and see if you can get the data from the serial monitor. Please let me know how it goes.

  Are you sure? yes | no

Johann Neuwirth wrote 06/18/2017 at 20:22 point

thanks for your fast answer. But try this, but I am sorry the result.

  Are you sure? yes | no

ottoragam wrote 06/18/2017 at 20:24 point

Lets see, what device are you using to connect the Tarocco to the computer?

  Are you sure? yes | no

ottoragam wrote 06/18/2017 at 23:04 point

The converter seems fine. Could you try verifying its correct operation by shorting RX and TX on the converter header and sending some serial data? It should "echo" everything you send. Also, make sure your serial terminal settings are 19200-8-N-1.

If this doesn't work, would you mind sending me a picture of the setup to see if I can figure something out?

  Are you sure? yes | no

ottoragam wrote 06/18/2017 at 23:12 point

By the way, the controller has a default current limit of 10A, so you shoulnd't need to change it. Still, that leaves us with the communication problem.

  Are you sure? yes | no

Johann Neuwirth wrote 06/19/2017 at 08:23 point

Hello, then i have some bigger problem, i cant connect via serialmonitor and not with the PSoC software. Now to the motor situation. i have two boars from the last year, i want to use dunkermotors with 24Volt and 0.98A continous current and max 9A current. and now when i connect the motor i cant turn only half turn an the controller is in the error mode. For my setup i use a UC100 CNC Controller and a standart Breakout board. i connect this with the servo driver with 5V, GND, Dir and Step. i use a 600ppr (2400 in 4x mode)  Rotation Encoder from china and a 24V Powersupply with 40A. Sorry i am not a specialist in programming, i´m only a cnc machinist with some small knowledge in electronical. sorry for my bad english. (gemoron79$

  Are you sure? yes | no

ottoragam wrote 06/20/2017 at 21:51 point

Apologies for the late reply. I didn't got the notification for your last comment. I'll contact you through your email account.

  Are you sure? yes | no

Solvarg wrote 06/11/2017 at 18:55 point


Is there any chance the position through serial commands could be extended? 

Current range of + or - 255 pulses is a bit limited,  believe it's a uint8 and a uint32 would make the better sense.


  Are you sure? yes | no

ottoragam wrote 06/11/2017 at 20:47 point

Hi! You can send a bigger value if you wish, but you'll need to increase the following error parameter value too, i. e. if you send something like 2000 pulses, the following error ust be quite a bit more than 2000 count, or else the controller will fault. The last firmware image (available on Github) supports signed 16-bit following error values.

  Are you sure? yes | no

ottoragam wrote 06/03/2017 at 02:38 point

Indeed, you should be getting 1800 positions per revolution after the reduction. The steppers are probably being used at 3200 steps per revolution, after microstepping (I'm not entirely sure). You can easily go above this value with a higher resolution encoder.

  Are you sure? yes | no

dakota pahel-short wrote 06/11/2017 at 20:36 point

gotcha. I was working on getting a higher resolution encoder. I was going with an optical one ( and was thinking of printing a new wheel but for some reason tarocco doesnt seen to be getting signals from the encoder. When I manually turn the wheel, nothing changes on the serial port plotter. 

However I measured the voltage coming from the A and B pins for the encoder and the voltage is responding to the movement of the wheel so everything is pinned up right as far as i can tell. Any thoughts on why the encoder movement isn't being picked up by the board?

Edit: nevermind I read this from pololu "Because the encoder board outputs are direct phototransistor outputs, some signal conditioning is often necessary between the sensor and a digital system processing the signals. For an encoder solution that can be connected directly to a microcontroller or other digital circuit, consider our magnetic encoder pair kit for micro metal gearmotors, which we generally recommend over this optical encoder."

so its not an easy fix for me i would guess. I just wish i could find higher res encoders for these little motors. 

  Are you sure? yes | no

ottoragam wrote 06/11/2017 at 20:57 point

Do you have a picture of the mechanical assembly? You could try something like this A shaft coupler is probably needed, but you can make one out of a small piece of plastic, and the encoder sensor can be directly connected to the Tarocco. You could order a custom laser cut slotted wheel and purchase an Avago HEDS-9731 (it's the one I have in my motors) or similar from an electronics distributor too. It shouldn't be more than $20 in parts, and you get precisely what you need.

  Are you sure? yes | no

dakota pahel-short wrote 05/25/2017 at 18:29 point

I'm  designing a micro extruder (30g!!!) with this board and I have a bit of a wiring question. The smoothieboard has break out pins for external drivers: step, direction, enable. Do I connect the enable to the rest pin on tarocco board?

  Are you sure? yes | no

ottoragam wrote 05/25/2017 at 20:34 point

Hi! Yes, the reset pinshould be connected to the enable pin on the smoothie. The reset is active low, so make sure the smoothieboard keeps the pin high while in operation.

  Are you sure? yes | no

dakota pahel-short wrote 05/26/2017 at 13:37 point

Btw just an update, when I tried to open Serial Port Plotter and windows prevented access saying that it was infected with Rundas.B Trojan. I'm having a little trouble finding a serial plotter that will respond to the tarocco. 

  Are you sure? yes | no

ottoragam wrote 05/26/2017 at 13:50 point

I really don't know what could be causing the antivirus to trigger. It probably is a false positive. Anyway, the serial data stream can be adjusted to send exactly the data you need in order for another program to parse it. What plotter program would you like to use?

  Are you sure? yes | no

dakota pahel-short wrote 05/26/2017 at 14:23 point

Looks like it would work but nothing is plotting. 

  Are you sure? yes | no

ottoragam wrote 05/26/2017 at 15:08 point

I'll give that plotter a check. Write to you back in a bit.

  Are you sure? yes | no

dakota pahel-short wrote 05/26/2017 at 21:08 point

please do. figuring out how to connect to the board is a real challenge . i even turned off my security to try out Serial Port Plotter but nothing seems to be getting a response . i know the board is working. the Vin led is solid until i turn on the motor and then the fault led turns on too, but nothing seems to be allowing it to send data or receive data. 

  Are you sure? yes | no

ottoragam wrote 05/26/2017 at 21:42 point

Try inverting the connections of the motor to avoid the fault when you try to spin it. Yo can use any other serial terminal program in the meanwhile, like realterm. You should see the numeric values that the Tarocco reports in the terminal window. If not, then the problem is probably caused by something else.

  Are you sure? yes | no

dakota pahel-short wrote 05/26/2017 at 21:55 point

I tried realterm. Nothing is giving me feedback. 

  Are you sure? yes | no

ottoragam wrote 05/26/2017 at 21:56 point

Try inverting the RXD/TXD connections, that may do the trick.

  Are you sure? yes | no

dakota pahel-short wrote 05/26/2017 at 22:14 point

Well that did something! I now see E0 on the screen over and over again in realterm. I also inverted the motor but it still faulted when the enable pin activated. 

edit: for some reason it rest the baud rate while i wasnt looking. changed it back and im getting $numbers which seems more correct. 

  Are you sure? yes | no

dakota pahel-short wrote 05/26/2017 at 23:05 point

So feedback is definitely happening but nothing seems to be improving the motor position. I told it to extruder 5mm and it will go from $000503 000310 to $002803 000310 and no inputs to the p seems to affect it. though it also is showing a fault right away even though it says $000500 at the start which should be no positional error. it is not the motor connections because i tried reversing those. 

  Are you sure? yes | no

ottoragam wrote 05/26/2017 at 23:56 point

It seems that inverting the motor wires is causing it to runaway. You can invert them again, or send the "invert direction of rotation command". Also, Serial Port Plotter will probably work now.

  Are you sure? yes | no

dakota pahel-short wrote 05/27/2017 at 02:08 point

I wish it was that. I've flipped it back and forth several times and nothing has happened. Everything seems wired right though. It's fun to manually move the encoder and see the number change. I'm gonna update the firmware and test that in a few days (i just got commissioned for a few hundred dollar print... gotta get the old extruder working again XD) 

So about serial port plotter, how do you use it to send commands to the driver? I didn't see anything about that in the interface. Though i did only use it for a few minutes before i turned the windows defenses back on and it removed the program....

  Are you sure? yes | no

ottoragam wrote 05/27/2017 at 02:48 point

For now I'm usign realterm to send the tunning commands and serial port plotter to visualize the error during motion. I plan to release a custom terminal program to configure the various firmware parameters and visualize the plot all in one, and later add a PID autotuner option using the controller data.

  Are you sure? yes | no

dakota pahel-short wrote 05/27/2017 at 03:08 point

that sounds awesome. i really wish i knew more about coding so i could help. i had actually wanted to set up an autotuning for this project but time is a factor im short on and i'm only half as computer smart as id like to be. 

how are you using the two programs together? it seemed like only one program could access the serial port at a time when i was doing tests. 

  Are you sure? yes | no

ottoragam wrote 05/27/2017 at 02:49 point

I forgot to ask, how are you maing the motor move? If you're using the +/- command that could cause the motor to suddenly jump due to the large change in error and thus signal a fault. I recommend that you use the step signal to test the controller.

  Are you sure? yes | no

dakota pahel-short wrote 05/27/2017 at 03:01 point

because it is attached to the extruder, i've been using the "extruder 5mm" that's a default setting from the lcd screen. however it also seems to fault everytime the motors are enabled.

  Are you sure? yes | no

ottoragam wrote 05/27/2017 at 03:23 point

I can't use both programs at the same time, I need to jump between them. That's why I need to get my own terminal ready, as it would make configuring the board much easier.

  Are you sure? yes | no

dakota pahel-short wrote 05/31/2017 at 16:45 point

Okay so I finished a large commission for someone and back on the project. I have come to the conclusion that the reset pin being attached to the enable pin was the issue. 

For anyone else interested, the smoothie board has the enable pin activate the motor drivers on "low" but it can easily be inverted to "high" in firmware by adding a "!". However, because the reset pin does not actually reset the board and instead produces a fault, connecting the enable pin to the reset will always produce a fault because the motors start off (low if inverted) and are only turned on at first homing or movement. 

I'll test it now with reset connected to error pin like the manual suggests and see how that goes. 

  Are you sure? yes | no

ottoragam wrote 05/31/2017 at 19:46 point

Let me know if everuthing goes as expected :)

  Are you sure? yes | no

dakota pahel-short wrote 06/01/2017 at 02:00 point

Its working. A bit of a pain to tune but it'll be extruding plastic in a day or two I'm sure. Any suggestions for settings or the tuning process? I'm shooting in the dark and so far my graph looks like an earth quake lol. 

  Are you sure? yes | no

ottoragam wrote 06/01/2017 at 02:05 point

Don't mess with the integral and derivative errors until the proportional coefficient gets you close to an acceptable performance. Then, the integral coefficient is useful to get things close to 0 encoder counts of error and make response faster. You may even leave the derivative coefficient at 0. You can try the Ziegler Nichols tuning method too.

  Are you sure? yes | no

dakota pahel-short wrote 06/01/2017 at 17:57 point

Thanks that helped I got the first print test:

and a question for you. I screenshot my serial port plotter. I think I need to slow down retractions because its producing variation but the best I can seem to go is get the extruder to be within +/- 5 steps. Is what I'm showing pretty normal?

  Are you sure? yes | no

ottoragam wrote 06/01/2017 at 18:47 point

Everything seems normal, and I think you're right, the error during the retraction could probably be taken care of by making it slower. Maybe the behaviour you're seeing is not even caused by the PID settings, but the motor. If it isn't mechanically capable of reaching the acceleration you want, no amount of tuning will fix it. You could try getting more torque (more acceleration) out of it by increasing the voltage, or lowering the inertia of the mechanism.

The second graph looks good! You can make the error even less by using a higher resolution encoder. What resolution are you using now? Feed rate?

  Are you sure? yes | no

dakota pahel-short wrote 06/01/2017 at 19:02 point

its a 1:150 gear reduction micro dc motor with an encoder that measures 12 points every rotation. I'd love to get an encoder with better resolution. I just havent seen any for these micro dc motors. 

its a 40 oz in motor so it should have plenty of torque for extruding. the motor is rated for 12v but ill see what happens if i attach it to my 24v power supply. 

  Are you sure? yes | no

ottoragam wrote 06/01/2017 at 18:53 point

You probably know this, but increasing the voltage of the motor supply will make the motor capable of reaching a higher maximum speed and there will be more current through it (wich causes the torque increase). Make sure the motor can handle the extra heat!

  Are you sure? yes | no

ottoragam wrote 06/01/2017 at 19:44 point

The encoder resolution has room for improvement. You could get a optical codewheel and a photodetector/emitter to make your own encoder. The codewheel is very thin and light, so you could fit it through the front shaft of the motor (3mm, right?)

It sounds like the torque is sufficient. increasing the voltage is most likely not worth the risk of frying the little motor

  Are you sure? yes | no

dakota pahel-short wrote 06/02/2017 at 18:06 point

Just wanted to double check something. The tarocco driver uses the encoder counts to do steps per mm right? So my motor with a gear reduction of 1:150 and 12 point encoder should have 1800 points per revolution right? Because right now the extruder has a really low steps per mm. its at 90 steps per mm which is at least half of what I am use to with a stepper motor that has only 200 steps per rotation. 

  Are you sure? yes | no

Rost wrote 05/14/2017 at 22:56 point

Hi! How it's going Ottoragam?) Any news about your video tutorial for motor tuning from PC ?

P.S. Still have my interest to your project. )

  Are you sure? yes | no

ottoragam wrote 05/14/2017 at 23:54 point

Hi Rost! I've been really busy improving the firmware and dealing with the assembly of the next board batch. I believe I'll be able to work on some other things, like the guide, next month.

  Are you sure? yes | no

Rost wrote 05/15/2017 at 11:15 point

I see. Will be waiting for it. Good luck with your work. ) 

By the way. New firmware will be availible to download?

  Are you sure? yes | no

ottoragam wrote 05/15/2017 at 17:43 point

Of course. Everything will be made available via Github :)

  Are you sure? yes | no

Rost wrote 01/28/2017 at 21:41 point

Hellow again. I have another question. Will it work with 48 volts power supply normaly? If not, what changes shold be done to the board to accept such voltage?

  Are you sure? yes | no

ottoragam wrote 01/29/2017 at 09:49 point

I don't think it would be possible to work at such voltage. I think the maximum should be 40 V. The gate driver (practically the heart of this design) is rated for 45 V and a maximum of 47 V. You could probably run your motors at a lower voltage without loosing too much.

  Are you sure? yes | no

Rost wrote 01/29/2017 at 12:17 point

I see, thank you. You told me that it is easy to control the driver using usb-uart converter with serial terminal like Realterm. I made a search for example how to do that on youtube and thound nothing usefull. Will you make instructions video on your youtube channel in the future showing how to do that?

  Are you sure? yes | no

ottoragam wrote 01/29/2017 at 13:35 point

Yup, I plan to make a video tutorial for the board. I recommend you read this
It should give you a basic idea on how the board is used.

  Are you sure? yes | no

Rost wrote 01/29/2017 at 15:58 point

Thank you. Will wait for it. You said in the guide about encoder errors depending on motor speed. On what speed it starts to happen? i am going to use 1600 rpm motors and 600 ppr encoders. As I can understand errors problem is about much higher speeds and high resolution encoders. Do I understand it right?

  Are you sure? yes | no

ottoragam wrote 01/30/2017 at 04:32 point

The speed at wich the error becomes more significant depends on the motor, the tuning and the thing it is coupled to, I cannot say how much the error will be. Don't worry too much about it tho, many times the error will be below the mechanical tolerances of your machine components, and you could do a finishing passes at low speed when you need to be more accurate.

  Are you sure? yes | no

Rost wrote 01/24/2017 at 17:05 point

I have more questions. Will you provide print layouts for the board, instructions for controller flashing and capasitors and resistors used? I am not experineced in electronics so any manuals and information will be very helpfull.

  Are you sure? yes | no

ottoragam wrote 01/25/2017 at 23:55 point

Hi Rost! Sorry for the delay, I was a bit busy. The design files and the manual are hosted on Github.

To connect the board to a pc you'll need a USB-serial converter, like the popular FTDI boards. Then you can use a serial terminal program like Realterm to monitor and adjust the parameters for operation. You can use any microcontroller to command the controller to move the motor, just send it some high-low pulses.

  Are you sure? yes | no

Rost wrote 01/26/2017 at 00:25 point

Thank you for answer. I took a look on a board schemе but i noticed it has some polygones and i need to learn how to make it printable for a laser printer mask, because all my experience was just a few boards made long time ago in an old style way.) I wiil try to learn how to make the board scheme printable or i can relay on your recomandation. Maybe you know a good youtube links how to make boards print close to the type of yours. I anderstand my questions are very beginner level, so thank you for your patience.

  Are you sure? yes | no

ottoragam wrote 01/27/2017 at 10:38 point

No worries :) You need to click the Ratsnest button first to fill the polygons. Then activate the pads, vias and top (and then bottom) layers to see only the copper zones on the board. Then go to file-print and check the mirror and black options before you print the mask.

  Are you sure? yes | no

Rost wrote 01/27/2017 at 19:58 point

Thank you. I tried and now it's allmost clear. Next step to order materials and components. Some of them long time to wait. But it's a good hobby time for winter.)

  Are you sure? yes | no

Rost wrote 01/24/2017 at 14:43 point

Hi! Can you recommend simple setup ? I want to make one driver board only and connect it to pc via usb for example. What simple soft i can use just to check dc servo for steps and rotaition besides arduino and grbl?

  Are you sure? yes | no

mitja.kumin wrote 11/24/2016 at 22:33 point

Interesting project! Just what I need to upgrade my CO2 laser stepper motor system. Is there a way to setup the PID parameters and how it is done?

  Are you sure? yes | no

ottoragam wrote 11/24/2016 at 23:31 point

Hi Mitja, I'm glad you like the project! The controller settings, including the PID coefficients can be modified via serial commands. You just need to send a packet like p234; to modify the non volatile values for each parameter. The controller also transmits back the errror value in real time (100 Hz), to make the calibration process easier.

  Are you sure? yes | no

ottoragam wrote 11/24/2016 at 23:37 point

I plan to upload a video of the whole process soon. Give me a day or two and it will be ready :)

  Are you sure? yes | no

mitja.kumin wrote 11/25/2016 at 18:19 point

Fantastic! I will make PCBs this weekend. I will make some tests with yaskawa DC servo motors. My plan is to use these in my machine. I also have some BLDC servo motors, some of them quite massive but they will have to wait for another kind of controller.

About rotary encoder: if math serves me well I can use 600P/R encoder. That would result in 40kHz at 1000RPM. So the encoder frequency would max out (200kHz) at 5000RPM which is way to high for even a 5mm pitch lead screw. This would result in speed of 25m/min. My goal is resolution and with 600P/R encoder i get insane resolution of 2um. In reality this is impossible to achieve on home built machine. 

I will probably go with 400P/R encoder, as this gives me a resolution of 0,02mm with GT2 timing belt (2mm pitch and 16 teeth pulley) and the encoder frequency will max out at 7500RPM which is 15m/min. But that won't happen because motors don't spin so fast.

Instructional video of controller setup would be really great addition and will make the project even come closer to the end user.

  Are you sure? yes | no

ottoragam wrote 11/25/2016 at 20:16 point

Your calculations are correct :) Do you have more info on those servos of yours? I also have the BLDC version of this controller, the hardware works, but I have not done any firmware development beyond a basic commutation test.

I plan to use it on a RF45ish mill build. If you want I can upload the hardware files, but I don't think I'll make any software progress till I complete the Tarocco project.

  Are you sure? yes | no

ottoragam wrote 11/25/2016 at 20:21 point

I also uploaded a user's manual. It is not complete yet, but I think it could be useful. Check the project files section

  Are you sure? yes | no

mitja.kumin wrote 11/29/2016 at 20:28 point

Great I will take a look tonight.

About the servo motors: I have 3 pcs yaskawa minertia motor, model T03M-AR21. I got lucky and got them on MAM Radio Messe in Friedercshafen for 10€/piece. They are not specifically strong but as they can turn faster than steppers I can implement reduction pulley to reduce turning speed and increase torque. 

I really hope you will work on BLDC controller in future. I have projects to use the motors but no controller. The only difficulty could it be that they need higher voltages, like 90V and even 110V. I regularly go on fairs in Italy and Germany to find used industrial ware for small money. The servos are usually without drives :(

  Are you sure? yes | no

mitja.kumin wrote 11/29/2016 at 20:59 point

I read your manual and I have to say that some things are much clearer now. I really appreciate your effort. Writing a manual is a hard task and it takes as much time writing it as it takes for the project development. But in the end there are always few users more because with manual all is explained and immediately known what can be expected prom the project. 

About the design: is this final or will there be some upgrades in the future? 

I have on my mind opto isolation of the inputs/outputs, some way of mounting a heatsink on the transistors if needed (those glue on type sucks).

  Are you sure? yes | no

ottoragam wrote 11/29/2016 at 21:54 point

 That's a amaaazing price for the motors! The only change I have in mind for the controller is moving the step and direction pins to port 0, as port 4 pins cannot connect to the internal programmmable logic of the PSoC. That would allow the controller to potentially handle step pulse frequencies above a MHz, tough I doubt it would be that useful many of us. The other advantage would be the option of decoding a wide variety of signals in hardware, not just only step and direction.

I tought that a good way to heatsink the transistors would be with something like a laser cut 3mm Al sheet that can be installed using the pcb mounting holes. You could even put a 40 mm fan on top.

I use a beaglebone with machinekit to control my machines. As you can see, the optocouplers are on the connector cape. I feel it is more versatile this way, as people who don't need isolation can save a bit of money.

I've tested these boards with H11L1 optoisolators, they're fast, work fine and are not expensive.

The BLDC controller should be able to handle motors up to 150V with the correct FETs and capacitors. I think a good value would be 90V, as higher voltage components start to get kinda expensive from here. Cheap quick switching, low resistance MOSFETS are very rare past ~120 V, in my experience. I am using 75V FETS as of now, cause I only need 48V for my motors, but I think it would be a good idea to change them. There are not many "high voltage" economic controllers out there, as you point out. I'll try to post the BLDC controller files on this site as soon as I can.

And please feel free to ask about anything that's not covered in the manual :)

  Are you sure? yes | no

psykhon wrote 10/27/2016 at 16:17 point

Could you also provide/recomend a more powerfull motor?

  Are you sure? yes | no

ottoragam wrote 10/27/2016 at 20:24 point

Hi psykhon! Would be of use? It is a ~120W unit.  Can you tell me more about your motor requirements? price point? I should be able to supply some other motors, based on the needs of the project followers.

  Are you sure? yes | no

Rainer wrote 10/21/2016 at 11:02 point

Will the new controller board also be open-source/open-hardware like the first one or just closed-source and available to buy from you or crowdsupply?

  Are you sure? yes | no

ottoragam wrote 10/21/2016 at 11:11 point

Hi Rainer! You can check most of the design files for this project here:

Right now there are some minor features missing, and I still need to add the BOM. But you're welcome to ask me anything about the new design (the main change is the microcontroller, Tarocco uses a CY8C4245PVI instead of the Atmega328)

  Are you sure? yes | no

Rainer wrote 10/21/2016 at 11:18 point

Thanks for the github link. :)
I think of replacing my steppers on my little desktop cnc for brushless motors. So i'm quite interested in such a controller which also is affordable. All industrial brushless controller are way to expensive for me.

  Are you sure? yes | no

ottoragam wrote 10/21/2016 at 11:36 point

Yup, I faced the same pricing issue, that's why I decided to make this
thing. Have you chosen the motor yet? Maybe I can convince you to use
some affordable brushed servomotors instead? I plan to provide a full kit for those who have trouble sourcing the motor. It is a 24V 30W motor with a maximum speed of 4000 rpm, with a 1440 pulses per revolution optical encoder.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates