HobbyKing.com New Products Flash Sale
Reply
Thread Tools
Old Jul 30, 2012, 04:37 AM
Ape-pilot Extraordinaire
TS00's Avatar
Canada, NB, Moncton
Joined Jun 2011
1,501 Posts
Quote:
Originally Posted by careyer View Post
Hi TS00,
thank you so much.. Moving AUX2 from D8 to D12 is no problem - also activating the Voltage monitoring in the code is a piece of cake. Though my skills in electronics are so bad... Could you please draw a sketch (cuircuit diagram) on how to build this potential divider? Thank you so much!

Best regards
careyer

Update: Okay Wikipedia helps a bit here =). I know now how to build this potential divider... I'm just curious why one has to devide the volate to 4,95V and 7,65V .... isn't there a way to do that without dividing .. like with a single resistor or something like that?

A potential divider is the simplest way to provide a 0-5V input to the microcontroller. It's just a couple of resistors. Here's a diagram:

TS00 is offline Find More Posts by TS00
Reply With Quote
Sign up now
to remove ads between posts
Old Jul 30, 2012, 05:08 AM
member of TheBlindHawks
careyer's Avatar
Joined Feb 2011
181 Posts
Thank you very much TS00... but I guess you have mixed up the order of the two Resistors =)
I guess R1 must be 33k and R2 = 51k... otherwise Pin A3 would get 7,6 instead of the 4,9 Volts, right`?
careyer is offline Find More Posts by careyer
Reply With Quote
Old Jul 30, 2012, 05:12 AM
Ape-pilot Extraordinaire
TS00's Avatar
Canada, NB, Moncton
Joined Jun 2011
1,501 Posts
Quote:
Originally Posted by careyer View Post
Thank you very much TS00... but I guess you have mixed up the order of the two Resistors =)
I guess R1 must be 33k and R2 = 51k... otherwise Pin A3 would get 7,6 instead of the 4,9 Volts, right`?
No, they're right :-) The voltage is between the middle wire and ground (you have to connect the ground to battery ground, which will also be connected to your multiwii ground via your BEC).

With a potential divider, you get the higher voltage across the higher resistor. So in this case, you get ~5v across the 33k, and ~7v across the 51k.

Does that make sense?
TS00 is offline Find More Posts by TS00
Reply With Quote
Old Jul 30, 2012, 06:39 AM
member of TheBlindHawks
careyer's Avatar
Joined Feb 2011
181 Posts
Does that mean i want to have those 7V go to the Crius Board? I thought i'd want to have the 5V go there...
careyer is offline Find More Posts by careyer
Reply With Quote
Old Jul 30, 2012, 06:41 AM
Ape-pilot Extraordinaire
TS00's Avatar
Canada, NB, Moncton
Joined Jun 2011
1,501 Posts
Quote:
Originally Posted by careyer View Post
Does that mean i want to have those 7V go to the Crius Board? I thought i'd want to have the 5V go there...
You want the 5v going to the board. Just make the potential divider, and put a voltmeter on it, you'll see what I mean :-)
TS00 is offline Find More Posts by TS00
Reply With Quote
Old Jul 30, 2012, 06:43 AM
member of TheBlindHawks
careyer's Avatar
Joined Feb 2011
181 Posts
O.K.! I trust you =) Thank you very much for your help... will try this tomorrow when I've got the right resistors and report back.
careyer is offline Find More Posts by careyer
Reply With Quote
Old Jul 30, 2012, 06:49 AM
Ape-pilot Extraordinaire
TS00's Avatar
Canada, NB, Moncton
Joined Jun 2011
1,501 Posts
Quote:
Originally Posted by careyer View Post
O.K.! I trust you =) Thank you very much for your help... will try this tomorrow when I've got the right resistors and report back.
Most welcome. Don't forget, you're measuring the voltage between the centre point (where the two resistors join) and ground.
TS00 is offline Find More Posts by TS00
Reply With Quote
Old Jul 30, 2012, 09:41 AM
Registered User
Joined Apr 2012
9 Posts
careyer. pls. be very careful with that. it could damage your atmega328 pin if not properly connected. do not get confused. just follow TS00's instruction.
villTech is offline Find More Posts by villTech
Reply With Quote
Old Jul 30, 2012, 05:46 PM
Registered User
Joined Jul 2011
280 Posts
Quote:
Originally Posted by TS00 View Post
If you want to use the buzzer, you're going to have to move AUX2 to pin12 instead of pin8. This is in config.h, look for #define RCAUXPIN12. You then connect your buzzer to pin8....
Do you connect the buzzer accross pin8 and ground? or pin8 and V+? ie, when buzzer is active, does pin8 go high or does it go low?
Candu1 is offline Find More Posts by Candu1
Reply With Quote
Old Jul 30, 2012, 05:51 PM
Ape-pilot Extraordinaire
TS00's Avatar
Canada, NB, Moncton
Joined Jun 2011
1,501 Posts
Quote:
Originally Posted by Candu1 View Post
Do you connect the buzzer accross pin8 and ground? or pin8 and V+? ie, when buzzer is active, does pin8 go high or does it go low?
Between pin8 and ground. When active pin8 goes to 5v. The buzzer needs to be a buzzer, not just a piezo transducer.
TS00 is offline Find More Posts by TS00
Reply With Quote
Old Jul 30, 2012, 06:23 PM
Registered User
Joined Jul 2011
280 Posts
Quote:
Originally Posted by TS00 View Post
Between pin8 and ground. When active pin8 goes to 5v. The buzzer needs to be a buzzer, not just a piezo transducer.
Got it. Thanks for lightning fast response!
Candu1 is offline Find More Posts by Candu1
Reply With Quote
Old Jul 31, 2012, 02:33 PM
Registered User
Joined Jun 2012
17 Posts
Quote:
Originally Posted by TS00 View Post
You have quite high P and D. This will result in a more stable machine, unless they are two high, in which case you'll start seeing oscillations.

The best way to PID tune a machine is to fly it on a still day, and see how it behaves. Post your findings, and a video if you can, and we can advise on where to go from there.
Hi TS00,
you was right, looks like my PID settings is too high - i'm getting oscillations.
(please see the video bellow)
Hexacopter Oscillation (0 min 38 sec)


It's GLB650 Hex-Rotor HexCopter 650 mm
Weight with battery: 49.5 ounces (1400 grams or 1.4 kg)
Motors: XXD 2212 1000kv brushless motor
Props are: GEMFAN Carbon Nylon 10x4.5

My current PID settings on the attached picture.
Can you give me advice what settings should i tweak to get more stable flight?
(i don't need aerobatics at the moment, i look for beginners pilot stability)
Vadique is offline Find More Posts by Vadique
Last edited by Vadique; Jul 31, 2012 at 02:40 PM.
Reply With Quote
Old Jul 31, 2012, 02:43 PM
Ape-pilot Extraordinaire
TS00's Avatar
Canada, NB, Moncton
Joined Jun 2011
1,501 Posts
Quote:
Originally Posted by Vadique View Post
Hi TS00,
you was right, looks like my PID settings is too high - i'm getting oscillations.
(please see the video bellow)
http://www.youtube.com/watch?v=f9k_7O_RrTU

It's GLB650 Hex-Rotor HexCopter 650 mm
Weight: 49.5 ounces (1400 grams or 1.4 kg)
Motors: XXD 2212 1000kv brushless motor
Props are: GEMFAN Carbon Nylon 10x4.5

My current PID settings on the attached picture.
Can you give me advice what settings should i tweak to get more stable flight?
(i don't need aerobatics at the moment, i look for beginners pilot stability)
Ok, I don't think it's that far off.

First, drop Level P to 3. Otherwise you're trying to tune out two sets of wobbles, acc wobbles and gyro wobbles.

Now start reducing Pitch P and Roll P (together, keeping them the same as each other) by 1 point at a time, until that oscillation disappears.

You can leave I and D alone for now.

Post back with your results!
TS00 is offline Find More Posts by TS00
Reply With Quote
Old Jul 31, 2012, 03:03 PM
Registered User
Joined Jun 2012
17 Posts
Quote:
Originally Posted by TS00 View Post
Now start reducing Pitch P and Roll P (together, keeping them the same as each other) by 1 point at a time, until that oscillation disappears.
Thank you for lightning fast reply!

By reducing Pitch P and Roll P by 1 point at a time you mean:
to go from 8.1 to 7.1 and to 6.1 etc?
or
to go from 8.1 to 8.0 and to 7.9 etc?
Vadique is offline Find More Posts by Vadique
Reply With Quote
Old Jul 31, 2012, 03:11 PM
Ape-pilot Extraordinaire
TS00's Avatar
Canada, NB, Moncton
Joined Jun 2011
1,501 Posts
Quote:
Originally Posted by Vadique View Post
Thank you for lightning fast reply!

By reducing Pitch P and Roll P by 1 point at a time you mean:
to go from 8.1 to 7.1 and to 6.1 etc?
or
to go from 8.1 to 8.0 and to 7.9 etc?
Go from 8 > 7 > 6.

I'd actually go from 8 to 5 straight off, see how it feels. But if you're a nervous pilot, so it in steps of 1.
TS00 is offline Find More Posts by TS00
Reply With Quote
Reply


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
New Product Full Foxtech AIO Glasses Review Guizmo12 FPV Equipment 1319 Today 04:55 AM
Sold Arduino / MultiWii / Megapirates Boards 3rdeyepro Aircraft - Electric - Multirotor (FS/W) 3 Dec 03, 2011 08:43 PM
Wanted MSR 5in1 boards and MCPX 3in boards beachflyer Aircraft - Electric - Helis (FS/W) 3 Nov 22, 2011 09:14 PM
Discussion Foxtech AIO goggles RX? Teamsherman FPV Talk 2 Oct 02, 2011 10:06 AM
Sold 3 x PCB boards for multiwii copter for $28 madushan2008 Aircraft - Electric - Multirotor (FS/W) 1 Sep 06, 2011 06:53 AM