Any Arduino Gyro Projects

Any old or new electronic projects on the go
bluejets
Posts: 81
Joined: 19 Jun 2019, 04:09

Any Arduino Gyro Projects

Post by bluejets » 30 Jun 2020, 10:12

Anyone seen an Arduino MPU6050 headlock gyro project floating around.

As with many things I usually find someone has already done it.

bluejets
Posts: 81
Joined: 19 Jun 2019, 04:09

Re: Any Arduino Gyro Projects

Post by bluejets » 30 Jun 2020, 10:40

Maybe these would work just as well....??

https://www.ebay.com.au/itm/Mini-Piezoe ... 11f4be4cfb

Martin
Posts: 392
Joined: 16 Feb 2018, 14:11
Location: Warwickshire

Re: Any Arduino Gyro Projects

Post by Martin » 30 Jun 2020, 14:42

I did a project a few years ago to make my own autopilot system. That used an MPU6050 and a few other sensors (barometer, magnetometer, GPS) all linked to an Arduino - and the Arduino also read in the PWM servo signals from the receiver, and outputted the pulses to the servos on different pins.

The Arduino monitored a 'manual switch' radio channel (channel 5): In one state the servo signals were passed through unaltered, and in the other the autopilot took over.

The actual flying intelligence was provided by a Raspberry Pi: the Arduino handled all the real-time sensor reading, and it communicated with the Pi via SPI with the Pi making the high-level decisions about waypoints and where to fly next.

So I wrote my own low-level Arduino code to read the MPU6050 - and it attempts to integrate the gyro signals to provide instantaneous roll, yaw, pitch, plus heading - though the magnetometer and accelerometer provide more stable values when the flight is relatively steady.

I never really got the Raspberry Pi part of it working very well, and eventually lost interest.

What are you trying do with the "headlock"? Is this just like a heading hold helicopter gyro, or something different? Let us know, and I'll dig out the relevant parts of the code and post them here.

User avatar
Shaun
Posts: 567
Joined: 15 Feb 2018, 21:49
Location: West Yorkshire

Re: Any Arduino Gyro Projects

Post by Shaun » 30 Jun 2020, 16:07

You can get all this and more on modern , inexpensive drone flight controllers. Not the fun of doing it yourself but cheap, compact and off the shelf with excellent , very well developed firmware and GUI's. There's also bespoke autopilots for aircraft as well, even included in a number of receivers such as the AS3X enabled spekky one and Lemon to name a few.

Cheers,

Shaun.

bluejets
Posts: 81
Joined: 19 Jun 2019, 04:09

Re: Any Arduino Gyro Projects

Post by bluejets » 01 Jul 2020, 00:37

Martin wrote:
30 Jun 2020, 14:42
What are you trying do with the "headlock"? Is this just like a heading hold helicopter gyro, or something different? Let us know, and I'll dig out the relevant parts of the code and post them here.
Yes, heli heading hold, sorry for the wrong terminology....
Seems all the standard economy gyros are no longer produced and was looking for an alternative for older choppers, much like Pchristy flys.

Shaun,
Is it possible to tap in to just the one axis of these modern receivers to operate same as above?
Thanks

User avatar
Shaun
Posts: 567
Joined: 15 Feb 2018, 21:49
Location: West Yorkshire

Re: Any Arduino Gyro Projects

Post by Shaun » 01 Jul 2020, 01:47

Hi,

I've used just one channel on an aircraft stabilizer before but Heli gyros are available here.

https://m.aliexpress.com/item/328548882 ... 6c5&is_c=Y

Also quite a few used ones on eBay.

Cheers,

Shaun

bluejets
Posts: 81
Joined: 19 Jun 2019, 04:09

Re: Any Arduino Gyro Projects

Post by bluejets » 01 Jul 2020, 03:41

Thanks Shaun,
Good to know I can tap just the one channel on these new devices.
Ok for Aliexpress but it appears they don't do Paypal for Aus and I consider it more than risky to let them have access to any credit card etc.
Cheers Jorgo

Pchristy
Posts: 150
Joined: 16 Feb 2018, 13:57
Location: South Devon, UK

Re: Any Arduino Gyro Projects

Post by Pchristy » 01 Jul 2020, 08:59

Funnily enough, I've been lamenting the disappearance of standard heli gyros myself! I think I bought Midlands last CSM-180 (bottom of the range, basic gyro) for my electric Lark project.

I think Futaba still do a tail-rotor only gyro that does both heading hold and normal, but they aren't cheap, and stock seems to be rare in the UK!

The suppliers seem to assume that everyone will be using (expensive!) flybar-less systems, but those are of little use to vintage / sport / scale flyers.

Way back, I did develop a mechanical heli gyro (when they were still a novelty!) based partly on my mixer circuit. It was done in conjunction with Peter Valentine (mechanical design) and Mick Wilshere (marketing). Someone else developed an improved circuit for it that was featured in RCM&E, IIRC, using the same mechanical parts. The improved version featured variable gain from the transmitter, and was quite clever!

A lot of the cheap solid-state gyros that were available a few years ago suffered terribly from drift. I know, I have a few! I never looked into why, so I don't know if it was a sensor issue or a voltage problem. I know some of the early mems sensors needed a higher voltage than 5V, and had to incorporate a voltage up-converter, but I don't know if this is still true.

The actual principle is quite simple, and I think an Arduino would be serious over-kill! I suspect you could probably get away with a PIC device. The biggest problem would be getting hold of the sensors, something I haven't looked into!

Hey Phil! Maybe we've spotted a gap in the Market! :D

--
Pete

Tobe
Posts: 239
Joined: 16 Feb 2018, 06:19
Location: Varberg or Stockholm, Sweden

Re: Any Arduino Gyro Projects

Post by Tobe » 01 Jul 2020, 09:33

I still have a few Futaba 401 + servo hidden in the good to have box. Actually you can set up the modern FBL gyros/system to just work on the tail if you are flying with Fly Bars. FYI I normally have a "Tail Gyro" when I'm flying turbine/EDF to compensate for the lack of prop wash.
At this time I'm experimenting with giros like the MPU6050 in conjunction with accelerometers and they are extremely reliable working amazingly well. This kind of gyros have on Yaw however some drift over time but this is corrected with a small compass modules. If you search on the net there are quite many projects out there and good tutorials ie. in 3D-Mouse / Pointer as they are used as special devices to assist more or less impaired people.

Pchristy
Posts: 150
Joined: 16 Feb 2018, 13:57
Location: South Devon, UK

Re: Any Arduino Gyro Projects

Post by Pchristy » 01 Jul 2020, 10:05

Hi Tobe,

The "drift over time" you refer to is often caused by the rotation of the earth! Its only noticeable on "heading hold" devices, but in theory, if you could hover a helicopter for 24 hours, it would do a complete 360 degree rotation! (depending on its original heading!)

The drift I was referring to was quite noticeable as a freshly charged NiXX voltage dropped. The cheap ones need tweaking before every flight!

Yes you can set up a FBL unit to just work on the tail. However, these units are very expensive! What is needed is a simple tail-rotor gyro, as was the norm some years ago.

I see some are now being sold for cars, and wonder if these would work in a heli....

--
Pete

Post Reply