Brushed Motor ESC PIC12F675 PWM

| July 12, 2023 Updated
Brushed Motor ESC  PIC12F675 PWM

Brushed Motor control circuits are used by making some changes in the software with the slightly different basic circuit built on the PIC12F675 microcontroller. There are all Brushed Motor control circuit diagrams and source picmikro software. Combinations of software timing and timer-based interrupts were used to create the ESC PWM.

This project documents how to build and build your own Brushed Motor ESC using Microchip 12F675 PIC and few standard components. Various test systems are also described, allowing to investigate how ESCs work.

The ESC described here is primarily for airplanes. There is a related project for this application designed for cars and boats with similar features to commercial ESCs.

Important Note: This information is provided “as is”. Model airplane is not a toy. The construction and use of this device is at the user’s own risk.

There are a number of other projects documented for brushed motor ESCs. A good starting point for other ESCs is this rcgroups array. The information in Microchip AN847 is also very helpful. Many of these designs are very similar, the difference between the designs typically being in the PIC used to control the ESC, the precise FETs used, and the number of features the ESC offers. Some differences are probably due to availability and cost of parts as well.

There were two main reasons I started this project: None of these projects used the 12F675 and this PIC has a number of interesting features. The most important of these is that Flash is a programmable part, a good tool for testing ideas and allowing ESC to be reprogrammed and various ideas to be tested. None of the other designs offered exactly what I was looking for, and there was also a certain difficulty in programming a 12F675 to perform this task.

PWM Brushed Motor ESC

pic12f675_devre_mosfet

This ESC design offers the following features:

Safe start requires the throttle to be closed to activate ESC.
Signal loss stops, on valid signal loss it stops the motor.
Undervoltage cutoff stops the engine at low battery voltage.
Variable rate PWM output to reduce noise at low speeds and increase efficiency at high speeds.
Programmable throttle response curves with two sample curves.
Slow start (or fast start if desired) to protect gearboxes
Hard or soft brake (optional).
Accurate throttle pulse width measurement.
Accurate software PWM with rates between 7.6kHz and 2kHz
64 motor speeds for smooth speed control.
Automatic low and high throttle adjustment.
Both braking and non-braking zero throttle positions (optional) for use in car applications.
Lost Pattern Alarm (optional).
Fault counter (optional).
Reverse output (optional).

Low Voltage Disconnect: The ESC monitors the battery supply voltage and shuts down the engine when the supply voltage drops below a preset point. The code provided runs the interrupt at 6V, which is considered a relatively safe point. The LM2940 BEC will run up to 5.6V, so stopping the motor at 6V leaves some margin for error. When the cutout detects 6V or less, the throttle must be reset to idle for the engine to start.

The ESC checks the battery voltage every time a servo control pulse is received or approximately every 20 ms. These readings are averaged over 4 consecutive samples to obtain a more stable battery voltage reading. Under high load conditions it is possible to get a very low reading when the FET is turned on, averaging reducing the chance of a false voltage reading triggering the LVC. The sample size can be increased if desired. An alternative would be to increase the filter capacitor at the voltage sense input, but a software solution would allow filtering parameters to be changed without hardware changes. The ESC can be configured with two different low voltage points. In this mode, input GP3 (jumper W1) selects which cut-off voltage is active.

Automatic low and high throttle setting: When the ESC is activated, the throttle is assumed to be in the ‘low’ position. After the power is turned on you should bring the throttle to ‘high’ and then back to ‘low’. The ESC will then engage and emit two short “beeps” via the motor. This feature assumes that the ‘high’ setting has a longer servo pulse width than the ‘low’ setting. Therefore, Futaba transmitters will still require reverse servos in the throttle channel.

pic12f675-maket-ucak-pwm-motor-kontrolu-fircali-motor-esc

After ‘beep’ sounds (1.5 seconds) ESC enters normal operating mode and waits for ‘low’ throttle. This means that the ESC will not rotate the engine if the throttle is advanced during the ‘beeps’. For this reason, the gas should not be pressed until the ‘beeps’ stop.

Slow start: operates by moving the throttle 1 step forward each time the received throttle setting is higher than the current setting. In practice, that means it takes about 1.2 seconds (64 * 0.02 seconds) to go from idle to full throttle. If the received throttle is lower than the current ESC setting, the ESC waits until it drops to two parts in succession, and then immediately lowers the throttle to the selected value.

This behavior stops a faulty receiver pulse from ‘beeping’ the motor. A faulty ‘low’ throttle at slow start will cause the ESC to adjust correctly using slow start, this should be avoided whenever possible for smooth flight. A single pulse filter appears to significantly reduce this problem. If desired, ESC can be created by turning off slow start. In this case, the ESC will immediately raise the throttle when a higher throttle setting is received.

Soft Brake: The soft brake option uses the throttle PWM motor to gradually apply one step brake each time the idle throttle is taken (approximately every 20 ms). This means that it takes approximately 1.2 seconds to fully apply the brake. Flight test shows that this works well if the transmission is not subject to sudden changes in engine speed.

Brake enable/disable via a jumper is an option of this ESC software. This is mainly provided to show that it is possible to control the ESC features via a jumper. One of the possible uses of a jumper is to disable the brake. On some aircraft, or possibly when testing and evaluating the brake, it may be appropriate to disable the brake without replacing the PIC.

Most standard ESCs convert the dimmer setting to PWM rates using a simple linear mapping. So 50% dimming corresponds to 50% PWM. However, a 50% PWM rate actually only supplies 25% of full power to the motor. This is the standard configuration of this ESC as well.

The design of the software for this ESC makes it very difficult to change the throttle-to-PWM ratio mapping so that 50% throttle corresponds to 50% engine power.

Source: designsoft.com.au/ Brushed Motor ESC pic assembly source code schematic files alternative link:

Brushed Motor ESC PIC12F675 PWM

Password: 320volt.com

Published: 2008/08/19 Tags: , , ,



1 Comment “Brushed Motor ESC PIC12F675 PWM

  1. Electronics CircuitsElectronics Circuits

    Mini Combox Project

    The ComBox is a practical accessory for LAN parties, network or other occasions when a group of computer users to communicate between rooms meheren. It is a pure hardware structure, unlike the case for this massive scale already available software solutions A number of advantages:

    # runs on any operating system, independent of software depending ä
    # the ComBox the microphone input of the sound card is
    # simultaneous communication between all members of a group m ö resembled
    # no latency periods, the signals are passed without delay
    # very good Sprachqualit ä t
    # tig no full-duplex sound cards-term ö
    # no button pressing need
    # no additional network load
    # a real alternative to voice-over-IP

    REPLY

Leave a Reply

Your email address will not be published. Required fields are marked *

 

Comment moderation is enabled. Your comment may take some time to appear.