UAV Drone out of a BBBW

OK, did short video on the hardware integration of a GPS module called a NEO6M with my BBBW. I’m trying to document this while doing it, I do apologize for the poor quality of the video. I WILL get better as I practice documenting my project,

Documenting is more important than just getting hits on your YouTube channel, but a necessary way of reminding you if your circuit design takes off (a funny pun when doing a drone) that you can properly Gerber/Eagle it so you can rush it to mass production (well small to medium sized runs) if you get a winner. So whip out the ole tablet, kindle or smart phone and use YouTube’s nifty free service.

https://www.youtube.com/watch?v=k3ok1Ya42TE

I really have to get better at taking videos. I really do apologize.

OK, let’s talk about how you guys are going to make your first million with the BBB. Yes, I’m shameless; but isn’t that really what all of us are doing here, trying to make the “big bucks” as they are known.

Lots of things you can do with a BBB. For example, you can set it up with a 2-relay cape epoxy it to the inside of a standard house electrical outlet or switch and start your own home automation company. Throw on a cheap CMOS web cam and push the video over the Wifi to add security to the system, and you are off to becoming rich. Internet of Things.

Yes it would be the most expensive automation on the market, but you could do it. Feed a switch signal through on of the GPIO’s and you have a remote wireless switch that can control something.

How you do this is simple. You start off with an idea that you know is going to work. Then you sketch it out and work out a rough schematic so you can go through the breadboarding and PCB construction phase. This will give you a great working prototype that you can take directly to a PCB maker, case designer, injection molder, engineering firm, distributor and make some cabbage for your great new idea.

One of the great things about PIC’s is that they are only about $1 - $2 for about a VIC 20’s worth of computing power on them. You can actually take your simplified working prototype right to production if you want to (as the cost isn’t that much different). So feel free to work a lot with PIC’s instead of finicky analog discretes.

So you get your board together and it works great. If you are a hobbyist this is usually where you stop but you can go on if you think you have a winner. For example, you could Gerber/Eagle (and if you don’t want to learn this you can go to Fiver/Elance/Guru and have someone do it for you for about $50-$200 and get them to talk to the PCB manufacturers for you if you can) it and get like a few hundred boards that you blow out the back door to your buddies that does X well. You can even have them populate it and solder it up.

Get a tiny ad in Popular Mechanics, the local newspaper, niche web sites, or just go and troll related web sites just yelling at the top of your lungs you have a UART-to-MOSFET ESC that always works and if you want the board you can send $5 to wherever. Chances are you’ll get thrown out after a while but you will have sold 10 boards for $2.50 profit and forwarded the art…OF GUERRILLA MARKETING!!! lol jk…I meant Beagleboard development.

Think about that $25 in your hot little hands. Hardest $25 you ever made but the adventure of it is priceless for a lifetime. Non-opt-in newsletters to some random email list you scraped from the local Chamber of Commerce, sent by trickle CRON-based niche emails complete with MIME. Midnight calls on your obamaphone with leftover minutes to potential customers. Running through dangerous neighborhoods with photocopied flyers telling people about how good your Internet of Things device is. (laughin my ass off right now).

Life is to be lived. And if you are running though a sky scraper with your fliers, start at the top so when security stops you you can continue to drop you fliers as you are leaving the building. Just tell them I sent you…NOT!

And get swag. Get a bunch of cheap printed pens done up and as you are talking up your new device, slip some of your pens in their cup. Throw cheap thin T-Shirts with your board stenciled on the front (because you couldn’t afford to print the back).

Yes, I’m joking but if you want to be competitive with your BBB you HAVE TO THINK OUTSIDE THE BOX. lmao.

Back. Bad party at my place but drones don’t build themselves. Again usual disclaimer, I’m not saying if this thing will actually work at this point (the suspense is killing me).

But what we do up is a “Bill of Materials”. You will leave your nervousness about this behind you and understand what a BOM is. Its just a list. How I do mine is with paper catalog that I keep next to my toilet because I’m a dyed-in-the-wool nerd and love to study up on relay current ratings while doing my business. Unfortunately, those tree-huggers (I eat granola myself btw) down at DIgikey don’t print catalogs anymore, so we gotta use the online version.

You just write down the part numbers and then transcribe to your spreadsheet, a la here. OK I guess I attached it to this message this time. And don’t be asking what extension it is. I will have you all know that Larry Ellison is all our buddy and a fine, fine man, and you should use OpenOffice (or Libre or whatever they call it). OK, ok, I guess Excel will open it.

Notice the part numbers (so you can just pump it into mouser’s or digikey’s e-commerce system right quick), a quick description and the almighty price (it is the Great Recession, most of us aren’t made of money, I know I’m not) complete with quantities. I also decided to do my restock and just added the resistor values I needed for my current project.

Always remember periodic backups.

drone_bill_of_materials1.ods (14.1 KB)

A word from the leader of our faith.

Linus Torvalds believes the technology industry’s celebration of innovation is smug, self-congratulatory, and self-serving. From a report on The Register:

The term of art he used was more blunt: “The innovation the industry talks about so much is bullshit,” he said. “Anybody can innovate. Don’t do this big ‘think different’… screw that. It’s meaningless. Ninety-nine per cent of it is get the work done.” In a deferential interview at the Open Source Leadership Summit in California on Wednesday, conducted by Jim Zemlin, executive director of the Linux Foundation, Torvalds discussed how he has managed the development of the Linux kernel and his attitude toward work. “All that hype is not where the real work is,” said Torvalds. “The real work is in the details.” Torvalds said he subscribes to the view that successful projects are 99 per cent perspiration, and one per cent innovation.

Check it.

Here’s my drone now. The original design was a bit bulkey and the motors were smaller than I thought. Made out of bassword with 1/2" dowel so light as heck (its weight is mostly motor and battery, so I know it flies).This is what I call the “power section”, in other words the drone itself. I have a “hardware section” that is the electronics (including my BBBW) and a “software section” (I keep driving the solution to software…my forte) where I’m going to use GCC to do the necessary I2C and UART reads/writes. Then I can finally do what I’ve been wanting to do: have the hardware for some deep programming about drone guidance and mathematical models, complete with full TCP-IP stack support and a PC’s worth of power).

Just got back from Raspberry Pi. A bunch of colonists daughters needed to be rescued from there…

But anyways, cool crew over there. Answered some questions but I think that this education of the younger generation thingy is going well. Nice to be back though. Will be working on the drone again here soon.

You all realize that I have completed my drone in record time (though I don’t appreciate the cracks about how I got the idea from my coffee table lmao). I still need to get it flying though. My parts from Mouser should be coming in soon.

OK, here is what some of the code looks like. Its probably pretty different than a lot of the drone code out there. A lot of it reflects the math and approaches that I used in designing my suborbitals.

#include <stdio.h>

//force-moment-mass model
struct fmm_type
{
double t1a,t1b; //motor pod 1 - in Newtons (at 100% dc)
double t1x,t1y,t1z; //in meters
double t2a,t2b; //motor pod 2 - in N (at 100% dc)
double t2x,t2y,t2z; //in m
double t3a,t3b; //motor pod 3 - in N (at 100% dc)
double t3x,t3y,t3z; //in m
double t4a,t4b; //motor pod 4 - in N (at 100% dc)
double t4x,t4y,t4z; // in m
double weight; //in kg
double cgx,cgy,cgz; // in m - origin is (0,0,0)
double ip,iy,ir; //moments of inertia around CG
} fmm;

//current ESC values
struct esc_type
{
double dutycycle; //percentage (0.00<=x<=1.00) of full duty cycle
} esc[8];

//general globals
double batt_voltage=1.26.0; //voltage output of battery pack - in volts
double batt_current=0.00; //maximum current of battery pack - in amps
double batt_energy=2.5
6.0; //total energy of charged battery pack - in amp*hours

double cur_batt_energy=0.00; //current energy left in battery pack - in amp*hours

int done=0; //main loop flag

initialize_fmm()
{
//load the model data

//motor pod 1
fmm.t1a=0.00; //in newtons
fmm.t1b=0.00; //in N
fmm.t1x = 0.00; //in meters
fmm.t1y = 0.00; //in m
fmm.t1z = 0.00; //in m

//motor pod 2
fmm.t2a=0.00; //in newtons
fmm.t2b=0.00; //in N
fmm.t2x = 0.00; //in meters
fmm.t2y = 0.00; //in m
fmm.t2z = 0.00; //in m

//motor pod 3
fmm.t3a=0.00; //in newtons
fmm.t3b=0.00; //in N
fmm.t3x = 0.00; //in meters
fmm.t3y = 0.00; //in m
fmm.t3z = 0.00; //in m

//motor pod 4
fmm.t4a=0.00; //in newtons
fmm.t4b=0.00; //in N
fmm.t4x = 0.00; //in meters
fmm.t4y = 0.00; //in m
fmm.t4z = 0.00; //in m

//mass
fmm.weight=0.00; //in kg

//moments of inertia
//how much force is required to rotate
fmm.ip=0.00; //moment of pitch
fmm.iy=0.00; //moment of yaw
fmm.ir=0.00; //moment of roll
}

main()
{
printf(“DRONED v0.89 drone flight control daemon\n”);

printf(“Initializing drone mathematical model…\n”);
initialize_fmm(); //load the fmm model into memory

printf(“Entering main loop…\n”);
while (!done)
{

//debug
done=1;

}

printf(“Daemon shutting down…returning to OS\n\n”);
return 0;

}

OK better code example with complete force-moment-mass model coded, minimal guidance, simulation support.

https://www.raspberrypi.org/forums/viewtopic.php?p=1117477#p1117477

OK, here is the graphics support used in the simulator. Something called graph.c, you might have heard about it that it only has one function: writebmp. Non-real time graphics support (can be viewed in browser).

https://www.raspberrypi.org/forums/viewtopic.php?f=67&t=175498

OK, how do you code a process so it runs in the background. Highly recommended reading on service/daemons. Distilled specifically for all of you. No BS, no fluff, filler or additives:

https://www.raspberrypi.org/forums/viewtopic.php?f=33&t=175567

Oh YOU will likey. Oh yes…oh yes. ^ ^

Status report: just got my other motors in and waiting on Mouser to get me my parts (probably tomorrow) so I can throw the batts together and see if the motors will take the juice (its at like 7 volts so I think I should be good). Maybe throw together that ESC I’ve been running my mouth about on breadboard.

Knowing me I’ll get it done in the next few days and then update the schematic and maybe even the PCB traces. I’ll keep you dudes in the loop either way. :smiley:

Just remember that DAEMON1 doesn’t quite work yet so you might try debugging it your self…either way its a good read.

OK, little miffed right now. How come none of you geniuses pointed out that these drone motors are 3-phase? That ESC is for regular single-phase motors (or wasn’t that obvious).

I’ll have all of you know I’ve never actually built a drone before so I don’t appreciate being made look an idiot (however it probably makes a kick-*** 8 channel single-pase motor control board…once its fully designed/troubleshot).

Ok so little angry now about the possibility of having to use 6 MOSFET’s to control a single motor (how the HELL did someone come up with the idea of using a 3-phase motor for these toys…what was it some CAD/CAM guy…and what i the whole difficulty with brushes anyways?).

How is this for an idea of how to use 3 MOSFET’s to control one of these drone motors? I figure that its the voltage that the motor “sees”, I can feed it a 50% PWM signal that my motors will think is zero volts (silly things). Then I can go down to 0% PWM for the negative voltage eliminating the need for the additional 3 MOSFETs. Run 100% for max positive voltage.

Impressed with this way of using EMF blowback for controlling the motors though. I went to Digikey/Microchip to get the low-down on brushless motor control and read up on back EMF. However I’m dreaming that I’ll just use my gyro package to restart the motors in case of shut down, the main CPU I mean.

Gosh, I can see why you guys just talk about this stuff. Its fun and relaxing. innocent smile

Thoughts? About the technology I mean.

Ok so little angry now about the possibility of having to use 6 MOSFET's to
control a single motor (how the HELL did someone come up with the idea of
using a 3-phase motor for these toys...what was it some CAD/CAM guy...and
what i the whole difficulty with brushes anyways?).

Brushes are unreliable, lossy and result in torque ripple. 3phase
motor torque is flat, and they're so efficient that practically all
high end motors are 3phase, and there's a trend to put 3phase in
smaller and smaller appliances, like dishwashers, washing machines and
refrigeratos. What is your issue with 6 mosfets? They cost less than
fancy carbon brushes :slight_smile:

How is this for an idea of how to use 3 MOSFET's to control one of these
drone motors? I figure that its the voltage that the motor "sees", I can
feed it a 50% PWM signal that my motors will think is zero volts (silly
things). Then I can go down to 0% PWM for the negative voltage eliminating
the need for the additional 3 MOSFETs. Run 100% for max positive voltage.

For 50% PWM to result in zero current through your motors you need to
reference it to a half-Vcc, so you'll need some sort of circuit
anyway. Just welcome your new 6-legged 3-phase overlords and be done.