AlkaM's blog - RC Groups
Shop our Airplanes Products Drone Products Sales
AlkaM's blog View Details
Posted by AlkaM | Dec 13, 2017 @ 08:10 PM | 1,278 Views
Hi,

Its been a while since I put up a DIY electonics blog post. I live in Canada so I try to spend my summer outdoors. This next one took me a little while to get right, I made the first revision around June of this year and made a mistake with my original schematic. I built the board and programmed it and everything seemed to work but I could not get a motor to spin up. Thinking this was a software problem I then devoted the next two months adjusting and tinkering with startup parameters and motor profile settings.. It was not a software problem. I had completely screwed up the op amp gain resistors circuit and no amount of changing settings would fix that. A sharp knife and some small wire did fix my problem and after that i was able to get a motor spinning.
I haven't tested much yet but this is a stripped down simplified version of the "steval-stspin32" demonstration board. It has the same pinout for the user keys and potentiometer and the firmware example will run on my board without much modification. I did have to play around with dead time and pwm and foc rates to make my board run and start up stable.
I used the bull running 1700 kv motor that came in another nucleo kit because the motor was already profiled. If using an unknown motor you will have to create a new profile for that motor and recompile the firmware. That's the problem with FOC. You can't just hook up an unknown motor.. and profiling a motor is not a simple thing.

I will include the gerber and diptrace files again like my other posts also a working firmware binary for the bull running 1700kv motor. There is a lot of potential for this little chip as it contains the gate drivers, voltage regulators and mcu all in one. The stspin32f0A is probably a better choice for rc as it has a wider voltage range ( down to 2s lipo).

Simple FOC speed control board using stspin32f0 (1 min 13 sec)

Posted by AlkaM | Jun 01, 2017 @ 01:38 PM | 3,757 Views
This is a very simple esc to build. It actually uses P-fets for the upper switch and switches them through a voltage divider. The bottom n-fet is driven directly from the MCU. I have tested it in a quad on 2s and 3s and on the bench with 1s ( don't have a 1s flight controller to test with). It didn't even explode on 4s with a racerstar 1306 motor !( but most likely would in the air or the motor would smoke). It can't give a current rating but it will be fine for the smaller motors up to 15 amp burst. In practice the motor got much hotter than the esc's for the 1306's.
It's tricky to get the bridge to switch fast enough so the resistor and component choices are critical. There are only a handful mosfets that I know of that would work on the pcb at that switching speed with such poor drive current. Also the pinout for the p-mosfet is different from the norm so look at the parts notes on the schematic carefully if you want to build this. The layout is a for a four layer board but the schematic is pretty basic to make a two layer version.
Uses firmware F_H_90.

Gerber files and schematics and layout in the zip.

Upper mosfet p-channel : CSD25402Q3
Lower mosfet n_channel: CSD17304Q3
Posted by AlkaM | Apr 19, 2017 @ 08:51 PM | 4,503 Views
First off thanks to Steffen , B. Konze, SimonK and everyone who contributed to any of the open source firmwares. I can code a little but having access to well written, up to date firmware has allowed me to make these hardware abominations possible.
I know these escs in my blog aren't revolutionary, the schematics are basic circuits taken from reference designs and schematics floating around the internet. I make them fast so I can use them for a project then go on to the next one. So they are crude and probably break MANY "best practice" guidelines for pcb design. They do all work and they are all tested but proceed at your own risk if you decide to make one. I hope they are of some educational use to someone out there.

This next esc was a board I was using to play around with BLHeli_S. Its uses a silabs EFM8BB21F16G (bb2) chip but the QSOP version so its really easy to solder by hand. Also the driver is the fan 7888 again. I like the combination as long as space is not a problem. They are not expensive chips. The two switching regulators I used were the same as in the last post the aoz1282 and the ap3012. (Really its the same parts with a silabs chip tossed in there! Remember to set the vreg at 3.3 though). It uses a more typical ESC layout though with the power input on one end and the motor on the other. Since it was a test board there are pin headers for the C2 connections, input signal and ground. Gerber files and diptrace originals in the zip again.

The...Continue Reading
Posted by AlkaM | Apr 11, 2017 @ 08:02 PM | 4,485 Views
I mean total failure, I plug in wires backward, had countless mosfets blow up in my face, I have vaporized wires , connectors, batteries, pcbs and drivers! I have left scorch marks on my dining room table from things gone awry. I have burnt myself, shocked myself, cut my fingers on props and pretty much failed spectacularly in every single way you can.

When you build circuits failure can be a good thing. My first circuit I built when I was young was from a kit, fm radio I believe.. I followed instructions and it worked , probably good because it got me interested but I didn't learn all that much about electronics. Many years later I decided to make a circuit off of some h-bridge or other from the internet. It seemed very simple.. how hard could it be? It blew up.. not once but multiple times before I learned what I needed to know. I'll never forget the lesson that h-bridge taught me, probably still have scars.

I still do a lot of stupid things.. check out the gallery below for some of my recent blunders.. The point is this.. don't get discouraged by mistakes no matter how much time or effort or money you think you have wasted in doing so. The things you learn from failure far outweigh the things you remember from succeeding.

Here is another speed controller anyway.. this is for more of a tinkerer. I wanted to do something with the FAN7888 as it was relatively cheap. There are a number of different options for the switching regulators and the boards I tried to...Continue Reading
Posted by AlkaM | Apr 10, 2017 @ 05:10 PM | 5,633 Views
A couple more nfet designs. I had a friend who had a hw30a esc die on him. It was a yellow covered knockoff HW/ XXD30A esc. One of the mosfets failed, upon closer inpection there were three different variation of the nikos p0603 mosfets. These were clearly not from the same batch or maybe even the same manufacturer. They still sell these things by the thousands today on ebay ! The other thing they do is use two transistors to switch the top gate, not arranged to increase switching times but it only seems to invert the signal from the atmega8. Something that can be done through software.
Anyway I got to thinking about how I can make a HW30A dpak type design with the following criteria
1) Has to be cheaper than the cheapest ebay esc.
2) Has to handle more current than the xd30a and be more reliable.
3) Must be solderable by hand.
4) Uses minimal component count and repeating values where possible.


In the end I ended up with a couple different designs, one uses all 805 sized parts but is a 4 layer board, the other is a two layer board that was made for a specific enclosure but is quite slim and very long.

The parts list went like this

regulator 1117 5.0v
10k resistors x10
33k resistors x 3
2.2k resistor x 8
100r resistor x 6
Atmega8 processor
LED 805 size
irlr7843 mosfets x 6 (3.3mOhm vs 6.5 for the nikos)
1 uf caps x 3
0.1 uf caps x 2
10 uf cap x 1
10uf tantalum x 1
3 sot-23 transistors 2222a?
470uf rubycon cap

That put...Continue Reading
Posted by AlkaM | Apr 10, 2017 @ 04:10 PM | 5,401 Views
The next few boards are variations of the charge pump, driverless all nfet design.

I really liked the simplicity of this type of esc. I was searching for a mosfet that was cheap to buy and had a good current capability but was still hand solderable. The mosfet that stuck out was the psmn2r4 . This is a 3.3 mm design that still has legs and costs about 30-50 cents to buy. The 2.4 mOhm RdsOn was pretty decent and i have not had one blow up on me yet.

There are two layouts here, one for a two layer board. I have been flying with these ones on my larger quad for over a year.
The smaller of the two is a four layer board, a little harder to do yourself but does shrink the size down to something thats in the realm of possibility for a mini quad. I am using these esc's on two of my quads ( 6 inch and 4 inch ) with up to 4s battery.

They handle damped light and blheli just fine. The firmware for blueseries n-fet 30amp will work.
The schematic is the same as the last board. There are a number of different configurations that I played around with based around that general circuit design. Different mosfets and package options. I will put all of them up here eventually.

All source files and gerbers are included in the zip.

EDIT : BIG thanks to Hiidtubakas for taking my terrible schematics and making some sense of them.. his cleaned up schematic added to the pics.
Posted by AlkaM | Mar 29, 2017 @ 08:46 PM | 4,774 Views
This esc is an all nfet design similar to what you find in the blueseries escs or afro esc's or many others. How this design works is by using a simple charge pump arrangement to drive the gate of the upper nfet. Slow to turn on because the gate has to be turned on through a resistor that also limits the current while the gate is off. Fast to turn off.
Because the gate is in the off state more than on, current is flowing through that resistor most of the time and because of the thermal limits of the resistor.. This will be the limiting factor for this type of esc high side turn on time. Knowing this you can play around with the value depending on the voltage you intend to use. If you only need it to run on 2s then you can lower the value of this resistor and have a higher current to turn the gate on.
This goes for all ESC's using this type of nfet charge pump drive. R29 in this picture below.

The common value chosen is 2200Ohms by most manufacturers, this allows safe running at 16 volts. 16V / 2200 = 0.0072, i^2 * r = P = 0.11 Watts. This is even still slightly over the package 1/10 watt limit for 603 sized but under for 805 sized resistors. There is also a diode drop and the fact that its only conducting 2/3 of the time so its fine. If you only use it for 8 volts then you can lower the resistor. You cant just bypass the resistor out because then you would have a short from V to ground though the diode that charges the cap.

The low side switching time will be...Continue Reading
Posted by AlkaM | Mar 27, 2017 @ 08:43 PM | 5,051 Views
Another budget diy Board, A step up from the 8mhz multiWii. All the files and diptrace originals are included below again.

In keeping with the dirt cheap diy theme, this one uses all 805 sized parts that can be sourced cheaply from ebay. It still uses a i2c gyroscope the mpu-6050 because you can buy them anywhere. If you can't buy a bare chip you can desolder one from a breakout that costs a dollar.

There is a usb port and a ch340g usb chip on the backside. Its an enormous chip but.. hey you can buy a bag of them (literally.. they came in a baggy) for a few dollars. There is also a spot to solder a small memory chip and decoupling caps for blackbox use, I have never tried it. It should work. If anyone actually builds one let me know!

Its not fancy and nothing special, simply an F3 board and can run at 4k/4k that you can build yourself for 5-10 dollars.
Posted by AlkaM | Mar 27, 2017 @ 08:22 PM | 4,929 Views
Here's another flight controller,

I think this is just about the absolute minimum you can fly with. Its the slowest cheapest processor with the fewest number of components running at half the speed on an internal clock , a cheap mpu 6050 breakout sits on top. You can stack a bmp180 and a hcl5883 on top if you want more sensors.
I fly with this on a quad with 10 inch slowfly props and it fly's pretty well considering. There are a few of these flying about.

Here are the gerber files and the 8mhz multiwii sketch for it. I can't remember what I changed to make it run at 8mhz so I included all the files.
Costs between 2-3 dollars to make including the mpu-6050.
There is no point to this flight controller..
Posted by AlkaM | Mar 23, 2017 @ 12:59 PM | 4,820 Views
I wanted to make a flight controller without all the bells and whistles so I could make a bunch of cheapo quads.

I realize that I really don't care about most things flight controllers are offering. I just want something that can thrown together with few parts put into a quad and fly.
There are two versions a 36x36mm board with an integrated PDB and a 27x27 ultra basic board. There is a header on the 27x27 board that takes those cheap ebay modules ( 5883 mag, bmp 180/280 ) if you want to add a sensor or two.
The cost to build these is about the 5-10 dollar mark. They are all a two layer board with 805 sized parts so soldering by hand it easy.

Here are a couple of the boards I am using, I use an ftdi adapter to program them and talk to the fc software. I have a version with a built in usb port but in reality I just don't need to fly around with it all the time. They are the same pinout as a SPracing f3 board. Please don't think that this is a "clone" I simple needed to use a pinout so you don't need to build a custom firmware. His board, I am sure is much better than this.

I will attach gerber files and schematics, also the diptrace files are included in case someone wants to customize or build their own.
BOM to follow if anyone is actually going to build one.

I will try and keep adding home built electronics to this blog. To me, building your own is the only way to go, that is the hobby for me.