PDA

View Full Version : [Project] Autonomous Helicopter



elios
07-05-2009, 02:51 AM
Okay.... so i have started this project.... Yip...
http://forums.trossenrobotics.com/gallery/files/2/2/8/6/sdc10691.jpg

Just to prove that the picaxe is good enough for these things, i am making an autonomous (ex R/C) helicopter.
this will will be controlled by two 08ms and a 28x2.


https://www.sparkfun.com/commerce/product_info.php?products_id=252 (https://www.sparkfun.com/commerce/product_info.php?products_id=252)


I have an accelerometer arriving any day now from the US of A....
http://kei.co.nz/A000273_KiwiPatch%20Data%20Sheet_files/image014.jpg
i have parts ordered off another place for making a voltage regulator;
http://forums.trossenrobotics.com/gallery/showimage.php?i=1488&c=
i bought two 8gram digital servos yesterday... those have replaced the "other" servos that were once inside my helo.
http://forums.trossenrobotics.com/gallery/files/2/2/8/6/sdc10689.jpg

i am thinking of placing a PING ultrasonic range sensor on the bottom of the helo to act as an altimeter.

so far that is what has happened. i'll post some code i have written up awaiting some of the parts, later.

cheers,

Noodle
07-05-2009, 03:00 AM
Yay. Looking forward to how you go with accelerometers and Picaxe.

elios
07-05-2009, 03:02 AM
lol my current plan is to readadc..... idk what if that fails.... hahahaha.. i have to ask my mate

elios
07-05-2009, 03:21 AM
Okay, the bit of code for the Servo controller 08m. called S08m ~ so far. THIS IS STILL VERY MUCH A WORK IN PROGRESS

init: 'initial program, does not loop back
symbol x = b0 'defining x axis
symbol y = b1 'defining y axis
symbol z = b2 'defining z axis
symbol servox = b3 'defining servo on x axis
symbol servoy = b4 'defining servo on y axis
symbol motorz = b5 'defining servo on z axis
servo 1, servoy 'move servo located pin 1, to position defined by servoy. This bit of code initiates the servo
servo 2, servox 'move servo located pin 2, to position defined by servox. This bit of code initiates the servo

loopa: 'loop A
gosub loopd
if y < 70 then gosub loopc
if x < 70 then gosub loopb
debug 'open debug window
goto loopa 'goto loop A

loopb: 'loop B
servopos 2, servox 'move servo, located pin 2, to position that the variable servox is stating
pause 200 'pause 20 milliseconds,
return 'return to original place in loop A

loopc: 'loop C
servopos 1, servoy 'move servo, located pin 1, to position that the variable servoy is stating
pause 200 'pause 20 milliseconds
return 'return to original place in loop A

loopd:
serin 4, N2400_4, (":Q"),b3,b4,b5 'serial data in pin 3, baudmode Inverted 2400 on 4Mhz frequency, with the data being inputted to these variables.
return 'return to original place in programming

EDIT: x, y, z isnt being used as i moved the accelerometer decoding to the main processing unit ~ the 28x2

nagmier
07-05-2009, 02:49 PM
Keep me posted! I was given a Blade CX2 I want to do this with in the future! Awesome project!

elios
07-05-2009, 06:11 PM
i got servo movements working with the digital servo, the pitch servo.

init:
servo 1, 80
loopa:
servopos 1, 122
pause 222
servopos 1, 80
pause 222
debug
goto loopa

this program makes it centralise, then go up and centralise again, on a continuous loop

[edit] i have figured out, from trial and error, that the max movement ranges are:

centre: b1=135
up: b1=185
down: b1=105

you can subs the values after the pin, i.e servopos, 1, [b1], for b1.

this is for the pitch servo

elios
07-06-2009, 02:31 AM
some more code: this is the code currently in the 08m for controlling the x & y servos:

init:
servo 1, 135
servo 2, 149
pause 5000

loopa:
serin 4, n2400, (":Q"), b1, b2
gosub servox
gosub servoy
sertxd ("servo position now: ",9,"x",#b1,44,9,"y",#b2,13,10)
pause 200
goto loopa

servox:
servopos 1,b1
pause 175
low 1
return

servoy:
servopos 2,b2
pause 175
low 2
return

ooops
07-07-2009, 08:36 AM
Cool project Elios. Very, aggressive ... I like that:)
I trust you will keep sharing the progress!

elios
07-07-2009, 04:20 PM
lol, thanks Ooops. I spent most of yesterday trying to figure out eagle CAD. I think i have most of it down-pat, except for when it comes to printing the finished PCB, i cant get the track sizes and the vias correct. so ill continue to play with this today

ScuD
07-07-2009, 04:36 PM
word of advice: print out your layout 1:1 when you're done and arrange your components on it to see if everything came out the way it should. Wouldn't be the first time the paper slid just the tiniest amount during printing causing a slight offset, but given a large enough board that might mean not being able to place that one vital component.

Are you etching yourself? or making use of something like batchpcb?

Might want to try gerber files for 1:1 output, although I've never had an issue with Eagle (been some time since I've used it though)

elios
07-07-2009, 05:24 PM
okay. thanks, ill have a look. im going to be doing the etching myself, more correctly, is that i am going to give it to a teacher at school to etch, as he has all the gear. i'm thinking of using something like press 'n' peel, is this very effective?

Adrenalynn
07-07-2009, 05:29 PM
Depends how small the traces are and how many bends. And how well you drill.

At $2.50/sq-in with a 0.5x0.5 minimum now, unless you're doing it yourself to learn (which you aren't) - you'd have to be psycho not to use batchpcb or someone similar.

elios
07-07-2009, 06:07 PM
okay. i just made a user on batchpcb. how do you create gerber files in eagle?

Adrenalynn
07-07-2009, 06:13 PM
[twitch]

Do you see that big link over on the left hand side, where you [twitch] registered? The big [twitch] link that says "HOWTOS" [twitch]?

[twitch] I'll bet the instructions [twitch] might be somewhere on that link down towards [twitch] the bottom. [urg! swallows tongue, turns purple, passes-out]

elios
07-07-2009, 07:33 PM
HAHaHHahahahHAHha... what i meant to say... is i am still figuring out how to make the PCB on Eagle...

lnxfergy
07-07-2009, 08:02 PM
HAHaHHahahahHAHha... what i meant to say... is i am still figuring out how to make the PCB on Eagle...

Check out the tutorials on Sparkfun for a whole series on Eagle...

-Fergs

elios
07-07-2009, 08:16 PM
thanks fergs, i didnt know they had a tutorial. ill have a look soon

WGhost9
07-07-2009, 10:55 PM
Cool project , I have been tempted to do something similar for a while now. Look forward to seeing how it turns out.

elios
07-09-2009, 01:04 AM
kool. i have been i little bit busy the last wee while. Had to help parents in the garden.. but anywho, i have designed one of the circuits, the one for the 28x2.

@adren. Its cheaper for me to make my own tank, buy all the materials and do it myself with an error rate of 3 chances than to buy from them - as i am not in the US of A.

Tomorrow i am ringing around to all the companies in town to see if they have any polycarbonate or acyrlic off-cuts so i can make my own etch tank. ill need to pick up a fish tank bubble machine to put bubbles in the tank, but i should be able to get one for a couple bucks through the local buy sell swap system.

yes yes yes, i will use this in the future. If not, i will donate it to my school.

This should keep me entertained while i wait for more parts to arrive....

elios
07-12-2009, 12:45 AM
my picaxe 28x2 arrived today. and the program i was using with the 28a to get serial comms working doesnt work.. think that i am going to be spending the next few days getting it working again

elios
01-23-2010, 12:18 AM
hmm time to update as was brought up in chat.

just to bullet a few things:

- I have swapped to a twin engined R/C style aircraft which is still being built.
- Using a GPS for navigation, which arrived the other day from techsupplies in the UK... need to get an antenna for it tho
- HopeRF modules seem to be the winner here, as they are cheap (like $30NZD each) and have a 2km LOS range. (got them free)
- I'm currently working with a whole system of chips but once the new PICAXE 18M or whatever it is comes out, it has multi-tasking so hopefully will be able to get rid of a few excess components.
- Managed to find me a tutorial to use VB xpress 2008 with picaxes, and have has a tinker with that, but have filed all the docs away so I can create a computer interface in the future.

if you want to check out my other blog http://www.phantom-uav.blogspot.com/

or the picasa web album (http://picasaweb.google.com/liambealester/PlaneBuild)

So far so good. I can get some 40A motor controllers from Deal extreme for like 30USD each, so that should save some production time.
^^ the motors only draw 20A each at stall so should be right.

Batteries are going to be a big problem, but eventually ill swap to fuel

4mem8
01-24-2010, 01:02 AM
Nice project elios, will look on with interest.

elios
04-07-2010, 09:25 PM
again, i am starting to run out of time to get this project completed so have bought a plane... (cats jumped on the wing and twisted it while gluing, do not have the time or resources to rebuild)

so have another look at the picasa album. http://picasaweb.google.com/liambealester/PhantomUAV#