Let's Make Robots!

noob seraching for best microcontroller

simply put i'm trying to figure out witch microcontroller would be best for my purposes. the things i need are 3 pwm pins, 2 normal io pins, as well as what ever else i need pin-wise to controll a nrf24l01+ transceiver

i'm also trying to keep this as light as posible, as its gonna be the rx side of a tiny rc airplane, just under 6in wingspan p-38 lightning . i figure one pwm for the pager motors, and one each for the aleron coils and the two normal pins for current direction, though if needed i could use a spring and the coils to skip the other two pins.

i'm currently thinking an attiny would be a good one to use, but idk witch of them. any help picking one is greatly apreciated.

also any info on how to properly wire the coils/motors would be helpful, as most of the time i see comparitvly huge motor controllers, or just a direct motor to board connections.

P-38_Scale_Drawing.pdf2.3 MB

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Sounds like it might be a job for DFrobot's "Beetle". Lumi posted about it recently here: http://letsmakerobots.com/node/39059

This is about as small and light as you will get and has the USB interface built in.


will kinda nix the use of this board in the proposed situation.


it should have enough range, as its an indoor flyer size plane. i was looking at the arduino ones, but most all of them seem too big, ( even the mini and micro ) the micro might fit but it would take up all of the room in the body of the plane (as is part of nrf will be sticking out unless i scale it up some) . if u print out the file i just attached so it fits on a normal letter size page, thats how big it will be. the motors and aleron controlls would all be in each of the side parts. posibly also the batterys if needed. atm, no exp at all, though i do have plenty of coding exp as well as a currently unopened c-series launchpad i got when the $20 off code was leaked and useable by anyone.



not sure how much it would take, just getting enough current that it will move a magnet thats 2-3mm away from it. the coils themselves i was just gonna wind some salvaged copper wire from a hard drive.how would you wire it up as a h-bridge though?



the library shouldnt be too much of a problem. figure i'll write out what i need then check the librry source and cut anything that wont be used or called/refrenced from used functions. all it will be doing is listening to the nrf for 24bits of info 0-255 for each of the 3 controlls. the pitch/roll will all be calculated transmitter side. not too sure about pin-out, but it looks like it will work w/o any conflicts. will have to use bdk6's h-bridge idea as it would only leave 2 pwm's open.

Well, here is something to get you started on adapting the library. And, of course, once you've adapted the library please share :)  I toyed with the idea, but the NRF24L01 is an amazing chip and deserves a programmer with greater skills than myself.

Also, excellent choice on planes.  The Lighting was simply a power-house of its time.  I still remember reading stories of a WWII pilot recounting how he'd fly through an enemy hot-spot with one engine disabled, looking like an easy kill.  Then, when someone had him 5-by-5, he would switch the engine back on, perform a sharp inverted loop, and end neatly in traded position. It's the neat maneuver we see in movies but the Lighting had the horsepower and aerodynamics to make it lethal.  I'm a Lighting fan.

One more bit, if I may, listen to these guys here; most (unlike me) are professionals.  But more than that, they are experienced in combining the big three: mechanics, electronics, and programming.  I personally like reinventing the wheel.  And I have lots of wheel marks on my face to attest to it.  Still, I'm learning to get something a professional designed first then make my own.  That way I can troubleshoot if it is my product or how my product fits into the whole design.  Also, you know if the components you plan to re-create will have your desired effect (e.g., the range of the NRF24L01)  On that same note, I've learned to reinvent the wheel, not reinvent the whole car at once :)

ok, for first run i'll probably take a hack-saw approach, but it sounds like re-arranging/writing it in a more module based setup would help. i'll throw it on github when i start on that part of it.

i've always liked the planes that you can tell what it is w/o a ton of avation history, 2 fav are the lightning and spruce goose.

ok, i'll try not to reinvent too many wheels, but for some reason i've always liked taking the long way around things. this entire build for instance could be done with an off the shelf submicro 3 channel rc receiver, but it just feels too much like cheating doing it that way.


I don't know if you are still interested in adapting the NRF to work on an ATtiny.  If you are and would like to collaborate, let me know.  I have a need that requires it and I will probably start work on it in the next several months.

Oh, and I found this article: ATtiny 84 on the NRF24L01

He refers to a github with an existing library for the ATtiny, but even with the library, it looks like it'll probably take some fiddling to get it to work. Also, even shrunk, the library takes ~5k, leaving only 3k for a sketch.  My goal is to create a walkthrough and then an all-in-one PCB which will include an NRF24L01 plug with an ATtiny 84 broken out.  Maybe a charge circuit.

Anyway, if you're interested, my Skype is: thomas_ladvien

Is the NRF going to have enough range to be useful for anything going fast enough to achieve airfoil based flight? Lad is perfectly correct that An ATTiny 44/84 fits your specs. It might be easier and more reliable to go with an Arduino mini/micro USB or even a Lilly pad. You'd get the 16 MHz clock without sacrificing two tiny pins and the reliability of mass produced picked and placed manufacturing. You could also look at a PIC solution. In the PicAxe range, a 14/18m2 would both handle your requirements. What previous experience do you have with μ controllers?
My vote is on the Attiny 84. It has 11 usable pins and you state you'll need 10 (the 5 you need and 5 for Nrf24l01;3 for SPI, 1 for CE, 1 for CSN). The two problems would be (1) make sure there are no pin conflicts and (2) getting a working NRF24 library on 8k flash. But the nice thing is it's cheap and requires no passive components. For reference: http://www.ledsandchips.com/upload/cards/attiny.jpg