Wednesday, January 09, 2008

Another evenings Details.

I picked up burger king on the way home, I got home at about 6:30. Mariellen (my wife) is still fighting the cold/flu. when she is feeling bad she naps all day. She had already eaten so I finished dinner and watched news at about 7:00.

I really liked the way the lazy susan worked for the rudder so after thinking about it I thought the concept might be useful for pitch and roll. I'm thinking I'll mount the helicopter on top of some kind of post with a ball joint so it can pitch roll and spin. So I start the evening with the McMastercarr website looking for a good ball joint. I find several, they are either 2 weeks lead or in stock in Chicago. (anything in stock in Los Angles is next day even when paying UPS ground charges)

I want to do this this week end so I either pay next day air charges or find a different solution.
I have until Thursday Morning to decide so I go out in the garage open up my Mechanical junk box and start digging. I find the jewel like hand made ball bearing universal joint mounted to an estes D motor with some digital servos. A long ago experiment that I machined up only to discover that the inertia moments for a small rocket mean you need really fast response. Faster than the servos can give. I disassemble this assembly (It was about 20 hours of jewel like machining on the taig CNC mill three years ago.) It looks strong enough, but the range of motion is limited and no rotation. So I keep digging and find a large Rod end with a ball bearing that will be perfect. I just need to get the right kind of spacers and through bolt from Marshals Industrial Hardware Thursday at Lunch. I clean up my mechanical parts mess and go back in the house. Time 8:30. I check up on Mariellen, she is still feeling yucky, but she needs some things at the store. Trip to store return at about 9:00.

Next Stop helicopter software.
The helicopter uses CCPM Cyclic Collective Pitch mixing. What does this mean?
A normal single rotor helicopter has three main controls. The Tail rotor pitch for Yaw or turning left right. Collective pitch for changing the amount of lift. Collective pitch controls the main rotor blade pitch collectively, meaning all the blades increase or decrease pitch together.
The cyclic pitch control for tipping in pitch forward/back, or and roll left/right. Cyclic pitch cyclically changes the blade pitch as it goes around. All of this is transmitted to the rotor blade via the swashplate. The swash moves up and down for collective and tips forward/ back left/right for cyclic control.
The traditional method for controlling the swash is to have separate controls, or actuators for pitch, roll and collective and to mix them together with a mechanical mixing system. Every added linkage ads slop to the controls. The mechanical mixing systems add lots of slop. The acrobatic RC helicopter guys figured out that if you connect the servos directly to the swash plate, with no other linkages, things would be more precise. So they invented CCPM what it really means is that there are three servos spaced evenly around the swash plate at 120 degree intervals. If you want the swash to go straight up for a pure collective move then all three servos have to move straight up. If you want the swash to roll to the left, the rear servo stays still, the left goes down and the right goes up. It you want it to pitch nose up, the rear servo goes down and the left- right servos go up, but by half the amount. cos( 120 degrees/2). All of this is normally handled by some software in the RC transmitter. the way I'm currently flying is to just read the commanded positions and have the computer pass them through without modification. (Other than the rudder where I have compass heading hold working when commanded)

I really want to start working on the pitch, roll and collective controls. So rather than debug my mixing software at the same time as my controls software I split the beast in half. I'll tell the RC transmitter to treat the helicopter like it has mechanical mixing and have the software do the CCPM mixing on the helicopter.

Step 1) Backup ALL the software everywhere into a was_working_1_09_08 directory.

Step 2) remove the helicopter from the Lazy Susan and bring it inside to test.

Step 3) Modify the Telemetry display software so it shows servo pulse positions in counts rather than +/-100%

Step 4 )Run the existing system and record all the servo (right, left, rear) positions for:
Full down and Full up and neutral collective with neutral cyclic.
Full forward, Aft and neutral cyclic with neutral collective.

Step 5)Reprogram the transmitter to not do CCPM. *(requires downloading manual from JR website and reading a few pages)


Step 6)Record the servo count limits for Elevator, Aileron and Collective servos.


Step 7 )put all the numbers from step 4 and 6 into excel and see if the make sense. They do make sense. The scalings all look reasonable and linear.


Step 8) Reconfigure software to store received RC commands from the appropriate channels in Collective, Aileron and Elevator variables.

Step 9 )write code to translate these Collective, Aileron and Elevator variables into servo commands for left, right and rear. (remembering to limit check everything)

Step 10) Test the software.

I finished this at about 10:30, but by this time the helicopter had been running controls and telemetry non stop for 1.5 hours and the status indicators were giving me the controls battery too low indications. I still need to repeat step 4 with the new software to make sure my mapping is correct, but it looks good visually. I'll do that in the morning before I go to work.
It's currently 11:01 another evening gonI e. I have to stay up until the battery is done as I don't leave LiPos on a charger unattended. ( I wrote this entry while the battery was on the charger.)
I also need to go to bed. Its going to be a long day at work Thursday as my business partner and one of by best support engineers are going to CES to gawk at the 150 inch LCD screens.
This means I'll have to do a bit more than normal in both sales support and technical support.

No comments: