Make your own ESC/Servo Tester

Let's get started this video is sponsored by Jael CPCB who grew rapidly in the past year due to the support of all my viewers that is why they will continue their special offer of 10 PCBs for only $2.00 first off how does the required PWM control signal for the ESC has to look like if we observe it on the oscilloscope we can see that features a cycle duration of 20 milliseconds and a variable on time between 1 milliseconds and 2 milliseconds this signal is pretty much standardized and is also used for servo motors but while the different on times represent a different angle for the shaft of the servo motor it represents a changing duty cycle for our bill DC motor and thus usually a higher speeds and power.

WEBVTTKind: captionsLanguage: enlet's face it I love doing projects and experiments with BLDC motors in order to get them to rotate though they require a so-called ESC also known as an electronic speed controller now after in several videos about how such an EC works and how you can even create your own so I'm not going into detail here what I can say though is that besides a sufficient supply voltage commercial ec's also require a control signal through its three pin header it spins consists of the PWM control signal 5 volts and ground you can buy an EC tester which provides such a PWM control signal online for cheap but as you might know I've been using a custom built one for while now which works like a charm so in this video I will show you how it works and how you can make your own let's get started this video is sponsored by Jael CPCB who grew rapidly in the past year due to the support of all my viewers that is why they will continue their special offer of 10 PCBs for only $2.00 first off how does the required PWM control signal for the ESC has to look like if we observe it on the oscilloscope we can see that features a cycle duration of 20 milliseconds and a variable on time between 1 milliseconds and 2 milliseconds this signal is pretty much standardized and is also used for servo motors but while the different on times represent a different angle for the shaft of the servo motor it represents a changing duty cycle for our bill DC motor and thus usually a higher speeds and power Bellanca on time so how can we create such a precisely timed signal and the answer should be pretty obvious to you if you watched my basics video about timers I will be using the atmega328p microcontroller on an arduino pro mini development boards and its 16-bit time are 1 in the codes I said it's most important register bits to those values but what do they mean with the wgm 11 12 and 13 bits I activated the fast pwm modes with the ICR 1 register as the top value which means it will define the cycle duration which we want to be 20 milliseconds with the CS 11 bits I set the prescaler to AIDS which means that if he born the cycle duration of 20 milliseconds we would need an IC or one value of 40 thousands which I defined in the codes with the com1 a 1 bits I force the OC 1 a pin to go low when a compare match occurs which sounds complicated at first but basically we can define an OCR 1 a value which once reached pulls the pen 9 low which coincidentally is the OC 1 a pin obviously if before pulling the pin low it featured a high states and thus we got our PWM signal which repeats every 20 milliseconds as an example I went with an OCR one a value of three thousands which would represent and on time of one point five milliseconds and after connecting and FTDI breakout boards and programming the arduino pro mini ax we can observe the pwm signal we just came up with on the oscilloscope perfect to adjust the signal on the fly later on i also added an i square see a sixteen by two LCD to the mix as well as for tactile switches a potentiometer and a locking push-button the locking push-button determines whether we use the for tektite switches to increase or decrease the first or last digit of the on time or whether we use the potentiometer for that additionally I also used a 3 pin male header to hook up the ESC connector and a PCB terminal to hook up our of course you could scrap the terminal if he want to power your circuits through the ESC but I like to power it all with my lipo charge protect boost circuits so after gathering all the components I started soldering them to approve ports and to one another according to my finalized schematic the soldering process took me around an hour and after adding some spacers to properly secure the LCD to the purports the hardware aspects was completes for the code aspects I did only use pretty standard functions like digital reads or delays for the bouncing or analog reads and nothing fancier like interrupts because beside the timer implementation we do not require anything complicated but feel free to download decodes and go through it line by line it is really not difficult to understand after the codes was complete I uploaded it to the Arduino Pro Mini through the FTDI break or ports hooked up power and checked whether everything worked correctly which it is now the precision of the on time is about plus minus zero point zero zero two milliseconds which I would say is pretty decent and as you can see as a final test all my ear C's work happily with my custom-made EC tester which as you might know by now is not complicated to understand and built with that being said I hope you enjoyed this small project if so don't forget to like share and subscribe stay creative and I will see you next timelet's face it I love doing projects and experiments with BLDC motors in order to get them to rotate though they require a so-called ESC also known as an electronic speed controller now after in several videos about how such an EC works and how you can even create your own so I'm not going into detail here what I can say though is that besides a sufficient supply voltage commercial ec's also require a control signal through its three pin header it spins consists of the PWM control signal 5 volts and ground you can buy an EC tester which provides such a PWM control signal online for cheap but as you might know I've been using a custom built one for while now which works like a charm so in this video I will show you how it works and how you can make your own let's get started this video is sponsored by Jael CPCB who grew rapidly in the past year due to the support of all my viewers that is why they will continue their special offer of 10 PCBs for only $2.00 first off how does the required PWM control signal for the ESC has to look like if we observe it on the oscilloscope we can see that features a cycle duration of 20 milliseconds and a variable on time between 1 milliseconds and 2 milliseconds this signal is pretty much standardized and is also used for servo motors but while the different on times represent a different angle for the shaft of the servo motor it represents a changing duty cycle for our bill DC motor and thus usually a higher speeds and power Bellanca on time so how can we create such a precisely timed signal and the answer should be pretty obvious to you if you watched my basics video about timers I will be using the atmega328p microcontroller on an arduino pro mini development boards and its 16-bit time are 1 in the codes I said it's most important register bits to those values but what do they mean with the wgm 11 12 and 13 bits I activated the fast pwm modes with the ICR 1 register as the top value which means it will define the cycle duration which we want to be 20 milliseconds with the CS 11 bits I set the prescaler to AIDS which means that if he born the cycle duration of 20 milliseconds we would need an IC or one value of 40 thousands which I defined in the codes with the com1 a 1 bits I force the OC 1 a pin to go low when a compare match occurs which sounds complicated at first but basically we can define an OCR 1 a value which once reached pulls the pen 9 low which coincidentally is the OC 1 a pin obviously if before pulling the pin low it featured a high states and thus we got our PWM signal which repeats every 20 milliseconds as an example I went with an OCR one a value of three thousands which would represent and on time of one point five milliseconds and after connecting and FTDI breakout boards and programming the arduino pro mini ax we can observe the pwm signal we just came up with on the oscilloscope perfect to adjust the signal on the fly later on i also added an i square see a sixteen by two LCD to the mix as well as for tactile switches a potentiometer and a locking push-button the locking push-button determines whether we use the for tektite switches to increase or decrease the first or last digit of the on time or whether we use the potentiometer for that additionally I also used a 3 pin male header to hook up the ESC connector and a PCB terminal to hook up our of course you could scrap the terminal if he want to power your circuits through the ESC but I like to power it all with my lipo charge protect boost circuits so after gathering all the components I started soldering them to approve ports and to one another according to my finalized schematic the soldering process took me around an hour and after adding some spacers to properly secure the LCD to the purports the hardware aspects was completes for the code aspects I did only use pretty standard functions like digital reads or delays for the bouncing or analog reads and nothing fancier like interrupts because beside the timer implementation we do not require anything complicated but feel free to download decodes and go through it line by line it is really not difficult to understand after the codes was complete I uploaded it to the Arduino Pro Mini through the FTDI break or ports hooked up power and checked whether everything worked correctly which it is now the precision of the on time is about plus minus zero point zero zero two milliseconds which I would say is pretty decent and as you can see as a final test all my ear C's work happily with my custom-made EC tester which as you might know by now is not complicated to understand and built with that being said I hope you enjoyed this small project if so don't forget to like share and subscribe stay creative and I will see you next time