Lumenier RB2205C-12 2400KV SKITZO Ceramic Bearing Motor
Thread Tools
Old Feb 15, 2013, 11:52 AM
boaterguy is offline
Find More Posts by boaterguy
Thermite + ice = Big boom.
boaterguy's Avatar
Build Log

Switching brushed ESC


After blowing up a brushless controller with 70A Fet's on it, I figured I would build a brushed controller with it.
Initially, the code isn't so complicated, but after adding a for loop to count through the FET's, I'm having a little trouble, here is what I have so far:
Code:
//initialize variables
int inpulselen = 0
int outpulselen = 0
int pin = 1
int tmin = 0
int tmax = 2000

void setup() 
{
  pinmode (12, INPUT) 
  tmin = pulseIn (12, HIGH) //set the 0 throttle point at the 
  //current throttle position
  
}

void loop ()
{
  for (int i = 8; i >8 ; i += 1)
    {
      if (i == 11) //loop through pins 8 to 11 and restart
      {
        i = 8
      }
      inpulselen = pulseIn (12, HIGH) //read pwm and map it
      outpulselen map (inpulselen, tmin, tmax, 0, 255)
      digitalWrite(i, HIGH)
      delay(outpulselen) //pretty self explanatory
      digitalWrite(i, LOW)
      delay(255-outpulselen)  
    }
I know there`s a better way to do this, but I don`t know what it is, any suggestions?
Last edited by boaterguy; Feb 15, 2013 at 01:22 PM.
Sign up now
to remove ads between posts
Old Feb 15, 2013, 01:11 PM
blutoh is offline
Find More Posts by blutoh
---o-O-o---
blutoh's Avatar
Hi boaterguy,

In this line: for (int i = 8; i >8 ; i += x)

Where is the x variable coming from, I don't see it initialized or used anywhere else in your program.

If you are incrementing the loop counter, I believe it should be: for (int i = 8; i >8 ; i += 1)

Or am I misunderstanding the problem?

Pete
Last edited by blutoh; Feb 15, 2013 at 01:17 PM.
Old Feb 15, 2013, 01:22 PM
boaterguy is offline
Find More Posts by boaterguy
Thermite + ice = Big boom.
boaterguy's Avatar
Oops, I was using a different strategy but I changed it, and forgot to change that, it should be i += 1.
Thanks for noticing, that could have been confusing if I came back a day later.
Old Feb 16, 2013, 02:50 PM
Dutchraptor is offline
Find More Posts by Dutchraptor
Registered User
Dutchraptor's Avatar
Why not just do: analogWrite(Pin, Value); Or send PWM commands.

A friend of mine drew this a few years ago:


The 5V can vary between 0 and 5v. Worth trying. Verbruiker is dutch for user (motor). We made this for a controller called Bitwhacker (early open-source unit).

Danny
Last edited by Dutchraptor; Feb 16, 2013 at 03:02 PM.
Old Feb 16, 2013, 10:29 PM
boaterguy is offline
Find More Posts by boaterguy
Thermite + ice = Big boom.
boaterguy's Avatar
I can do the single FET design no problem, I just thought it would be more efficient to do a switching design. I guess it's probably not worth the effort in the end.
Is the 1m resistor 1 megohm or is it dutch for 1k?
Old Feb 17, 2013, 04:24 AM
KiwiDavid is offline
Find More Posts by KiwiDavid
Registered User
Hi,
There's a few changes I would make to the circuit shown.

Driving the gate with an analog voltage will produce very high dissipation in the FET and require a massive heatsink. For example if the FET is half on dropping 6 volts of the 12V supply and the motor at this voltage is drawing say 8A then that's 48W of heat the FET has to get rid of.

The diode in the gate would seem redundant and if used on PWM drive would be almost dangerous. PWM relies on the FET being hard on (current but no voltage drop) or hard off (no current but full voltage drop). Neither mode dissipates any energy so the FET stays cool. The mark/space of the switching waveform is varied to provide a variable average voltage and the motor inductance integrates the current pulses to a steady current.
With a diode and 1M resistor the drive can not turn the FET off quickly and the stored charge in the gate has to discharge via 1M which will be too slow and the FET will dissipate during the turn off ramp down.

The FET needs to be a logic level type device that is characterized for 5V drive.
Standard FETs need 8-10V of drive to turn on fully and would get hot if the drive was limited..

The motor needs to have a high current Schottky diode across it, reverse connected, to catch the back EMF spikes when the FET is turned off. It will work as is but the FET will go in to repetitive avalanche breakdown mode causing even more heat.

Cheers,
David


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Discussion Reprogram a brushless ESC to get a brushed ESC with no delays / RC Switch kapteinkuk DIY Electronics 102 Dec 03, 2016 12:32 PM
For Sale NIB Futaba MC850C Brushed ESC Dallas101 Cars - Accessories (FS/W) 1 Jun 23, 2013 07:00 PM
For Sale Big lot of brushed goodies!!! Motors\ESC's\Integy auto com lathe!! Dallas101 Cars - Accessories (FS/W) 7 Feb 25, 2013 04:08 PM
Sold NIP E-flite 10-Amp Micro Brushed ESC Bryan's Flyin Aircraft - Electric - Power Systems (FS/W) 4 Jan 22, 2013 01:55 PM
For Sale 2 brushed ESCs and multiple motor/gearbox combo Kyle G. Aircraft - Electric - Power Systems (FS/W) 1 Jan 21, 2013 10:40 PM