Wednesday, November 17, 2010

UGV Autopilot Revisited

We have been working on lots of projects lately, mostly about the UAVs again. Only two hands and all, the last parking lot test that we ran were successful in clear areas. If you just wanted a clear circuit, our simple guidance system was good about being repeatable around 20mph. However, we want to get more in the low end in this, so that we can handle cornering better. The avoidance model is where we are looking for some help.

We are trying to get a working optical flow system to work at these speeds. You can get a working system at low frame rates, but we will need to increase our computing capacity to get it to work successfully at these speeds. Our issue we think, is in the matrix inversions. The determinant terms are making too many things blow up by divisions of small numbers. 

We are looking for anyone with experience getting an effective Kalman filter to work on Android. We have a few older phones, bhat we think would be a good platform for doing 2d control. Yes, I am mixing discussions a bit. If we can better estimate the net acceleration, it would help debug our optical flow system. We are having to bracket our responses so that the AI does not jerk the wheel. This seems to be an  issue. If optical flow can be used to manage the jerk, I think that we can even have moving obstacles in the scene and still reacquire the path with no issue.

It seems to be that the vectors estimated with Kalman divides by zero and runs a huge acceleration and that ruins the math for several iterations. Then the ringing dies out and the system cam go on, by that time we are either running for the hills because a dog liked the truck or because something blew across the scene. I have to find the math error. 

Contour 1080p HD helmet cam

So far so good with the helmet cam. We have been playing with its high frequency stabilization technology. This is pretty effective at taking the jelly and jam out of the motor shakes. Which is a good sign, it is effective at taking out suspension bob when riding a bike, but low frequency motion it can only do so much with. If you move the camera 3" it can't take the shake out of that. You would not really expect it to.

At night, or in low-light conditions it gives a pretty good picture until it is hard to see. Once you break that threshold it is too dim as well. It does have a pretty good sensor, it can pick up even small changes in brightness well and does well with edges.

At the moment, I have yet to get virtual dub to open a quicktime movie. None of the plugins that have been found work. Although I am loathe to say it, it may be better to just go the Quicktime Pro route. Legendary fail of customer support is always a reason why Mr. Jobs' overpriced fanboi kit rarely graces my workspace. It may be a necessary evil this time. Especially, if it can automatically export all of the movie's frames in one drop.

I am not done testing the camera, but so far I recommend it. For the money, it is very usable, rugged and has a functional output that is good for tv viewing. Reliving past exploits are always a great way to kill  time while you lie to yourself about  how good you were.

Wednesday, October 27, 2010

Countour HD Helmet Cam

We are looking into using the Contour HD helmet cam as the data source for some GIS experiments. After a detailed review of available products, we found the Contour. It is a well-received  and rugged helmet cam aimed at mountain biking and snowboarding. Out of the box, it is a well built camera with an interesting rubberized back cover that gives access to the battery and the memory card in one flip of the thumb.

I will see about posting the movies that were shot with the camera. The output is a QuickTime movie, that we will feed to virtual dub. Virtualdub will strip the frames out of the movie so that we can analyze frames to look for patterns in the vegetation. The goal is to make a semi-automated habitat estimator and/or plant specie histogram.

As my batteries run low at dinner, I promise more interesting things to come.

Sunday, August 1, 2010

Can't Get It Up?

Hey it happens to everyone...

No little blue pills, but a rainy afternoon is keeping us from seeing how the wings sit in the mount. There is a bit of concern that the lovely tolerance that made the spars so easy to insert, is making life hard for other reasons. It will not be an issue. As long as the system is stiff once it is bolted together. There is some concern that the foam may crush under side-load. That could be fixed but I do not see a good solution that will work.

The fix if necessary is a wing root cap. That is probably a good idea under most circumstances. However, what could it hold to? The thing that was great about the design was that it had little in the way of internal structure, it is foam after all. That may be limiting the usable weight in the end because you cannot make strong mounts between primary parts.

We will see. At the moment I cam going to see if 0.060" piece of Aluminum sheet will tip the system in the right direction. It may need more like 0.090"  to correct the wing tip height. I can't see that until it stops raining enough to take it outside and measure it. Ten foot wingspan makes it problematic to measure in the house. Oh yeah, it is being built in a 900ft^2 apartment that I live in at the same time. It is a good drill for the initial facilities that I will have in CZ. I will dream of the day of such a large place.

More to come...

Sunday, July 25, 2010

Lifting Bodies Are More Than Just Another Pretty Shape - Opinions on Aircraft Design

Lifting Bodies Are More Than Just Another Pretty  Shape - Opinions on Aircraft Design

There are many ways to look at aircraft design. Most of which are field dependent, why design for supersonic flight if your device will never climb above 500'? It would be cool thought, right? I digress, if you are designing for normal flight regimes you will be operating at an altitude with an engine power curve which will vary by altitude and temperature. Now, if you are designing in other regimes, you need to know where you can get small performance boosts where they are available.

Managing wing thicknesses is and use the concept of "wing tip thrust". By making tip vortices more manageable there is a significant reduction in overall wing drag. This "free" reduction in drag is called "wing tip thrust". Like this, there is another simple idea to take into account. If you can design a fuselage that is not pressurized with an essentially flat belly, you can play some shape games. These shape games can effectively make a Clark-Y airfoil. Now it is more complicated than this, but if you begin your mental experiments from this perspective, you can eek out some under-represented performance.

But how do he do it? It is all in the magic. If lift is generated by circulation of a lift envelope, that is created by the difference in pressure created by fluid moving around a shape. Why not generate lift around your fuselage? It will not get you 25% of your lift... but if your fuselage planform area is 15% of your wing area and you can get 40% efficient lift out of minding your p's and q's you could be looking at 6% more total lift. Yeah, you are right, this is all pie in the sky stuff. However, if you could generate 2-3% more lift for the length of your flight, you could reduce the angle of attack on your wings and trim out your drag. Reducing your drag means that you use less energy in the case of electric or less fuel in the engine.

Less fuel means that you can carry more, or fly farther. Nice. 1-2% may not be a lot if you weigh 4oz. . However, if you are looking at varying wind conditions or being able to react to changing conditions and you can play some games about fuselage profiles. Why not, it is not really so hard to get as much as 5-6% out of playing your profiles against each other. That makes for a good amount more flight time in rc. Not the 7min guys, but as you go for 20min... you get 21min. Yeah, it does not sound like much, but if it makes your fun go for 22min... It will be worth it.

Why do I pick Clark-Y? They have flat bottoms, reasonable thickness and a fast taper to the trailing edge. Construction-wise they are easy to construct, because you can lay them on a table. Their CL/alpha is pretty steep, so 1-2deg can get you something and if you can play with what level is, you can get a fuselage angle of attack to a point where you can make some dividends. Most importantly is that they do not separate their boundary layer fast. Most designs will never get to a critical angle of attack, drag will eat you alive if you fly your fuselage at such a high angle of attack.

We make lots of 60" fuselages these days with a mean 12" beam. That gets us an additional 4-5lbs of lift at take off and 1-2 lbs at cruise. Nothing to write home about, NASA will never give me a Ph.D. for it, but it does get me lots of "clever"s and "I would not have thought of that"s. Pretty high praise in engineering circles.

Saturday, July 24, 2010

Fuselage Design Schemes - Vertical Tails do not Make Your Ass End Look Better

Lots of things cross my mind when I start putting pen to paper on a new fuselage. Mostly, it is about needs to go inside, and then how to build it. Over the last few generations of this design, it has become clear that slow-speed, heavy lift (payload/fuselage <0.7) We start to see several key principles begin to precipitate. Today we will focus on the differences in aircraft balance schemes.

Aesthetically, I am not a vertical tail man. They are functional and in many designs they are necessary. My career began in the low-observability sphere. So a large perpendicular plate nailed to the end of your vehicle who is trying to hide invites bigger radar returns. In most of my training and experience, we get away from this with large sweep angle wings and oblique surfaces. Sometimes, these choices do impact performance. If you are working against sines of the angle, you will always have more surface area to get the same net effect.

Balancing the vertical surface weight and the total surface area is always a game. If you look through Jane's for modern high performance, low-observable aircraft, you will see a common theme of split tails. Two tails, let a designer get a net effect and still not have a large single vertical surface. Ok, yeah it weighs more sometimes this is necessary and even suggested.

These principles are not necessarily limited to high-performance  aircraft. Just trying to keep the sail-area down on the aircraft is important. Otherwise it is blown all over the sky like a potato chip in a hurricane. If you are trying to make a vehicle that can stay on station it is easy to fly a slow  constant angular speed turn with a bit of roll angle, rather than balancing a lot of rudder input and trying to fight the wind the whole time and flying search patterns. Sweep angle also lets designers move the center of pressure around for the wing alowing for different internal position management of work payloads.

Many designs on which I have worked use low angle wing tips instead of a vertical tail. Highy-swept low speed wings get most of their roll control from the wing sweep and large ailerons or spoilerons are goos at helping with pitch contro. One interesting solution is coined a "duckeron". I cannot vouch for the scientific nature of the name. A "duckeron" or even a "quackeron" is a surface that consists of a pair of  tip-mounted surfaces at the far end of each aieron. These surfaces open and increase the drag on the wing tip. This is a bit counter intuitive, unike spoilers which run along the span of the wing these are actuay on the trailing edge of the wing and allow for effective yaw control. Sweep helps increase the distance between the wing tip and the aircraft center of gravity. This is the moment arm distance used to calculate the force applied to yaw the aircraft.

It is a pretty clever idea and allows for reduced cross-section yaw control. On rc models and small UAVs the duckeron is a simple single-servo-per-side solution. Rather than only connecting a single surface to the servo arm, you use a pair of rods. As the arm swings pushing the rods away from the hing line opening the surfaces equally. However if there is a clearance issue, the ratio of the opening rates can be changed via a cam or simply varying the lengths of the rods. A shorter rod needs more arm sweep to move the surface through a given range. The air disruption over the wing would make the use of a spoiler less effective. There could be several reasons to use spoilers and ducks at the same time for different flight control cases.

You do have to take into account that the drag at the tip may be an unplanned load on your wing spar. One other kind of side-benefit of using ducks is that they act as airbrakes during landing, even as a counter-balancing yaw force during approach. As a counter-balance on approach you would pay a much steeper drag penalty than a rudder, but they woud be able to apply a much larger yaw force.

Touching Pee-pees in the Dark and Adventures in Airplane Bonding

Our first really big pane is about to come off of the line. I guess it is easy to see that I was slacking. Not really, just got side-lined by a bunch of stuff.

Today, I wanted to talk about the bonding experiences. We are pretty good with the cheap and cheerful 60min and 90min epoxies available from Loctite. In general, they are worthy of their cost. For the most part:

  •  they get it done
  •  are easy to clean
  • decent finish that is sandable, but micro-balloons help immensely
  • and wet chemistry does not rip the skin off of your hands
 The other side of the coin is that :

  • they are not super hard
  •  sometimes leave a sticky surface which needs hand washing a bunch of times to get the surface clean
  • cheap means heavy
  • in the warm, humid air of Florida sometimes the pot runs really fast.
It is exciting to see it melt through two cups and run epoxy all over your surface and drip down your leg. The steam is cute on a  100% humidity afternoon. Around here, it is not uncommon to see rising off of your sneakers, but it is exciting to see rising off of your freshly-laid skin. It still burns your skin ... boiling water is hot... If the cup gets to be hot to the touch, or the epoxy runs really fast then you only have a few more minutes before the epoxy fixes.

We have some other adhesives and layup chemistries used by the "pros". Ok, yikes. There are enough flames, warning symbols and ventilation requirements that we honesty did not have the facilities to use them. However, some basic tests show that the stuff from Aircraft Spruce is really hard and easy to sand. It stuck to everything , was hard to get off of skin, and 10:4 is not an easy ratio to eyeball. So it needs a scale and  a fan to pull air away. I can only say it must be best with vacuum-bagged molds and infusion systems.

I would suggest using either, just know what you are getting into. With any bonding system, rough your bond area with steel wool, clean your area with a clean cloth and alcohol. Cleaning with alcohol is to pick up any grease, dust, grime and hair. Test your bond between scrap pieces of material.

Wednesday, July 14, 2010

Cool New Stuff At Our Zazzle Shop

Every drop helps the cause.

Thank you for your support.


make custom gifts at Zazzle

Monday, June 21, 2010

Hairspray Trick Addendum

If you are reading more about using hairspray to pre-wet rc models before they are glasses...

This works great with balsa models. It seems to be a pretty reproducible effect on wood because the wood absorbs some of the hairspray. The wood keeps the spray wetter so it does not dry out as fast. Fast forward to a foam model. Foam does not absorb any liquid, relatively speaking. Raw hairspray dries really quickly. This is a problem, we have found in many wrecked sets of cloth that if the hairspray polymerizes past a certain (not discussed in this article) point, the epoxy will not wet the surface.

What it does do is bunch up the glass when you spread the resin. Pretty quickly you can see that something is wrong because it just does not behave. You cannot straighten out the new wrinkles fast enough to get in front of it. The weight of the resin does not hold down the old wrinkles,and you make a mess. If this starts happening, we just yank off the damaged glass and toss it. Yeah, it seems wrong at the time, but we have no idea how to clean it. Always looking for hints on that one.

After the glass is tossed, we roller the wet surface of the model to spread the remnant epoxy. That is just to help fill in a pockets or spread any runs. It just air-dries after that, just leave it. When it is dry, remeasure your glass and do it again.

All in all, the hairspray trick rocks, on wooden models. Not so good on foamies.

Remember try to do your epoxy work in warm or hot conditions at the lowest allowable humidities. Yesterday, a thunderstorm snuck up on us and we had a very energetic pot of Loctite 60min epoxy. It fumed and melted several  plastic cups and unbound the wax on a paper coffee cup in the span of 1min. Finally, it melted several plastic shopping bags while we ran cold water over it.

Basic chemistry class says, take the heat away from exothermic (heat generating) reactions to slow or reduce them. Live with a chemist and you know these things.

Tuesday, May 18, 2010

Practical Composites: Fiberglass Over Wood

We are putting together some good pieces for everyone see how we are doing it. The big tip that we can tell everyone is hair spray. It is too funny to think of either of us ever sing hairspray. One has been bald for half of his life, and I have never been a big coiffure kind of guy.

The pictures that I am including are of a model that is 57" (143cm) x 6" (15cm)  wide and 4" (10cm) tall.


The glass sued is standard s-glass, 2oz per yd glass from Aircraft Spruce . Our experience shows for fuselages, two plies is more than enough for fuselages. Make sure that your plies are pig enough to cover all of the piece and hang over about an inch (2-3cm). More than that makes it hard to support the piece, the fabric keeps pulling away from the edge  or it gets tangled.

Apply the hairspray liberally to wet the surface of the cloth, then use a foam roller to spread the spray and wet all of the glass. It takes a few minutes to work the whole surface. When it dries, it will feel more like paper than silk.

Having learned the hard way. You can let these dry for 15min or so, until they are not tacky to touch. However, do NOT let them dry for lunch and a trip to the hobby shop. The hair spray dries too much and coats the glass so that the resin does not stick. That is bad, it will just wreck your finish and everything will look all orange peel or like bubble city.

I hope this helps with your projects.

Sunday, May 2, 2010

Czech Book

Hey everyone,

I have been getting a lot of requests recently about my book that I wrote in Czech about life in Central and Eastern Europe. I have been posting it piecewise on my other blog "So Little Timehere.It has received many positive reviews and some libel, you can't win them all. If you want it in a more complete book-like form, let me know.


The Big Babies

We are about to go flying! I hope within the month we are airborne with ten pounds of dead weight. It is a big day. After several years, we are turning the corner. It was not easy, and I would like to thank my folks and friends for sticking with me. Inventorship is far from an easy process. Now it is time to give birth to revenue ;)

In order to continue a beloved American tradition, each of our factory Big Babies will have unique nose art. I have been drawing for months to get this many pictures together. I am sure if you know me and the project, you probably know each of them. So I will not spend much time explaining them, I hope that everyone likes them. I have shirts available on the cafe press site. I think that they really bring out the smile in me when I talk about the planes, or the women who inspired them.

Sunday, April 25, 2010

More building on a budget tips

I have been speaking with many people recently about how they build their uav's and larger-scale working aircraft. We were going down the balsa road, which is not so bad. It makes a pretty stiff structure with relatively inexpensive materials. However balsa is graded and strong, light wood is not easy to find nor is it cheap. You can easily run up $300-500/board foot. That is a lot of balsa, I know especially in 3" strips. However, you get the idea that this is not a cheap way to go.

We have been using kiln stabilized wood and it is making a decent product. There have been some issues balancing the stresses in the airframe. Traditional methods more or less work to relax them. My consultations with other people in the community leads me to believe that there may be better construction techniques. The system that we have uses balsa and then fiber glass on top. Our main issue is that balsa takes so long to lay up. To do a good job, it could take upwards of 3-4 weeks of concerted effort to get everything pinned and glued, sanded and filled, sealed and prepped. It is a big job, especially on bigger models with large spans.

OMG the twist, you will make lots of little weights and hooks to untwist your larger pieces as well. In some ways it is a terrifying process for the beginner. It is not hard to do, it can be terrible to do well.Blah blah, no whining. The others use mostly styrofoam cores covered in composites. I have been experimenting this weekend with it too. I have found that you can have a pretty good product with almost no invested time. My realization is that the cheap epoxies available from the hardware store, are easy to handle, water washable, but are way to soft-cured. For these applications, an epoxy chemistry that cures with a hard surface is better than a softer one.

I assume that epoxy chemistries with harder fixing strengths are less easy to handle. We have made several layups and this really is the case. In Florida, it is hard to get away from the humidity and large swings in it. So we lay up outside and bring the layups inside the air-conditioned house. That seems to help even out the handling properties.

The following pictures are using LocTite 60min cure epoxy, 80 oz./yd glass cloth and 3mm depron foam. There are many relief cuts in the foam to help conform to the shape of the fuselage. The pieces are masking taped together, a foam-safe CA glue would work too, but I was trying to limit the number of seams that needed to be joined. Most of the tape is to enforce the shape of the fuselage, not to hold the piece together. Both halves of the fuselage took about 2h to sheet and the glassing took about 20min for one person. It is not perfect, but it is an experiment. My illustrious helpers would assist on the final version for sure.

This model is about 5' (150cm) long and averages 6" (15cm) in diameter.

Sunday, April 11, 2010

Building on a Budget

So we are working out our system to build giant-scale planes on a budget. We build mostly our own designs. It is far more challenging to wing it. I have to say that building from forms is pretty challenging, and worth it for those of you who like to do it their way.

One suggestion that I have for you guys is, lattice. Maybe that is not an obvious description. We have the most luck building complicated curvatures, when we lay out a regularly spaced net of 1/16th inch (1.5mm) balsa strips x 1/4" (6mm) . The spacing is what ever makes sense for the model. I mean, you will need to work out some of this for yourself. We find that wings are good with 6"(15cm) pieces cord-wise and 20- 25% spacings span-wise. That way there is a reasonable pitch and still a good amount of coverage. Onto this, you glue your actual skin down.  This helps reduce the actual curvatures involved, but also allows for the skin to be supported without the need of a foam internal block. Use wood glue if you are working on a Styrofoam base or CA if you are working on a compatible base. CA will eat Styrofoam, even the vapors will destroy it.

We get all of our balsa from local suppliers. Our favorite supplier is .

Thursday, April 8, 2010

Trip to the SPIE Defense Sensing Show

I went to the SPIE Defense Sensing Conference this week. It was a nicely arranged affair in the Marriot World Center in Orlando. They insisted that you park several miles away and use one of the shuttle buses to get to the conference, that worked out well. The buses were often enough that you were not forced to wait forever to go either way and they gave you granola bars and water for the trouble. Don't they know, engineers get bagels, factories get doughnuts? You can't make them think...

After perusing the technical book area, which was pretty well stocked with an array of SPIE documents and textbooks,, if you had the cash. I was pretty interested in their IR and Spectroscopy handbooks, but they were pricey. If anyone has a heart, I would gladly accept a torrent or a photocopy :)

We spoke with several vendors in the cavernous exhibition area. It was clear that in many ways we were just not up to the task of doing business there. I also noticed that people feeding out of the government trough were particularly mislead in the value of things. How can someone in good faith try to sell tank windows to a normal person? Especially when they cost $30k+ to start in bulk. We saw some neat optics stuff. To be honest, I was not even sure what you did with it. Even as slowly as we fly, a FLIR with 300 lines, 90deg range and 30Hz is going to be hard to use unless the goal is just to get an image.

All in all, a good trip. A little humility is a good thing.

Thursday, April 1, 2010

Big Baby Developments... Daddy's Building a Brand New Plane

I am not ready to reveal the Big Baby just yet. It is going pretty well, symmetric and no smeared blood or anything. No blood this late in a project is a big relief.

The airframe for the next version will be a bit different. This time, I was careful to build the skin by wetting and pinning the skin to as closely as possible match the model curvature. Besides the 10s of pins that were used, the technique was pretty effective. 

Use masking tape along the down side of the board so that there is a basic joint between the pieces. Then just use a wet sponge to wet the downside of each of the planks. Lay the plank onto the surface of the model to be copied. Work from one end and pin along the edge every inch or so about a 1/10th of an inch from the edge each time. Do this for one inch rows along the plank. Depending on the curvature being copied you may need more pins or to pin in specific directions to keep the balsa layer in contact with the curve.

After the part has dried, overnight or after a few hours, adjust the pins to fit the planks as closely as possible to the curve. The planks may have to be rewetted to relax them into place. Then use a foam-safe (in my case) glue in the joints. The tape will be removed before you install internal structure. Once it is dried and the seams are glued. You will want to remove the pins and the part from the form. I cut simple cross-sections to support the structure. Then used CA glue to glue the seams and to bond the internal structure to the skin.

Sunday, March 21, 2010

Big Baby Advanced Practical Composite Airframe

Now that we have finished with the basic calculations, we have determined our best shot at a low cost, practical airframe was to support the balsa with glass and later kevlar composites. Our plan is to use 4 layers of 2oz glass for the fuselage. That should give us more than enough structure for 3g in a 20# aircraft.

We are trying to make a new version of the rail system for the engines. That will make it easier to package and ship. Our goal is to be under 80oz for the airframe and under ten pounds for the aircraft without instrumentation. Which is great, to get more than five pounds of usable payload.

More Practical Composites

After several weeks of analysis, I came to the conclusion that using a glass or carbon fiber reinforced balsa composite is one of the best ways for us to get the weight out. Our other attempts were plagued with uneven resin densities. We have good luck matching allowables for 2-4 layer lay ups, beyond 5-6 layers we start to diverge pretty badly.

The best results that we have seen is with 60min epoxy and making sure that each layer is well wrung out before it is let cure at normal room temperature, 77F. As the humidity goes over 80% the pots react differently. The biggest issue for the divergence we think is the number of pots of epoxy used. Something happens with the weight and density between the pots.

Make sure that when your layups are done that you have at least a 2-3 layer pot. If you need a much thicker lay up, I would make sure that you make enough for everything. Also it is an issue with the humidity in the room. Do not add alcohol to the resin when you mix in the hardener. If the mixture is missed, it will just ruin the pot. At worst, it will react exothermically and create large amounts of bubbles both make a mess of the part.

Sunday, February 7, 2010

Coding a HWIL module

It has become a requirement to be able to detect issues with missions by rerunning the logs while the robot is on the bench. This turns out to be bigger than I thought it would be. What I really had to do, was rewrite my logger so that it did a better job simplifying the xml that was being produced.

interface kit 0 not attached
interface kit 1 not attached
< Message time="0" Received="10" Body="" />
< Message time="0" Received="10" Body="" />
< StateMessage:IMessage,ISerializable time="12" Received="12" >< taskManagerState RxQueueLength="0" QueuableCommandsMissed="0" QueuableCommandsMissedTotal="0" time="12" OverrideWaterMark="0" MessagesReceived="12" MessagesSent="12" MessagesNull="0" histo0="0" histo1="3" histo2="0" histo3="0" histo4="0" histo5="0" histo6="1" histo7="0" histo8="1" histo9="7" histo10="1" /> < /StateMessage:IMessage,ISerializable>

What I needed to do was to check the logged item first before it was logged and check to see if it was an entry itself. This was just to keep the number of recursive loops to a minimum. The default XML reader is easy to use if the entry just has values. It is also just easier if nested records were not necessary to wrestle with.

It has become a requirement to be able to detect issues with missions by rerunning the logs while the robot is on the bench. This turns out to be bigger than I thought it would be. What I really had to do, was rewrite my logger so that it did a better job simplifying the xml that was being produced.

interface kit 0 not attached
interface kit 1 not attached
< Message time="0" Received="10" Body="" />
< Message time="0" Received="10" Body="" />
< StateMessage:IMessage,ISerializable time="12" Received="12" >< taskManagerState RxQueueLength="0" QueuableCommandsMissed="0" QueuableCommandsMissedTotal="0" time="12" OverrideWaterMark="0" MessagesReceived="12" MessagesSent="12" MessagesNull="0" histo0="0" histo1="3" histo2="0" histo3="0" histo4="0" histo5="0" histo6="1" histo7="0" histo8="1" histo9="7" histo10="1" /> < /StateMessage:IMessage,ISerializable>

Ok, now that a reasonable data format is available, let's make a factory that can take the XML data and create messages s that they are in the same form as those created by the system. I built a simple Command pattern system that is configured in my normal configuration files. So if it is a normal mission, it will play normally. If the configuration is to rerun an existing log file, it has the path to the log file to read and whether the mission should begin immediately or with some wait period between completing reading the log and beginning the mission.

Most of the time, I find that it is reasonable to ask for a key input before starting the execution of the HWIL test. Nothing like a 30# car scooting across the table when you are not ready. Make sure that the robot is strapped down, sometimes it is more kinetic than was planned.

Now that we have the robot strapped down to a raised dais, we can hit enter and let it run the run. I made this a simple list of Commands following the pattern and a timer. The invoker checks at each timer tick and executes all of the commands that were logged at that time during the normal run.

I had to make simple ICommands that had a hook member and an execute. The invoker is hooked to the timer and I hooked the commands to the TaskManager. That way the Execute() method, just created a proper IMessage and delivered it directly to the TaskManager. It also makes it so that you can rewind the commands. This method has allowed me to find some linkage issues that would have been hard to find other ways. There are some hysteresis issues with any mechanical system, I was not prepared for the number that were found.

"...But knowing is half of the battle..."

Monday, February 1, 2010

The PhidgetsException #9

For the most part, I really like Phidgets. They are good simple equipment that is inexpensive and just works. That is a trick in my experience in the current robotics technology playing field. Their API is the best I have seen and I have to say does a nice job even if you want to write in c# or flash. Yeah, Flash is supported.

So I was happily banging away at my control code to manage these servos. I kept seeing that the code was running. I sent lots and lots of new servo locations to the servos and it just did not move the servos. After some investigation into my logs and trapping lots of PhidgetExceptions. I figured out what the issue was. Like a good little OOP'er I had contained my reading of the Advanced Servo Controller 8 port's properties in an object and then a different handles the executions. Here in lay the problem, the properties of a given servo such as velocity which has no setter (mistake in the documentation) are not exposed until the motor is in engaged.

So I wrote the following code to fix that. These are not threadsafe, you have to make sure that you are not engaged at the wrong time. It will make all kinds of wacky stuff happen.

Viewing code:

public double GetServoPosition(int servoIndex)
double position=-1;
AdvancedServoServo ass=null;
}catch(Exception exc)
throw new Exception(className+" public double GetServoPosition( "+ servoIndex+" ) :: "+exc.Message);
return position;

Motion code:

/// move a servo to a new position

/// index of the servo to move /// new position, should be 0-100 /// bool if the servo is now in the correct position
public bool MoveServo(int ServoIndex, int newpos)
bool movedOk = false;
AdvancedServoServo curr = null;

double pos = 0.01 * newpos * (basicServoMax - basicServoMin) + basicServoMin;

if (pos > basicServoMax){pos = basicServoMax - 1;}
if (pos < basicServoMin){pos = basicServoMin + 1;} if (aServo0.Attached && ServoIndex<4) { curr = aServo0.servos[ServoIndex]; } if (aServo1.Attached && ServoIndex > 3)
curr = aServo0.servos[ServoIndex];

if (curr != null)
curr.Engaged = true;
if (Math.Abs((curr.Position - pos) / curr.Position) > 0.03)

curr.Position = pos;

//disengage the servo when we are not moving it
curr.Engaged = false;
catch (Exception exc)
if (LogEvent != null)
LogEvent(className + " public bool MoveServo( " + ServoIndex + " , " + newpos + ") :: " +
exc.Message + "\n", false);
throw new Exception(className + " public bool MoveServo( " + ServoIndex + " , " + newpos +
") :: " +
exc.Message + "\n");
return movedOk;
} //MoveServo
Servo reset code:

/// try to reset the servo, when it throws phidgets exceptions, set it to a safe midpoint

/// servo to reset void resetServo(AdvancedServoServo srvo)
srvo.Engaged = true;
double midpoint = (basicServoMax - basicServoMin) / 2 + basicServoMin;
srvo.Acceleration = 1000;
srvo.Position =midpoint;
srvo.Engaged = false;

}catch(Exception exc)
LogEvent(className + " void resetServo(AdvancedServoServo) :: "+exc.Message, false);

Another thing, that you have to make sure that you consider is that there are hard to document dead zones in each servo. They are sometimes inherent to the servo design, but each servo can have multiple in different places. I would make sure that if you hear this tell-tale clicking sound when the motor tries to move to the right place and then corrects ad nauseum... that you trap this in your code. My experience is that this burns up your motor pretty quickly. These are toy or better than toy motors. Better motors are available but are more expensive.

Friday, January 1, 2010

Electric Conversion of a King Motors (HPI Baja 5B)

Another interesting project for us is the electric conversion of a King Motors KSRC-002. Ours was bought from Heat Hobby of Miami, FL. Out of the box, the only thing that needed to be assembled was the spoiler. Thankfully, we won't be using it. Inspecting the role cage and the transmission shaft we found some rust. This is not really a nice thing to find on your brand new model. Oh well, it will probably get replaced. Since this is an electric conversion, the first thing that I did was hop onto every HPI forum and King Motors discussion that I could find.

Several guys are using huge current setups, 200A or more. That may be necessary, we will see. I do not think they were using as many cells in serial as we intend to. Our plan is to run 9s2p or 9s3p, we also only want to be able to dash. the conversion we are running will be about getting it set up, and then moving toward the longest running build possible. Out of the box, we can see a bunch of things that do not make sense in a racing vehicle. Ok, probably not a race ready device out of the factory.

Why would you use 0.125" (3mm) steel as your chassis? Cars do not use 3mm of steel in many structural places. It can hold up with a person standing on it. One of our first projects will be to replace the chassis with an Aluminum one. This should take out about 2lbs (1kg) without any stress. Another interesting choice, which is clearly about cost is the roll cage mounts that are plastic. It is my opinion that the plastic knuckles are where the cage breaks not the quarter-inch (6mm) steel tubing. Which was also poorly finished and rusted in one of the welded joints. If King Motors reads this, please do some inspection of the parts before they leave the factory.

The fuel tank was pulled out along with the engine. a few bolts and it removed cleanly. Next time, why bother buying a full setup, go roller chassis. Forum after forum said the FM radio that they ship with it sucks. I have to say that we did have some interference on our little test stand. I could see where this would be an issue. So I yanked it out and replaced it with a composite capable 6ch Spektrum unit which we use in our planes. It is a great 2.4GHz DSM-2 radio. There are two-channel versions if you prefer.

The throttle servo and steering servos are crap, but useable. One part that is a bit challenging was the clutch. Not the clutch bell, but the clutch on the drive flywheel. Several places lauded designs that keep it in, noting that the clutch helps reduce the biting nature of the electric motors' torque curve. Anything to keep the wheels hooked up is better. Just make sure that you put the pin in first, othwerise you cannot get it through the hole with the shoe. You will need a piece of wire to go through the eye on the pin and above the retaining plate to keep the pin from falling through the hole. It is not hard to fix, but it is annoying.

The steering servo was replaced with a nice metal-bearing quarter scale unit. Our HB unit is faster, digital and stronger than the factory version. There is no reason not to use digital anymore, I hear that there were some issues in the beginning.

The catch with this that we found. The drive pinion that you need is a 1.5 mod. Yes, 1.5mod, the stock that came with our bell housing is a 17t. I contacted my normal strange parts connection at Impakt/Tekno RC. They are always awesome. They said that they did not have the parts in the scale, and directed me over to Monster RC. This is a reason, that I always go to them first. Customer service is not only helping them on your site, but helping them get what they need. Following their suggestion, I went over to RC Monster. They had the a selection of 1.5 mod gears. I emailed Mike at RC Monster, he responded quickly and said which parts that I needed. Again, great customer service, you can get 1.5 mod gears in a bunch of sizes from 12t-22t. They are cut for 8mm shafts, so pick up the reducers as well. RC Monster shipped my order the same day.

Adventures in Composites

The big thing that we learned in this episode is how to manage holes or penetrations. We made a male mold and were trying to decide how to mark and spot where we wanted to make penetrations called for in the fuselage.Marking the fabric was not particularly accurate, but it did work. The real answer that we saw was to make a potrusion where the penetration was.

It is easier to cut off a piece that sticks out past the piece that you want than it is to dig out material where you do not want it. Our design has four or so penetrations into the fuselage. Additional wedges of blue insulation were hacked to fit into the holes. They were not made to perfectly match, but were close. So you could easily see what you wanted to keep and cut.

Another interesting thing that we learned was the relative softness of home-owner classes of epoxy. Be aware of this. Y, is that any feature that looks liou can make a mess of your piece if you heat it too much to melt the wax. You have to pull the piece free form the molds and set them back down once the part is free. Putting it back down to the mold really helped the part retain its shape. As we pulled our parts off, we were concerned that they would not be square when we put the parts back together.

Due to some communications issues, there were some delaminations in areas that would have been better had they not occured. These anomalies were healed by forcing a needle into the void and using a syringe to fill it with epoxy. Epoxy is viscous, be aware that it is tough to dispense through a narrow needle. Voids were filled until it appeared to be full visually, pockets were no longer hollow appearing.

Molds seem to be effected strongly by Murphy's Law. Everything that could have gone wrong with our parts did. Our shape has several bays. Bays are hollows where square sides would be best. The bay that we took the time to box in with plywood came out well. The bays that had no boxing in had delaminations and other issues such as corner delaminations, non-square lay ups and twists where pieces hung on something and were not carefully managed back into place. In a bay, is the only area that we had any mold damage. It was due to pieces of cloth almost wrapping a narrow piece of mold. Had it been boxed in, the pieces would not have been able to wrap the way they did and pin the mold into place. This damage was minimal and was fixed with filling the cracks with glue and for the most part was a non-issue.