HobbyKing.com New Products Flash Sale
Closed Thread
Thread Tools
Old Apr 25, 2013, 02:16 AM
Baris ALP
Joined Dec 2005
26 Posts
Quote:
Originally Posted by thanhTran View Post
bss123 FET doesn't drive the motors. The IRF7343 FETs drive the motors. they can drive up to 3.4A
No, be careful.
irf7343 datasheet says,
3.4A@vgs=10V
2.7A@vgs=4.5V
Stm32 drives 5v so it can drive 2.7A.
hd27 is offline Find More Posts by hd27
Sign up now
to remove ads between posts
Old Apr 25, 2013, 02:29 AM
Registered User
Joined Jan 2011
1,057 Posts
Quote:
Originally Posted by hd27 View Post
No, be careful.
irf7343 datasheet says,
3.4A@vgs=10V
2.7A@vgs=4.5V
Stm32 drives 5v so it can drive 2.7A.
And you are seriouly wrong.

In FET you have two stages, the power stage and the gate (whatever the name is).

The power stage is run with the voltage you want. Up to 55v in the case of IRF7343.

And i don't think that a stm32 will drives more than 100mA (and i think i'm exagerating)
nicodh is offline Find More Posts by nicodh
RCG Plus Member
Old Apr 25, 2013, 03:07 AM
Baris ALP
Joined Dec 2005
26 Posts
Quote:
Originally Posted by nicodh View Post
And you are seriouly wrong.

In FET you have two stages, the power stage and the gate (whatever the name is).

The power stage is run with the voltage you want. Up to 55v in the case of IRF7343.

And i don't think that a stm32 will drives more than 100mA (and i think i'm exagerating)
You didn't understand.
I'm talking about current.
Yes power voltage can be 55V (Vds).
Gate voltage (Vgs) max +-20V
If you give 10V to gate, you get 3.4A. (P channel)
If you give 4.5V to gate, you get 2.7A. (P channel)
Stm32 gives 5v to gate.
hd27 is offline Find More Posts by hd27
Old Apr 25, 2013, 03:20 AM
That tree again!!!!
thanhTran's Avatar
Germantown, MD, US
Joined Sep 2004
6,642 Posts
Got it, thanks HD27
thanhTran is offline Find More Posts by thanhTran
Old Apr 25, 2013, 11:16 AM
Suspended Account
Joined Dec 2010
11,764 Posts
stm32 runs at 3V
timecop is offline Find More Posts by timecop
Old Apr 25, 2013, 11:45 AM
Registered User
Portland, OR, USA
Joined Mar 2010
268 Posts
So at 3v we are looking at under 2A? That doesn't sound so great- how many amps are needed to hold a larger camera?

And is it really 4 degrees of accuracy from the 90 sine LUT? Is that fine enough resolution?
Tom Frisch is offline Find More Posts by Tom Frisch
Old Apr 25, 2013, 11:53 AM
Suspended Account
Joined Dec 2010
11,764 Posts
I dunno

sine drive on esc32 (0 min 19 sec)


this was like 6 lines of actual code and i just used sinf().
I see hes using lookup table but thats for attitude not for motor control.
no idea why, the ADC1Ch1_vid stuff is weird because he has this:
Code:
		ADC1Ch1_vid=  ((ADC1Ch1_vid*99.00)+(readADC1(1)/4000.00))/100.00;	//Averaging ADC values
		ADC1Ch1_vid=0.00;
so its basically a no-op

cause
Code:
		sinus   = sinusas[(int)(ADC1Ch1_vid*57.3)];      //Calculating sinus		
    cosinus = sinusas[90-(int)(ADC1Ch1_vid*57.3)];   //Calculating cosinus
will always just be zero. ADC1Ch1_vid = 0, sinuses[0] = 0, cosinus will be sinuses[90] which is i think 1.0
timecop is offline Find More Posts by timecop
Old Apr 25, 2013, 01:57 PM
Registered User
Portland, OR, USA
Joined Mar 2010
268 Posts
What is ADC1ch1_vid storing? Is it a value from the IMU? or from the RC PWM input?
Tom Frisch is offline Find More Posts by Tom Frisch
Old Apr 25, 2013, 03:13 PM
Registered User
evvaldis's Avatar
Lithuania
Joined Jan 2007
179 Posts
Quote:
Originally Posted by Tom Frisch View Post
What is ADC1ch1_vid storing? Is it a value from the IMU? or from the RC PWM input?
Sorry for big delays, very busy week. I am on trip to Scotland now.
Adcch1 was for testing pitch control, i used potentiometer readings for testing pitch tilt control.
Sinus lut used for stabilisation recalculation while pitch axis is tilted.
Auirf now is changed to other more powerfull mosfets(same so8 package).Will post name as soon as posible.
And yes,at this time i am doing this project all by myself, therefore is hard to make everything nice and clear.. But if there is interest I would be happy to answer questions.
evvaldis is offline Find More Posts by evvaldis
Old Apr 25, 2013, 03:30 PM
Registered User
Portland, OR, USA
Joined Mar 2010
268 Posts
Thanks for your answers. I was hoping to build something very similar to what you are doing, so maybe I can help out.

How are you combining the gyro and accelerometer data?

Are you planning on adding support for a compass/mag sensor?
Tom Frisch is offline Find More Posts by Tom Frisch
Old Apr 28, 2013, 12:02 PM
Registered User
evvaldis's Avatar
Lithuania
Joined Jan 2007
179 Posts
Quote:
Originally Posted by Tom Frisch View Post
Thanks for your answers. I was hoping to build something very similar to what you are doing, so maybe I can help out.

How are you combining the gyro and accelerometer data?

Are you planning on adding support for a compass/mag sensor?
I am back

gyro/acc is combined with one simple line, something like:
roll_angle =(roll_angle + ROLL*dt) + 0.0002*(acc_roll_angle-roll_angle);
where:
roll_angle - roll horizon in radians.
ROLL - roll gyro data
dt - program loop time (0,002s)
0.0002 - accelerometer "weight" constant
acc_roll_angle - accelerometer horizon in radians.


compass/mag would be nice, but it is not most important thing to do at this time
correctly calibrated gyro drifts few degrees/min or even less, so it is fine even with gyro.
evvaldis is offline Find More Posts by evvaldis
Old Apr 28, 2013, 12:37 PM
Registered User
evvaldis's Avatar
Lithuania
Joined Jan 2007
179 Posts
Updated first post: Added 3axis altium files.
I can post gerbers for iteadstudio if anyone's interested

And if someone has possibility to make pcb's faster than iteadstudio, send me one copy please;D
evvaldis is offline Find More Posts by evvaldis
Old Apr 28, 2013, 04:21 PM
Registered User
evvaldis's Avatar
Lithuania
Joined Jan 2007
179 Posts
Testing new features
EvvGC 3 axis brushless gimbal controller Yaw axis control (0 min 59 sec)

As you can see I added simple potentiometer under yaw axis and connected it to motor shaft.
evvaldis is offline Find More Posts by evvaldis
Last edited by evvaldis; Apr 28, 2013 at 04:54 PM.
Old Apr 28, 2013, 04:48 PM
Audi multa, loquere pauca
Lithuania, Vilnius Region, Vilnius
Joined Apr 2012
122 Posts
Hi evvaldis,
Congratulations on your OpenSource/Hardware project.
I'm just curious, why you use rectangle method as gyroscope integration method on such a powerful machine?
Code:
roll_angle =(roll_angle + ROLL*dt) + 0.0002*(acc_roll_angle-roll_angle);
I think that trapezoidal rule would be slightly better approach.
Code:
roll_angle =(roll_angle + (ROLL+ROLL_PREV)/2*dt) + 0.0002*(acc_roll_angle-roll_angle);
ROLL_PREV = ROLL;
Or you can double gyro sampling speed and use Simpson's rule. Something like that:
Code:
ROLL_TEMP = GetRoll(blabla); // Get the first sample;
ROLL = GetRoll(blabla);      // Get the second sample;
roll_angle =(roll_angle + (ROLL+ROLL_PREV+4*ROLL_TEMP)/6*dt) + 0.0002*(acc_roll_angle-roll_angle);
ROLL_PREV = ROLL;
SVentas is offline Find More Posts by SVentas
Old Apr 28, 2013, 04:51 PM
https://www.facebook.com/group
steadiworkz's Avatar
Joined Feb 2013
250 Posts
Looks very promising ! I wish I could code something like this but i'm only used to java scripting, seems like it would be possible to learn but id needs lots of help
steadiworkz is offline Find More Posts by steadiworkz
Closed Thread


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Discussion Open Source Brushless Gimbal edge0xc Multirotor Electronics 3052 Yesterday 07:13 PM
Idea Open Source Gopro Brushless Gimbal icais Multirotor Talk 16 Mar 28, 2014 12:07 PM
Discussion SkyLight SBG - GoPro 2 Version Released (+ GP3 Beta + 3 axis Alpha) !! ed_jza80 Multirotor Talk 494 Jan 03, 2014 10:09 AM
Sold open source brushless gimbal controller jy0933 Aircraft - Electric - Multirotor (FS/W) 57 Mar 26, 2013 07:02 PM
Sold [closed] open source brushless gimbal controller jy0933 Aircraft - Electric - Multirotor (FS/W) 16 Feb 26, 2013 09:19 AM