Finished I²C to PWM converter and TriGUIDE mini

The last nights were a bit shorter for me, since the PCBs I ordered at bilex-lp.com arrived. They look really good and seem to be of high quality (I ordered a different "solder resist" colour, well, I like bright colors, but anyway... ).
So I had the opportunity to do my very first SMD solderings. This really seems to be comfortable... I will completely switch to SMD I think.
The I²C to PWM converters work! Here are the features:
  • Weight under 1 g
  • Works with (most likely many) standard ESCs (currently tested: HK SS 18-20A, ...)
  • I²C address selectable via solder jumpers (4 standard mikrokopter addresses dec 82, 84, 86, 88)
  • Refresh rate selectable via solder jumpers (417 Hz, 292 Hz, 155 Hz, 49 Hz)
  • Pulse width (I²C 0-255): 990µS - 2010µS
  • Pulse width at startup (3 s): 920µS
  • Motor off when no I²C connection longer than 256ms
  • Motor off when microcontroller crashes (veeeery unlikely)
  • Powered by the BEC of the ESC, or by an external 5V source (prepared as well)
  • Very easy to connect: plug the servo cable of your ESC to the converter, connect the converter to your TriGUIDE via a two-wired I²C cable
  • Does also support standard servos

I could test the converters today together with three unmodified Hobbyking SuperSimple 18-20A ESCs (@Dave: thank you very much!!) in flight. These ESCs work with 417Hz (probably like many other ESCs). I couldn't notice any difference in stability or noise or anything compared to my modified I²C-ESCs ("Quax" firmware) or compared to the "Holger-Regler" with my tricopter. Different refresh rates were also tried. 292Hz doesn't feel different to 417Hz; 155Hz is a bit more nervous when flying in the ground effect and doesn't "lock" that well when releasing the sticks after a fast manoeuvre. 50Hz isn't possible without changing the settings of the tricopter. The gain of the gyros has to be decreased about 50%. After adjustment, flying around is possible without problems. But the reactions are generally less precise.

Eagle schematics & layout, source code are available here:
I²C->PWM converter files (updated with jumper description)
Edit:
I could successfully test the following ESCs on the ground with 417Hz:
Turnigy Plush - 60A, Turnigy Plush - 40A, Turnigy Plush - 25A, Turnigy Plush - 10A, Turnigy Plush - 6A

Second news: My SMD version of the TriGUIDE is finished. I could also test it and it works (phew...!). I added the Eagle files to the existing Eagle zip archive. The software doesn't have to be modified. Weight is 13g.



Comments

  1. Good job william!!
    Could you tell me how to select I²C address via solder jumpers and Refresh rate via solder jumpers?
    and to use this converter motor hex address changed from 52,54,56 to 82,84,86?

    ReplyDelete
  2. Hi,
    hex 52,54,56 is equal to 82 84 86 dec. I will write a short tutorial soon.

    ReplyDelete
  3. Wery good job !!
    Gibon
    www.gibonok.altervista.org

    ReplyDelete
  4. Very good job !
    Your comparison between I²C ESC and PWM ESC at different frequencies is very interesting and precious.
    Do you think it could be a good argument to replace the two I²C wires by three PWM outputs in a cost reduction purpose ?

    ReplyDelete
  5. Hi William,
    too happy that it works...!!!!
    lively the microtricopter ;)
    the triguide can also work the 4s as other version ?
    amicably

    Eric

    ReplyDelete
  6. @Alex: I don't get you last question....
    @Eric: 4s will probably work, but the voltage regulators might get pretty warm.

    ReplyDelete
  7. If you want tu use classic and low cost PWM ESC with your TriGUIDE, you need currently tu use 3 of your converter module.
    My question is: instead of output I²C SDA and SCL from your TriGUIDE, is there a way to output directly the 3 PWM signals to the ESC ?

    ReplyDelete
  8. Yes there are possibilities, but I want to be able to use both I²C and PWM. Additionally, the PWM signals that I generate with the arduino are not 100% jitter free. So the converters are a better choice from my point of view.

    ReplyDelete
  9. your forgot to post your code in the zip, or at least i can't find it

    ReplyDelete
  10. It is in the zip: i2C_converter_4.hex

    ReplyDelete
  11. the code, not firmware. or are you not going to release code for this I2C to PWM?

    ReplyDelete
  12. I don't know yet. Maybe I'll release the source code later.

    ReplyDelete
  13. Hi William.
    Wished to ask what fuze it is necessary to put for ATMega 8 on the converter,I ² C the Address a choice with the help of the soldering of crosspieces to or after programming? thanks for the help.
    Yours faithfully Ruslan.

    ReplyDelete
  14. Could you post more details about how to program the ATMega 8 on the I2C converter? I have a fair amount of electronics experience but am new to microcontrollers. Your instructions for the triguide are excellent but I can't figure out what hardware/software I will need to program the I2C converter.

    ReplyDelete
  15. Hi mclarin89, telling you how to program a µC is beyond the focus of my work. You can order converters from me, making them is less work than explaining how to program a µC.
    You could nevertheless try googling "ISP mega8".

    ReplyDelete
  16. I am planning on modifying the triguide board layout to include 3 converters thus consolidating everything but the escs and IMU onto 1 board. I also hope to learn the basics of atmel µC programing with this project. I have found a lot of information about the UART interface the arduino pro mini uses on google but have been less successful finding info on the ATmega8. Searching for mega8 vs ATmega8 has helped.

    ReplyDelete
  17. Hi William,

    First of all, you have done a great job.
    I could understand that you only give us the hex – file and not the source code. But is it possible to make a second hex – file for address motor 5 to 8. So we are able to build an octo – copter with i2c->pwm.

    by

    ReplyDelete
  18. Hi, yes that is possible, I am on holidays right now, so someone please remind me in one week. I still didn't hear of anyone testing my converters with a mikrokopter or a multicopter other than the Shrediquette.

    ReplyDelete
  19. Hi William,

    This is the reminder!
    I hope our holiday’s where OK.

    By

    ReplyDelete
  20. Hi!
    I just wanted to make a new firmware, but then I noticed that I don't know what I²C addresses are usually used for ESCs 5-8. If someone tells me the addresses, I will upload an additional firmware. I searched with google for the addersses, but I couldn't find anything.

    ReplyDelete
  21. Hi William,

    Thanx for great work!
    Is it possible to get a hex file compiled for the atmega88 instead of the old atmega8? (or the source code)

    ReplyDelete
  22. Hi William! My name is Sandro. Great job here, man! But there is a point wich I don't understand. You have high frequency in the output from Arduino to Converter, by I2C. Until here, OK. But does the comunication with ESC occurs at the standard PWM frequency? Or... do you force the ESC to accept a high frequency PWM? Have you tested with TowerPro 25A type2? I will have a lot of difficulties to convert my ESC... Your solution seems to be much more elegant.

    ReplyDelete
  23. Hi Sandro,
    I don't know the frequency of my I²C (5kHz...?). But I calculate new control signals from the sensors with 500Hz and send them out instantly via I²C. My converters read the I²C signals and instantly forward them with a user-selectable frequency (49Hz - 417Hz). Most standard ESCs with a Mega8 controller inside (= all ESCs that I ever had in my hands) do accept and forward 417Hz PWM.

    ReplyDelete
  24. Thanks for the response, Willian! Now I understand the trick. Very, very, veeeery elegant alternative in apposite to the "spaghetti" conversion. I don't have ability to do that kind of soldering with a lot of tinny wires inside the ESC. (it without mention the cutting points, epoxy stuff and other freaking supernatural ninja implementation... it's not for my limited skills).

    ReplyDelete
  25. William, If I want to build an octocopter can you provide an extra hex file to give me the 4 extra addresses?

    Peter

    ReplyDelete
  26. Hi Peter, I already wrote this 5 posts ago:
    If you tell me the adresses of motors 5-8, I can of course modify the source sode... Otherwise it won't work.

    ReplyDelete
  27. William, how you configured the Atmega8 fuses?

    Is this setup correct?

    Low: 0xD4
    High: 0x99
    Lock: 0xFF

    Sandro

    ReplyDelete
  28. Hi Sandro, I don't know how the fuses are called. In Bascom you can set the µC to run at 8MHz and disable the "divide by 8" fuse.

    ReplyDelete
  29. William,

    The response I received on the MK forum to the I2C address question was as follows:
    The address is 40 (decimal) + the number of the motor you want to talk to. They start from 1.

    The number write to TWDR is: (Address*2) + rw

    where rw is 0 for a write, 1 for read.

    So to write to motor 1:
    TWDR <-- ((40+1)*2) + 0 = 82 = 52 hex

    So to write to motor 5:
    TWDR <-- ((40+5)*2) + 0 = 90 = 5A hex


    etc. Motors 5-12 are no special cases; they just follow 1-4.

    Some developers call the number written to TWDR the address, and they say "the address is 82" etc. It's not quite correct.

    regards Peter

    ReplyDelete
  30. William, vous êtes un genie.
    Vive la shrediquette !
    Hervé

    ReplyDelete
  31. No luck here! As far as I can see the "devide by 8" Fuse should not even show up using an Atmega8-16_AU. http://www.engbedded.com/fusecalc
    Is there any more Info on this?
    Regards
    Philipp

    ReplyDelete
  32. @Philipp: I can't check this at the moment, the goal is to have the mega8 running @8MHz. It doesn't matter where you get this frequency from.

    ReplyDelete
  33. Dear sir,
    I want to try to make your i2C-2-PWM design, but the PCD maker company only able to read Protel or OrCAD PCB file. Can you tell me how convert the .brd file into .pcb/else? so then we can open the file by OrCAD or Protel DXP.
    Thank you so much

    ReplyDelete
  34. @Agie: I have no idea how to convert the files... Maybe you should change the PCBmaker company, at least in Europe Eagle is very popular.

    ReplyDelete
  35. Hi
    I want to build oktokopter (mikrokopter)
    I need a converter, I2C-PWM for the motors No. 5,6,7,8.
    Can I count on the software for the engines number 5,6,7,8?

    ReplyDelete
  36. Hello,
    I added a modified oktokopter version to the zip archive. I was told that it should work up to firmware mikrokopter 0.78

    ReplyDelete
  37. hi..
    I try okto_mambomiko version in mikrokopter (firmware 0.78).
    In mikrokopter tools, bl-ctrl address found, then i test motor in mikrokopter tools software
    and motor running smoothly .. i am very happy!!!
    But when command by tx stick, motor is glitch...help me please...

    Regards,
    Fredrick

    ReplyDelete
  38. Hallo ,
    wo bekomme ich Platinen für den i2c converter ?
    oder gibt es einen schaltplan . . .?
    M.f.G
    Thomas

    ReplyDelete
  39. hallo, den schaltplan/ layout gibts rechts oben, so wie alles hier.

    ReplyDelete
  40. Hallo,
    Danke für die Antwort , hab es übersehen . . .
    kann ich die Platinen irgendwo kaufen ? Da ich einen Octo bauen will ist mir das ein bischen mühsam alle 8 auf Lochraster aufzubauen und selber ätzen kann ich nicht . . .bin halt mehr der Schrauber-Typ. . .
    Mit freundlichen Grüssen
    Thomas

    ReplyDelete
  41. Ich habe manchmal Platinen da, im Moment aber leider nicht... Irgendwo findet sich bestimmt jemand der das für dich ätzt.

    ReplyDelete
  42. Kriegt man das nicht durch Änderungen an der Software hin, einen 4-fach oder 8-fach i2c->ppm konverter zu bauen? dann bräuchte man sich so viele platinen dadrin... Irgendwo kann man sowas auch kaufen, es geht also...

    ReplyDelete
  43. Hi,
    klar kann man das machen. Müsste halt mal jemand machen der das benötigt.

    ReplyDelete
  44. Bonjour William

    J'ai une petite question sur la programmation des ESC 6plush de HB.

    Tu parle dans ton fichier i2C qu' il faut réglé le Min-max du Throll . Le reste des réglages je le fait avec la carte.

    Tu peut explique comment tu fais exactement???

    J ai fait un Quad MM4 et un moteur sur les 3 autre ce mais en route, pour faire fonctionner les autres je dois mettre assez bien de throll.



    Merci Vincent.be

    ReplyDelete
  45. Salut William

    Ok, pour le réglages c est trouve et simple a faire.
    Il me reste un petit souci les moteur tourne même quand le interrupteur est sur off.
    c est peut être du au niveau des réglages des ESC???

    merci Vincent

    ReplyDelete
  46. Hallo William,

    Du schreibst di Regler werden mit 417Hz angesteuert.
    Woher kommt dieser "krumme" Wert?

    Danke Christoph

    ReplyDelete
  47. Gleiches Problem wie Fredrick:
    beim Motortest über MKikrokoptertool läuft der Motor ohne probleme u. lässt sich regeln.
    Auch geht der Motor an, wenn der MK schraeg gehalten wird. Nur sobald ich versuche über die Fernbedienung Gas zu steuern passiert nahezu nichts.
    Hier nochmal Fredricks Eintrag:
    Für Hilfe wäre ich dankbar.
    mfg
    Christoph
    chroters@googlemail.com


    hi..
    I try okto_mambomiko version in mikrokopter (firmware 0.78).
    In mikrokopter tools, bl-ctrl address found, then i test motor in mikrokopter tools software
    and motor running smoothly .. i am very happy!!!
    But when command by tx stick, motor is glitch...help me please...

    Regards,
    Fredrick

    ReplyDelete
  48. @Vincent: you will have to teach in min and max throttle to the ESCs again. I think that your servo throw was too high while you were teaching in min and max throttle.

    @Christoph: Der krumme Wert ist eine Art mittelwert der Ansteuerfrequenz. Ich mache nach jedem 1-2ms high pulse eine fest definierte Pause mit low pulse. Daher hängt die Frequenz von der Drehzahl des Motors ab.

    @Christoph2 & Fredrick:
    I don't have a MK, so I can't help. But there are people that successfully fly a MK with my converters. Please google for "mabomiko", and you'll find a user that also made some changes to the I²C converter firmware.

    ReplyDelete
  49. Hallo William,

    hast Du von den I2C Konverterplatinen noch welche aus Lager?

    Grüße
    Thomas
    thomaswuerfl at gmx punkt de

    ReplyDelete
  50. Where can I buy i2c to pwm converter?

    ReplyDelete
  51. At the moment I have some PCBs at home, so you could get some from me. Just write an email to w_._t_h@gmx.de (remove all underscores from email address!)

    ReplyDelete
  52. Hello, this question may be misplaced, but you can let me know if I instead of converting esc to pwm, can use the mystery pwm frequenci rate 8khz/16khz?
    thanks ...

    ReplyDelete
  53. Hi,

    Your hexacopter is fascinating & your video in Kameron is really mind blowing. Thanks for sharing this.

    Can you provide a build tutorial for MM6?

    Thanks Again

    AP Kihla

    ReplyDelete
  54. Hello William,
    congratulations on your beautiful drones, I would like to build your tricopter, but I can not find the ADXL322 and ADXRS610.

    Can you give me an alternative or where you buy them?

    You can buy from you shield for triguide mini and PWM converter?

    waiting for your answer, thank you very much.

    Manuel Gatti
    manuel.80@hotmail.it

    ReplyDelete
    Replies
    1. Hi Manuel,
      the accelerometers and the gyroscopes do not seem to be available anymore. I am using a new PCB that is equipped with the MPU60X0 and an atXmega (see my post on the imav2012). The source code and the layout / schematics are still open source, but I was not in the mood to write a tutorial for them. You should have a look at the MultiWII project, that seems to be working great, and it is well documented.

      Delete
  55. William thanks for the quick reply.
    I hope you have the strength to write a new tutorial ..
    I will continue to visit your blog for inspiration.
    BestRegars
    Manuel

    ReplyDelete
  56. hi william,
    thats some superb information on your site .. gerat work ..thank you for that ..
    is this he design that the abusemark site sells ?? or has it been derived from your design ??

    SH

    ReplyDelete

Post a Comment

Popular posts from this blog

My 15 inch long-range setup for 2020 (with CAD files)

Part 1/3: Side Force Generators (SFGs) in FPV Racing

Part 2/3: Side force generators - Forces and turning

Aerodynamics in racing multirotors!