Show Posts
Pages: 1 ... 25 26 [27] 28 29 ... 93
391  Using Arduino / Project Guidance / Re: Quadcopter stabilization algorithm on: December 02, 2012, 12:31:11 pm
That is an example of using all 3 terms, which I am not doing.  See the code below it instead.  I am not using the D term at all.  I have handled the I term differently since dt is a constant.  My algorithm is quite different from the original example as you can see.
392  Using Arduino / Motors, Mechanics, and Power / Re: 28BYJ-48 5-Volt Stepper on: December 02, 2012, 11:35:15 am
Is there Anybody out there... there... there...

I guess you're the only one lardconcepts!
393  Using Arduino / Project Guidance / Re: Quadcopter stabilization algorithm on: December 02, 2012, 11:24:35 am
I appreciate your help!  Let's talk about this.  Without this interaction I'm too close to the project and will miss something.  Talking about it out loud helps me think outside the box and become more creative.  Since dt is about 500ms, the delay is about equal to the total loop time.  In my code I don't use delay, I simplified it here to make it easier to read.  You're right it is a fixed delay.  During experiments I can vary dt by turning Channel 5 on my transmitter.  Once I have chosen a value that works without oscillation, I can make it a constant which seems to work in all situations.  I could measure the total interval it would be about 501ms.  The way it is written without delay, I am actually doing what you said already.  I can tell you are paying attention, because you noticed the problem in my simplified pseudocode. 

I do not use dt anywhere in my calculations.  So I'm confused about that comment.  I don't think lowering dt would help.  Since we're talking about the I term, let's look at the 3rd piece of code in my posting.  Even using 200ms, chg is often 0.  Because the sensor resolution is 1ft.  There is no change for many seconds once it has stabilized.  That's why I count the number of 0's instead of using the magnitude of chg for the I term.  Simply:  If it's moving slowly in the correct direction, don't chg throttle, until it arrives.  I can tweek NZEROSLOW to keep it from oscillating.  Maybe your comments apply to the first piece of code using all 3 PID.  That's just an example showing what I'm NOT doing.
394  Using Arduino / Project Guidance / Re: Quadcopter stabilization algorithm on: December 02, 2012, 09:54:52 am
I'm from Missouri.  Show me?  I'd like to see how yours is different from mine.  Since mine is so short, I'm sure you can offer me some improvements.
395  Community / Exhibition / Gallery / Re: LOL shield maze game on: December 02, 2012, 09:48:21 am
Wonderful code!  I haven't tested it yet but I'm impressed.  I was obsessed with mazes when I was 8 for years.  I'd stick a fork in you if I could.  Well done.
396  Using Arduino / Project Guidance / Re: Battery Pack, individual cell voltage measurement on: December 01, 2012, 11:10:36 pm
You got it Rob!
397  Using Arduino / Motors, Mechanics, and Power / Re: 3 Servos on Arduino Uno on: December 01, 2012, 10:47:11 pm
Do you really mean servos, or Stepper motors?  Servos generally only go about 180 degrees.  The idea is they go from 1 defined angle to another at an arbitrary speed.  Steppers on the other hand can be controlled one step at a time.  You define the speed and angle you want to move to with my library.  There is no limit to the number of revolutions you can move.  If you mean servos it is trivial to move 3 at once.  That is the first decision you must tell us about.  For a catapult, you may consider a sailing winch servo.  This is like a servo but it goes more than 180 degrees to control a string.
398  Community / Exhibition / Gallery / Re: LOL shield maze game on: December 01, 2012, 10:32:06 pm
I clicked your link but I didn't have much time to study the code yet.  How does it make a maze with only one possible solution?  Will it always be difficult, or sometimes trivial to solve?  Do you have to generate the maze manually? 
399  Using Arduino / Project Guidance / Re: Battery Pack, individual cell voltage measurement on: December 01, 2012, 10:22:12 pm
That's what I'm talking about @oric_dan.  You only need 4 banks, and 4 Megas for 0.04v resolution. 
45x2 tiny resistors.  No other hardware.
400  Using Arduino / Project Guidance / Re: Quadcopter stabilization algorithm on: December 01, 2012, 10:14:21 pm
I'm using the BMP085.  Over a short time period it can detect changes of 1-2ft precision.  I'd like to keep it within 10ft of the setpoint, where I activate it.  Using the P term only loop, you have to sample often to keep it stable, between 1-5 samples/sec.  At 2 s/sec it does not change very often when it's stable.  That's why there are so many 0 values in chg.  Instead of looking at the magnitude of chg, I have to count the number of 0's in a row for the I term.  Am I making sense?  Or am I in my own world? 
401  Using Arduino / Project Guidance / Re: Quadcopter stabilization algorithm on: December 01, 2012, 11:27:37 am
Can you tell me why it won't work properly before I make these changes?
Ideas for improvement?
Thanks for taking the time to read it.
402  Using Arduino / Project Guidance / Re: Project feasibility and cost on: December 01, 2012, 11:19:32 am
Sent you a PM about your project.
403  Using Arduino / Project Guidance / Re: Battery Pack, individual cell voltage measurement on: December 01, 2012, 11:13:59 am
If your goal is to maintain the battery's health, I think 0.04 is enough precision.  Accuracy requires calibration.  You will be lucky to get 0.04 anyway even with 0.01 precision.  Do you understand my solution?  No switching is needed within each bank.
404  Using Arduino / Project Guidance / Re: Battery Pack, individual cell voltage measurement on: November 30, 2012, 10:48:11 pm
Let's say you need to measure within 0.08v.  Then make 2 banks of 20.  Put Gnd at one end and measure the total voltage of each point along the way using a simple voltage divider.  20*4v/1024 is about 0.08v.  In this case you need 1k and 15k resistors x45, cheap.  With a Mega there are nearly 20 analog inputs, but darn only 16. 

Let's say you need to measure within 0.04v.  Then make 4 banks of 12.  Put Gnd at one end and measure the total voltage of each point along the way using a simple voltage divider.  12*4v/1024 is about 0.05v.  In this case you need 1k and 9k resistors x45, cheap.  With a Mega there are >12 analog inputs, so no switching is needed!
405  Using Arduino / Project Guidance / Re: What to do with weird IC on: November 30, 2012, 10:29:23 pm
First you obtain an IC, then you try to think of a use for it?  I like the way you think!
Pages: 1 ... 25 26 [27] 28 29 ... 93