Sunday, January 11, 2009

Great Work so far

Great job so far.

I don't think that forgetting to set the pin to an output is causing the problem (I think the atmega turns the pin into an output when it is written to for the first time.)  However, this is the first thing to check!  

I think it turns out the rate of helium leakage is not that bad.  It plumped up just fine as it warmed up and was still at neutral bouyancy on Saturday.  

I will bring in some Vex RC gear for next friday.  

Here is an overview of how the motors are being driven.   



Pin 2

Pin 3

 

LOW

LOW

Shutdown

LOW

HIGH

On Full Forward

HIGH

LOW

On Full Backward

HIGH

HIGH

Assume off?


Now if we want to control the speed of the motor, we need to turn the level on an off very quickly.  This is called pulse width modulation.  Basically, a DC signal would be ON all the time.  A 50/50 signal would be on half the time and off half the time.  By varying the % time that the pulse is on we can vary the speed of the motor. (basically giving the motor little pulses of power.)

To moderate the speed of the motor we will use the following:

Pin 2

Pin 3

 

LOW

LOW

Shutdown

LOW

Analog Level

Forward at % ~to level

HIGH

Analog Level

Forward at % ~to 100% - level


Read the following page on doing analog write on the arduino:

For completeness you should probably also look at these pages:

Change the code so that it uses the analogWrite to drive the motor.
Write a bit of code to ramp the motor from 0 up to 100% over 10 seconds and then ramp it down over 10 seconds.  Look at:

Read through the motor code in the blimpduino source after you do all this and make sure you understand what they are doing.

I am torn about the RC code.  I read through it and they are using two seperate inputs.  They are doing all the right decoding for our transmitter gear, but they are setup for standard RC gear.  Ok, I just bought some RC gear.  It should be here by friday.  

Let me know when you get the motors working and I will set you to work on the servo.

No comments:

Post a Comment