NXT UAV

Discussion specific to projects ideas and support.
pepijndevos
Posts: 175
Joined: 28 Dec 2011, 13:07
Location: Gelderland, Netherlands
Contact:

Re: NXT UAV

Post by pepijndevos »

I don't know what the difference between a PIC and an AVR is, but I ended up buying a PICAXE, for very unscientific reasons.

It might be BASIC, but it seems much easier to do PWM and I2C with the PICAXE. I also think it's lighter, cheaper and consumes less power. And they sold a female NXT connector in the same webshop ;)
-- Pepijn
http://studl.es Mindstorms Building Instructions
mattallen37
Posts: 1818
Joined: 02 Oct 2010, 02:19
Location: Michigan USA
Contact:

Re: NXT UAV

Post by mattallen37 »

I think you will be very happy with it! It is a nice cheap way to get into uCs (it's how I got into them).

I2C slave with the 20X2 is as easy as could be! Take a look at my posted PICAXE projects for various PICAXE programs.

In the future, you could always add Arduino to your collection when you want to expand.

Just curious, what did you end up buying for the programmer cable?
Matt
http://mattallen37.wordpress.com/

I'm all for gun control... that's why I use both hands when shooting ;)
pepijndevos
Posts: 175
Joined: 28 Dec 2011, 13:07
Location: Gelderland, Netherlands
Contact:

Re: NXT UAV

Post by pepijndevos »

I bought the whole starter pack, which has the USB cable, so I have an 20M2 to spare. Why do you use the 20X2? I could not find a difference between the two that seems to matter for your code.

Until I have some money to buy the other sensors, this one is going to used in a pneumatic walker initially. I'll post that to http://studl.es when I get it to work.

I have a few questions about your code. I'm first going to read the docs before I ask stupid things, but two stand out as particularly weird.
Make sure it is running at 8mHz or 32mHz clock speed.
or?

You seem to have a servo_pin loop that goes 0,1,2,3,4,6 :?:
-- Pepijn
http://studl.es Mindstorms Building Instructions
mattallen37
Posts: 1818
Joined: 02 Oct 2010, 02:19
Location: Michigan USA
Contact:

Re: NXT UAV

Post by mattallen37 »

The 20X2 has I2C slave abilities (so it can be a slave to the NXT). "hi2csetup - slave mode (X2 parts only)" PICAXE Manual 2, page 76, V7.5

"On X2 parts servo will only function at 8MHz or 32MHz." - PICAXE Manual 2, page 211, V7.5

IOs 5 and 7 are used for SDA and SCL, so they can't be used for servo outputs.
Matt
http://mattallen37.wordpress.com/

I'm all for gun control... that's why I use both hands when shooting ;)
pepijndevos
Posts: 175
Joined: 28 Dec 2011, 13:07
Location: Gelderland, Netherlands
Contact:

Re: NXT UAV

Post by pepijndevos »

Progress!


-- Pepijn
http://studl.es Mindstorms Building Instructions
mattallen37
Posts: 1818
Joined: 02 Oct 2010, 02:19
Location: Michigan USA
Contact:

Re: NXT UAV

Post by mattallen37 »

I'd be interested to know what all you have going on, on that breadboard.
Matt
http://mattallen37.wordpress.com/

I'm all for gun control... that's why I use both hands when shooting ;)
pepijndevos
Posts: 175
Joined: 28 Dec 2011, 13:07
Location: Gelderland, Netherlands
Contact:

Re: NXT UAV

Post by pepijndevos »

Well, it's very simple and obvious(after 2 weeks of studying). The top and right side are mostly similar to your controller, the bottom and left part contain inputs.

Two inputs go into the PICAXE, the other 3 go into the 4053, the PICAXE can then switch the 3 outputs between itself and the 3 inputs.

Image
-- Pepijn
http://studl.es Mindstorms Building Instructions
robotman2
Posts: 7
Joined: 28 Aug 2012, 04:52

Re: NXT UAV

Post by robotman2 »

I think what you are trying to do is do-able, however I probably wouldn't choose the NXT to do it :P. But that being said - a challenge is a challenge, so here I go.

Firstly, I would keep your batteries on the ground, or wall. Its unfortunate, but the nothing about the NXT has been designed to minimize weight. I've build plenty of RC planes, and that's one of the first considerations you have - weight. NXT hardware is bulky, slow and full of heavy plastic. If you can keep your batteries tethered to the UAV, you could have a chance at getting it off the ground, but vertical lifting (helicopters, quad copters, etc..) take a lot of energy - because you are starting from a "dead lift". Fixed wings, like a plane, don't require the extreme power density that you will need in a copter because you get the plan up to speed and glide around.

Additionally, you will have to think of timing, sensors, etc. The NXT is a cool device, but you'll probably need an accelerometer, and a few more things. You mentioned an ultrasonic sensor too - which is a cool idea.

If you do want to try an un-tethered idea, the NXT is much better suited for land based operations - haha. But that's not to say you can't make some super cool things. What I would highly recommend is reading this tutorial about sending Bluetooth commands from your computer to the NXT and then writing a simple computer software program to guide your robot around.

http://www.robotappstore.com/Knowledge- ... ms/92.html

The reason why i say this is because I'm really into making RC cars, planes, boats, hovercrafts, etc..., and the easier devices are those that operate in 2D like a car or boat. The moment you bring in a third dimension, the complexities skyrocket. So start with a car, boat, or other crazy machine and get your computer to control it.

I recommend the computer because it can do way more calculations than the NXT and will provide you with a much better stepping stone for future projects. If you have any questions please don't hesitate to ask!

Best,
RobotMan
Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests