Thread Tools
This thread is privately moderated by AlkaM, who may elect to delete unwanted replies.
May 29, 2019, 03:19 PM
Registered User
Thread OP
Discussion

A cheap 32 bit diy ESC, and firmware


Its been a while since I have put out any new hardware. The main reason is writing the firmware was much more time consuming than I first thought. Here is another very simple esc schematic. This would be very similar to the "typical" 32 bit esc using the stm32f051 processor and the fortior fd6288 chip. This one has no current sensing or anything fancy. Just a real basic design.
It is a two layer board.. can be printed cheaply at any pcb fab.
The total cost for the parts is about 5-6 dollars using the nexperia psmn2r4 mosfets. It can handle a decent current.. not sure yet what the limit is but I have used the mosfets for many designs now and they work well for the typical load a 3 or 4 inch quad puts on them anyway.

The firmware to use for the esc current can be found here. ( This is my original rough version).
https://github.com/conuthead/f051bldc

Another version of the firmware done by a talented individual with some good performance improvements and structure clean up can be found here :

https://github.com/3x8/nostromo/releases/tag/v1.2.2
The pinout is a little different but his can more easily support additional targets so should be fairly easy to set up.
(proshot only for this version for now).


There is no configuration tool yet so settings can be changed using dshot commands for rotation direction or 3d mode.

Attached will be a zip file, there are gerbers and driptrace design files inside that can be opened with the freeware version of diptrace. I have a few more simple designs coming as they get tested. I have been using this one for a little while and have a few test flights on a 4 inch quad with 1806 motors.

early testing of the esc and firmware..
2 layer ESC test flight (0 min 58 sec)

and some reversing testing.
Reversing in 3d mode. 1806 motor 5 inch prop. (0 min 36 sec)
Last edited by AlkaM; Jul 20, 2019 at 11:57 AM.
Sign up now
to remove ads between posts
Jun 01, 2019, 10:26 AM
Registered User
I would love to have this as a 4 in 1 ESC on my 3D quads. Amazing motor reversing performance.
Jun 01, 2019, 04:29 PM
Registered User
Thread OP
Quote:
Originally Posted by Markus Gritsch
I would love to have this as a 4 in 1 ESC on my 3D quads. Amazing motor reversing performance.
Thanks, It's a work in progress, some motors are better than others right now. I wish I could fly like you to actually try it out. I have never flown 3d but i use the same firmware in crawler where a smooth reversing is important too,.it works really well for inrunner motors.
Tenshock 906, 1250kv 6 pole sensorless inrunner (1 min 41 sec)
Jun 21, 2019, 04:38 PM
Registered User
Thank you, this project is very interesting.

The firmware support Dshot 1200 or only up to Dshot 600?
Jun 21, 2019, 07:33 PM
Registered User
Thread OP
Dshot 1200 , 600 or proshot 1000. Or regular servo pwm.
Jun 22, 2019, 02:07 PM
Registered User
Thank you, I'm using Dshot600 now and works well to me.


Could I work in the Configurator for Desktop and Android?

Video


The name is just an example. Is JavaFX (multiplatform) and easy to migrate to Android. I use MVC pattern. Not use FXML to the GUI, all is Java code (Gradle project). Is multilanguage, by the moment only English and Spanish.

Best regards
Jun 23, 2019, 09:09 PM
Registered User
Thread OP
That looks really nice hexagonrc! Are you using serial to communicate with the ESC?
I would like to see more of your project , do you intend to make it open source?
Jun 24, 2019, 11:57 AM
Registered User
Hello,

I'm glad you like it.

Serial comunnication with several baut rates is possible. The "complicated" thing here is wrap the C code to Java.

We can use Swig or JNI for it.

Yes, it be can open-source. For example Apache v2 if enough permissive and compatible with other Apache v2 projects (JavaFX, Android, etc)

If you send me a email account I can add you to the repository and test it.

Development tools are Eclipse and Java Development Kit.

Regards
Last edited by hexagonrc; Jun 24, 2019 at 12:43 PM.
Jun 26, 2019, 01:25 PM
Registered User
Hello,

I added to you to the repository.

I made a simple demo of the gauge for the motors, simple idea.

Video

I'm using JSerialComm library, are this the Modes of Operation availables.
Jun 27, 2019, 01:37 PM
Registered User
Thread OP
Nice! I like the graphic, that could be rpm feedback from the motor. I really don't know enough about serial coms to be of much help yet. Thanks for the repo, I will look into it. Can you get your esc configurator to work with a flight controller serial passthrough? I am not sure exactly how the serial is configured for that to work.
Jun 27, 2019, 02:35 PM
Registered User
I have used the non-blocking mode with a FTDI chip and works fine. I have that works more in the connection view but works.

In the future is possible to use the event-driven callback mode in order to auto-connect but by the moment is enough.

Yes the gauges are very cool and they can server to feedback yes, this app is a fork of other that I'm woking years ago for a FC but I'm going very slow, very much thing to do.


Can you get your esc configurator to work with a flight controller serial passthrough? I am not sure exactly how the serial is configured for that to work.

I think so. I'm not an expert either, but as soon as the view is over and the application can detect the available ports and can be selected, I'll do more tests with serial communication.
Last edited by hexagonrc; Jun 27, 2019 at 03:15 PM.
Jun 27, 2019, 04:10 PM
Registered User
I think that the communication that is used to configure the ESCs is half-duplex 1-wire with open-drain. As smartaudio.
Last edited by hexagonrc; Jun 27, 2019 at 04:50 PM.
Jun 30, 2019, 03:58 AM
Registered User
Hello,

The serial communication is working.


I read this from my rf meter with OpenESC, also I can connect with others devices. By the moment the process is automatic, is not necessary to set port and baut rate, but I have added a checkbox for change to manual mode. (not implemented yet).

Code:
return: $-�3.9  dBm 000  uVpp$$-15.5  dBm 106  mVpp$$-15.5  dBm 106  mVpp$$-15.5  dBm 106  mVpp$$-15.7  dBm 103  mVpp$$-15.5  dBm 106  mVpp$$-15.5  dBm 106  mVpp$$-15.5  dBm 106  mVpp$$-15.6  dBm 104  mVpp$$-15.5  dBm 106  mVpp$$-15.5  dBm 106  mVpp$$-15.5  dBm 106  mVpp$$-15.6  dBm 104  mVpp$$-15.6  dBm 104  mVpp$$-15.6  dBm 104  mVpp$$-15.6  dBm 104  mVpp$$-15.7  dBm 103  mVpp$$-15.7  dBm 103  mVpp$$-15.6  dBm 104  mVpp$$-15.7  dBm 103  mVpp$$-15.7  dBm 103  mVpp$$-15.7  dBm 103  mVpp$$-15.7  dBm 103  mVpp$$-15.6  dBm 104  mVpp$$-15.6  dBm 104  mVpp$$-15.6  dBm 104  mVpp$$-15.8  dBm 102  mVpp$$-15.7  dBm 103  mVpp$$-15.7  dBm 103  mVpp$$-15.7  dBm 103  mVpp$$-15.9  dBm 101  mVpp$$-15.8  dBm 102  mVpp$$-15.8  dBm 102  mVpp$$-15.5  dBm 106  mVpp$$-15.5  dBm 106  mVpp$$-15.5  dBm 106  mVpp$$-15.6  dBm 104  mVpp$$-15.7  dBm 103  mVpp$$-15.9  dBm 101  mVpp$$-15.8  dBm 102  mVpp$$-15.9  dBm 101  mVpp$$-15.8  dBm 102  mVpp$$-15.7  dBm 103  mVpp$$-16.0  dBm 100  mVpp$$-15.9  dBm 101  mVpp$$-15.4  dBm 107  mVpp$$-15.5  dBm 106  mVpp$$-15.6  dBm 104  mVpp$$-15.5  dBm 106  mVpp$$-15.5  dBm 106  mVpp$$-15.5  dBm 106  mVpp$$-15.6  dBm 104  mVpp$
Video

I have not the chip that you use, I use NXP, I'm going to write some code to try with a kinetis m0+ and the LPC Linker v2 in order to flash, read/write some code.

Regards
Last edited by hexagonrc; Jun 30, 2019 at 04:13 AM.
Jun 30, 2019, 05:38 AM
Test Pilot
teracis's Avatar
I've been following this as you post links in the Betaflight slack and when I remember to check on YouTube. I'm super keen to get this level of performance in a small 4 in 1 (around the size of the tinypepper (16*16 mounts, 20*20 board) or even the next size up (20*20 mounts 25*25 board).
I know that would take a LOT more work, but it seems you've got the design and code working a treat!

I should just get the parts and build some up for a 5" rig with individual esc's on the arms or something. Though currently the time and motivation are lacking severely for projects.

I'll keep watching intently, when work calms down a bit I might find some motivation!
Jun 30, 2019, 07:59 AM
Registered User
Thread OP
Time is the biggest problem for me. Every step is painfully slow for me and my rate of ideas vastly outstrips my rate of learning how to implement them. I am a full time farmer so winters are the only time I can do any real work on the ESC's.

The configurator that hexagonrc is working on is really a big step. I am going to work on serial interface on the esc side an hopefully we can connect the two. That really the last piece of the puzzle to make it more useful.

Just the fact that a project like this exists keeps closed source devs on their toes and improves the tech for everyone.


Quick Reply
Message:
Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Whoops! AGF rc 32 Bit ESC & super narrow ESC Camille.Zhang Product Announcements 0 Dec 29, 2017 01:32 AM
New Product Vgoodrc ARM 32-bit ESC Vgoodrc Multirotor Drone Electronics 31 Aug 21, 2016 10:03 AM
New Product Kiss 32 bit Flight Controller and ESC's fpvdirect FPV Equipment 0 Jul 04, 2016 06:27 PM
Discussion RTF 32 bit ARM ESC akcom Multirotor Drone Electronics 5 Feb 25, 2016 11:27 PM