Introduction: Make Your Own ESC
In this project I will firstly demonstrate how a common ESC works and afterwards create a circuit consisting of an Arduino Nano, an L6234 motor driver IC and a couple of complementary components in order to build a DIY ESC. Let's get started!
Step 1: Watch the Videos!
The two videos give you a good idea of what is necessary to do to create your own ESC. In the following steps I will present you some additional information.
Step 2: Order Your Components!
Here you can find a parts list with example seller (affiliate links):
Aliexpress:
1x Arduino Nano: https://s.click.aliexpress.com/e/_dULoNXh
2x LM393 Comparator: https://s.click.aliexpress.com/e/_dWasUKx
1x L6234 IC: https://s.click.aliexpress.com/e/_d9ewKMJ
4x 470nF, 1x 100nF, 1x 10nF, 1x 220nF Capacitor: https://s.click.aliexpress.com/e/_dU4FEsB
2x 1µF Capacitor: https://s.click.aliexpress.com/e/_d7dOwRz
4x 1kΩ, 3x 10kΩ Resistor: https://s.click.aliexpress.com/e/_dTPpXjt
5x 1Ω Resistor: https://s.click.aliexpress.com/e/_dZjocVh
2x 10kΩ Potentiometer: https://s.click.aliexpress.com/e/_dX83GAF
2x 1N4148 Diode: https://s.click.aliexpress.com/e/_dYR45Bh
Ebay:
1x Arduino Nano: http://rover.ebay.com/rover/1/711-53200-19255-0/1?...
2x LM393 Comparator: http://rover.ebay.com/rover/1/711-53200-19255-0/1?...
1x L6234 IC: http://rover.ebay.com/rover/1/711-53200-19255-0/1?...
4x 470nF, 1x 100nF, 1x 10nF, 1x 220nF Capacitor: http://rover.ebay.com/rover/1/711-53200-19255-0/1?...
2x 1µF Capacitor: http://rover.ebay.com/rover/1/711-53200-19255-0/1?...
4x 1kΩ, 3x 10kΩ Resistor: http://rover.ebay.com/rover/1/711-53200-19255-0/1?...
5x 1Ω Resistor: http://rover.ebay.com/rover/1/711-53200-19255-0/1?...
2x 10kΩ Potentiometer: http://rover.ebay.com/rover/1/711-53200-19255-0/1?...
2x 1N4148 Diode: http://rover.ebay.com/rover/1/711-53200-19255-0/1?...
Amazon.de:
1x Arduino Nano: http://amzn.to/2w0QQLZ
2x LM393 Comparator: http://amzn.to/2uRTgaM
1x L6234 IC: http://amzn.to/2w2M2VK
4x 470nF, 1x 100nF, 1x 10nF, 1x 220nF Capacitor: http://amzn.to/2wUe03i
2x 1µF Capacitor: http://amzn.to/2wUyby6
4x 1kΩ, 3x 10kΩ Resistor: http://amzn.to/2vujMKZ
5x 1Ω Resistor: http://amzn.to/2vzjBwc
2x 10kΩ Potentiometer: http://amzn.to/2uRZveE
2x 1N4148 Diode: http://amzn.to/2fCTO2E
Step 3: Create the Circuit!
Here you can find the schematic along with reference pictures of my board layout.
Step 4: Upload the Code!
Here you can download the code that I created for the project. Since I created quite a few of them you can download them all.
Sketch 1: Uses the analogRead function to measure the current
Sketch 2: Uses the external interrupt on pin 3 to measure the current
Sketch 3: Uses timer 2 to control the current chopping
Sketch 4: Uses the interrupts on pin 10,11,12 to switch to the next step
Step 5: Success!
You did it! You just created your own ESC!
Feel free to check out my YouTube channel for more awesome projects:
http://www.youtube.com/user/greatscottlab
You can also follow me on Facebook, Twitter and Google+ for news about upcoming projects and behind the scenes information:
https://twitter.com/GreatScottLab
https://www.facebook.com/greatscottlab
38 Comments
4 months ago
Do you have Simulation file?
Question 9 months ago on Step 3
Hello, Thanks for making this tutorial. I am wondering how much current this can handle and at what voltage?
Question 4 years ago on Step 5
Hi,I want to try this project.But before the create it, I want to simulate in the program .Which simulation program you use ?Can you help me?
Answer 11 months ago
I don't think there is any software out there that allows you to simulate a circuit that is that complicated and also simulates an arduino as well.
Tip 11 months ago
Just for anybody trying to make this, you have to put a 1k pull-up resistor at each of the outputs of the comparator. It's unlikely that it would work without it and I think he just made a mistake in the schematic.
3 years ago
I want to 36v 250w bldc motor controller can you make it ?
Reply 11 months ago
You just need to make a triple half-bridge from 6 mosfets and drive them with bjts instead of the L6234. Just make sure they're rated for the current but the rest of his circuit should work for it.
11 months ago
Yeah, but it's not easy. You'll need to make a triple half-bridge out of mosfets and then use BJTs for driving them. I did it that way and its a lot cheaper than l6234 and you can push a lot more current through it.
Question 1 year ago on Step 5
Hello sir,
I am trying to do this project with L6234D SIP package and 1000Kv BLDC motor.
I am using adaptor of 12v and 2 A for power supply.
At the end motor is only give magnetic vibration but not able to rotate.
I don't know why it happens, please give some guidance.
Answer 11 months ago
Check the circuit, use an oscilloscope to make sure your waveforms match his.
1 year ago on Step 5
Hello sir,
I am trying to do this project with L6234D SIP package and 1000Kv BLDC motor.
I am using adaptor of 12v and 2 A for power supply.
At the end motor is only give magnetic vibration but not able to rotate.
I don't know why it happens, please give some guidance.
2 years ago
Correct me if I'm wrong, but there appears to be a bug (well, 3 identical ones) in 4.ino:
`step == (2 || 5)`
Shouldn't it be the following:
`(step == 2 || step == 5)`
Also, this code unreachable because it's within the `step == (2 || 5)` condition:
```
if (step == 6) {
step = 0;
}
```
2 years ago on Step 5
High experiment and idea for teaching,
3 years ago
1x Arduino can run bldc motor without Nano or help please
Question 3 years ago on Introduction
hi,
I am doing a project using ESC circuit that is run using arduino uno. I am using this circuit to run a small 12v compressor, the expected flow rate to be obtained is 11 litres/min,but i am able to obtain only 7.5 l/m at the maximum speed of the compressor. So should i increase the voltage to the compressor or the speed of the compressor can be increased by the code itself?
the link form where i have referred this circuit and code is given below,please have look at it and help me if should make changes in code?.if yes then please help me with the changes in code too.
https://simple-circuit.com/arduino-sensorless-bldc-motor-controller-esc/
4 years ago
Hi Great Scott my question is, do you think the basic code will run on a senseless squirrel cage induction motor that has no magnets and whose load is a simple green house fan?
4 years ago on Introduction
Hi Scott, the actual boards pictures you show do not look like the electronic diagram. What changes do I need to make to make this work ?
Thanks
Question 4 years ago
what changes i have to do for made a esc for a brushed motor ?
Answer 4 years ago
this driver is only for brushless motor, brushed motor is a completely different structure and you cannot modify from this driver
5 years ago
Followed this on youtube. Great work, learned a lot