Show Posts
Pages: [1] 2 3
1  Forum 2005-2010 (read only) / Syntax & Programs / Re: ServoDecode library for 20MHz arduino on: February 07, 2010, 11:46:55 am
Hi Mem,

cheers for your input - it's working ok, but I agree it's not ideal. I'm running this on a 328, and would like to save on ram wherever possible. I'll try your idea and see how it goes...

Do you think that the prescaler would be more helpful if set faster, such as /4? I'm new to the hardware timers, but I'm keen to learn about them. I've worked out that you're using it /8 (correct me if I'm wrong!!) so if using it at /4 would it improve the situation? TICKS_PER_uS would then be 5.

I think this might be a good solution however it'll no-doubt cause other issues when this is changed.

Cheers!
Ed
2  Forum 2005-2010 (read only) / Syntax & Programs / Re: ServoDecode library for 20MHz arduino on: February 07, 2010, 10:35:37 am
I seem to have found a stop-gap solution for using this library.

The clock prescaler is set to /8 and the 20mhz clock will give 2.5 ticks per microsecond. Editing the #define TICKS_PER_uS to 2.5 instead of 2 gives good results.

Can anyone see any issues with this?

It seems to work. I'll test it thoroughly and post the results here.

 smiley
3  Forum 2005-2010 (read only) / Syntax & Programs / ServoDecode library for 20MHz arduino on: February 07, 2010, 07:06:26 am
Hi all,

I have built a 20MHz arduino and sorted out the bootloader etc. My code works nicely with the exception of the ServoDecode library.

The issue is that the timing is done in the hardware timer1 using the clock prescaler. It works nicely at 16MHz with the timer being incremented twice per microsecond. I'm not too good with these timer bits, and was wondering whether someone with experience with this timers could help.

The library in question is here: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1228137503/0

If anyone has any ideas I'd be most grateful for the help. I think I can work out how to make the needed changes happen at compile time depending on the clock speed of the target device, but I cannot figure out the changes to make it work at 20MHz.

Thanks in advance for your help!

Ed

4  Forum 2005-2010 (read only) / Development / Re: scoliosis accelerometer and arduino on: February 06, 2009, 11:55:35 am
Hello,

I'd look into the demo code for the accels you've got from sparkfun. The code will give you the readings from the accel.

Atan2(x,z) will give you angle X, atan2(y,z) will give you angle Y.

From this you can either average a few readings for stability, or, better yet go with kalman filtering.
Gyros could give some interesting info about the relative rotation of each sensor node.

I'd use several sensor groups and compare them giving a bezier curve of the spine. You could mathmatically model the spine constraints, then plot the curve with processing or similar.

I'm interested in this - I'm tempted to develop this code myself, I'd need more accels though. Several of the accels you mention can be on one SPI bus, giving a huge amount of flexibility.

Let me know how you are getting on.

All the best,
Ed
5  Forum 2005-2010 (read only) / Interfacing / Re: RS485 on: September 10, 2009, 05:05:46 pm
Hi,

Please could you post a sample of your code, I'd be interested to see what you've done...

Thanks!
6  Forum 2005-2010 (read only) / Exhibition / Re: Arduino + Lego NXT on: December 21, 2008, 06:39:20 am
Great project! Why is it not call Segduino!?

You might be interested in the project I am working on at the moment, simply because its using an Accel (3axis) and a gyro.

http://www.eclipseaudioservices.co.uk/extras/helicopter.html
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1229733416

Using Kalman filtering to remove the jitter, and to correct for the drift of the gyro I used the demo code for my sensors and bits from here: http://tom.pycke.be/mav/71/kalman-filtering-of-imu-data

I will be putting the code for the helicopter online soon, but it needs tidying up first.

You should try making one with just one wheel - that would great!
7  Forum 2005-2010 (read only) / Exhibition / Re: Arduino 3DOF Head Tracker on: February 02, 2009, 03:42:54 pm
Hi all,

You may be interested to know about the Kalman filter, I have used kalman filters to remove the noise and drift from the gyros and merge the readings with the angle computed from the accelerometers.

There is code available for 6DOF computation in the Arduino Helicopter Autopilot thread.
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1229733416

This may help - may not... depends how much headache you are prepared to put up with! It's certainly not simple, but the results are spectacularly improved.

Hope that helps,

Ed
8  Forum 2005-2010 (read only) / Exhibition / Re: Arduino Helicopter Autopilot on: March 22, 2010, 09:58:49 am
Hi all,

I apologize for my site no longer being online. I'm launching a new site very soon, and I'll post a link here when I do. The board will be available for sale very shortly too!

 smiley
9  Forum 2005-2010 (read only) / Exhibition / Re: Arduino Helicopter Autopilot on: May 22, 2009, 03:39:00 am
Here's a long needed update about the whole project!

The HeliShield is working and the design is now human friendly too. PCBs will be available shortly, email me if you'd like to buy one and I'll take your details and let you know when they're ready.

There will be a few ways in which you can buy the boards, bare single sided boards will be available in the next week without silkscreen. This option is not for the faint of heart, there are four leadless packages to solder on. The first PCBs sell for £15 each and will be supplied with documentation. The features on this board are as follows:
Radio baseband signal is captured on one pin.
Servo output headers for all channels
3 axis accelerometer
Single axis gyro for yaw
Dual axis gyro for roll and pitch
3 axis magnetometer for heading hold and dead-reckoning
Lots of smoothing caps
Draws power for everything directly from the speed controller
Serial header for connection to a wireless serial modem
Socket for IR rangefinder to enable gentle landings

A bit further in the future a double sided shield will be available, with silkscreen and the same spec as above. This will be the same footprint as the arduino.

Using the stock duemilanove with this board is testing it a bit, it runs stably doing all the inertial measurement, radio, serial comms bi-directionally and so on but there is very little room to expand either hardware or software. If you intend to just use a standard duemilanove I would suggest leaving out the magnetometer.

Having played with a Mega the other day, I've decided to stop the development around the Sanguino and move to the mega chip for the all-in-one system. This is on the drawing board at the moment, I will push for getting a test one done very soon, my current prototype is very hard to fit to a 450. The all in one system will be narrow enough to fit into the bodywork of a 450 size heli.

Come and have a look at the shiny new prototype at www.eclipseaudioservices.co.uk/extras/helicopter.html

Code is available for this board on the site now, and all the documentation will be appearing soon.

If you want to purchase a board in any state of completion, please email me with details of what you want and I'll get building.

Ed
10  Forum 2005-2010 (read only) / Exhibition / Re: Arduino Helicopter Autopilot on: May 21, 2009, 02:53:35 am
Hi All,

A momentous occasion - today I start building the new and improved HeliShield.

Now with a 3 axis magnetometer in addition to 6DoF inertial measurement. This PCB fits the standard arduino, but is best suited to the 328 upgrade, giving double the space for your code.

I have just printed off the mask and checked it over, I'm about to start playing with chemicals...

More news soon I hope!
11  Forum 2005-2010 (read only) / Exhibition / Re: Arduino Helicopter Autopilot on: April 21, 2009, 03:06:02 am
Hi everyone!

Sorry for the complete lack of news for a while. I've been working on GPS, camera and compass functions.

The 168 arduino is being pushed to the limits with the IMU and correction code alone, so some changes to the hardware have been made.

There will be a major release in the near future. There are new versions of the code for the 328p and Sanguino to allow for more than just IMU and correction functions.

I will post here when the release is made, there will also be a hardware release soon, once it's finalised.

Wireless serial is handled by a UM96 from sparkfun, although I'm tempted to move onto trying wifi using something like a fonera on the heli.

All the functionality of the system is being tailored towards minimal human input - GPS waypointing is improving etc. I will have to come up with a method of giving really simple commands 'live' but otherwise I think it's fulfilling most of the questions people have asked.

All the best!
Ed
 smiley-grin
12  Forum 2005-2010 (read only) / Exhibition / Re: Arduino Helicopter Autopilot on: February 23, 2009, 09:13:31 am
Hi,

My bad re: PPM vs. PCM - oops

Yeah - my receiver  has the pulses at about 4 volts, plenty enough for the microcontroller to go digital high. It should be roughly the supply voltage of the receiver in most cases.

Hope that helps,
Ed
13  Forum 2005-2010 (read only) / Exhibition / Re: Arduino Helicopter Autopilot on: February 23, 2009, 08:39:23 am
Hi,

The PCM is a standard across manufacturers, as the servo pulses are derived directly from the baseband PCM. All you need to do is locate the PCM pulses in your receiver and make a connection to it > pin 8 arduino.

Mem's library (servo decode) will have you up and running in no time.

I've had some major luck with new filtering for the gyros and accels, I can sense a rotation of less than a degree accurately and use the feedback to smooth movements. Also I've achieved a filter system to detect linear, tilt compensated accelerations without the gravity component. All of this means the helicopter should be flying very steadily very soon.

All the best!
Ed
14  Forum 2005-2010 (read only) / Exhibition / Re: Arduino Helicopter Autopilot on: February 09, 2009, 10:50:25 am
Hello everyone!

I've made further progress with the helicopter code, and the processing sketch. Linear correction will be integrated into the next version release.

I now have video working under linux, the display is now a video overlay. Also the display has been re-arranged considerably to include an artificial horizon (which is very accurate) and some pretty little piecharts to illustrate the throttle and tail rotor pitch.

http://www.eclipseaudioservices.co.uk/extras/artificialhorizon.html

The Xbox 360 controller integration is going well - this will be included in the next release.

Thanks again to everyone who is testing the code for me - it's certainly speeding the process up.

Ed   smiley-grin
15  Forum 2005-2010 (read only) / Exhibition / Re: Arduino Helicopter Autopilot on: February 04, 2009, 04:25:32 pm
Hello,

Welcome aboard zitron, I have a feeling that I'll be doing just that - also making it lock on more securely to the tracking of the framing period, and checking whether the number of pulses in any frame is consistent with the rest.

I'm also going to add a 100nF cap to gnd on the output of my RC receiver to aid the noise rejection.

All the best!

Ed
Pages: [1] 2 3