Saturday, June 15, 2013

I just returned from the SparkFun 2013 AVC.  It was another interesting experience.
This is my second year competing and I'd hoped I'd learned something. (See 2012 report).
At one level this year was a success I won the doping class rover with over 1100 pts, 2nd place was at 571 pts. I set out to win and I did,  beyond that it was much more painful than I expected it to be.

The format of this years contest differed from last year and my LASER range finder approach would have been problematic. In any case the Trimble BD960 L2 Omnistar  GPS I had from the lunar lander  contest was the perfect instrument to make this contest seem easy....

Last year I ran a red cat racing 1/5 scale buggy and so did last years winner, team 0x27.

This year I decided to bring three vehicles to the event:

  • A full on doping class vehicle done as well as I could with almost no restrictions. 
  • A low cost <$350.00 entry.
  • A plane.   

Insanity is doing the same thing over and over and expecting a different outcome.    Last year I tried to do both a plane and car and failed from having too much on my plate this year I again tried to do too much... I got much farther with the plane than last year, it was very close to ready. I could have successfully done the minimum necessary to complete the task.  The ball drop, and autoland were not ready and hence it could not win, or even place.

So lets back up a couple of months....I'm a pilot from way back. (my Dad ran an Alaskan  bush airline and I've been flying since I was a teenager.) And I love airplanes, my heart was reallyu into building an airplne for the contest and toward that end I developed a custom autopliot board using the same sensors as the 3D robotics APM and a NetBurner MOD5213 for the CPU.    I put together a nice  clean installation in a park zone Extra 300 . One pof the stretch goals was to develop some hardware and software that might eventually become a product.

Picture of the Autopilot in the canopy of the test plane.

I spent about three months working on the code and hardware to make all of this clean and tight in the end I ran out of time. Along the way I tried to use a Q2 Robotics controller I got from kickstarter and getting that to  work correctly ate a whole month and was finally abandoned after I re-cpu-ed it and ran out of time.
I'd hoed to use the controller for both the plane and the cars, in developing an autonomous vehicle its really useful to be able to get real time feedback and to have lots and lots of mode switches. I also liked the four pots allowing one to tune 4 different PID tuning parameters in real time.
Here is a picture of my final version:

In preparing the cars I started by bolting the high end BD960 GPS to last years car and getting it all working.
I also chose a new chassis, a Traxss XO-1 the fastest production RC car on the planet. (I was playing to win)

About this time I decided that since 99% of the work was in the software and since I wanted to run both a leess than $350 class car and a doping class car I chose the same CPU for both. TheCheapShot  got the Netburner SBL2E  Break out board for the CPU. Since this CPU uses a different branch of the NetBurner RTOS environment it meant that the car code was an almost 100% complete re-write. I used the same CPU in a different package for the eventual Doping class car. This CPU  is limited and is made for really low cost network attached device so it presented some challenges:

Here are pictures of the three
The original low cost car.

The Low cost car as run....

The doping class car as it was run

Last years CPU had SDCARD and 64Mb of RAM so logging data was not an issue.
This years CPU did not have either a SD Card or enough RAM to log all data.
So I started using a SparkFun data logger to record data, but it soon became apparent that at 115K baud it just did not keep up.  So I added an Xbee to radio telemetry to the  computer and stay under the $350 cost target.  I eventually ended up with two schemes one using the Xbee on the CheapShot car and one using a
a WIFI router on the Doping car.... as the tiny car was not big enough to carry the router.
So I developed two systems of telemetry encoding and recording... ugly...

On last years CPU I had a really nice system for setting and modifying parameters... without recompiling the code... I ran out of time to port this system to the new CPU so everything was compiled in as code constants.... I should have taken the time to fix this it would have been a win in time and effort, but hindsight is 20/20. In the heat of the process the pain never got bad enough to make me fix this.

I developed a weird trap bug about a week before the contest... I spent three or four days wringing custom diagnostic tools to find my bug   only to find that it was an interrupt priority problem I had two interrupts with exactly the same priority and level and this causes a known bug in the CPU interrupt controller.....

So about two weeks before the contest I had the doping class car hardware finished and it was driving around in my driveway...

At this point it looks pretty good...
It was still missing:

  • Start on a push button.
  • Way to record and enter Waypoints other than by hand.
  • IT was still dependent on the RC transmitter for throttle control.
At this point I started trying to run the  code to the the less than $350 car.
I did not do much S/W development on this car as the low cost GPS was not working well enough to reliably stay in the driveway. I figured that I'd tune and tweak the settings for this car when I got to testing in a larger more open venue.

Its now about a week before the  contest and I go back to working on the plane.
(I also ran a 1/2 Marathon on Sunday the 2nd that I had signed up for before the AVC was on the schedule.)  

I continued to have the plane will be ready fantasy until Wed  morning when the canopy came off in flight and I totaled the primary air frame... 

In the evenings when it was too dark to fly I started working on a mapping app to help me enter way points.
This was my first real QT app and while buggy and incomplete it worked reasonably well...

I left San Diego at noon on June 5th, headed for Boulder.  After 1100 miles we arrived in boulder on the afternoon of the 6th. We went to the boulder reservoir and started driving around the parking lot making sure things were working well.  At this point I had a way to manually enter waypoints overlayed on a telemetry track..and to run the car at fixed throttle without touching the RC transmitter.... 

As the parking lot started to fill up at 5pm it got too crowded to really test the cars... we went on to find our hotel.... I then spent the evening moving the electronics from the tiny fragile car to the less tiny less fragile car for the $350 class.  After that was don I went to the parking lot across from the hotel to do some tuning and testing.....  The GPS precision of the tiny car was so much poorer that the good gps tht it did nto drive very well, I needed to use the magnetic heading and  turn down the response to the GPS errors.

So for the 350 car on Thursday I
  • Moved the electronics
  • Re-calibrated the magnetometer
  • Spend several hours tweaking the steering and tracking gain.

At this point I have both cars driving around the parking lot with the RC receiver still hooked up and taking abort commands...

So back at the hotel ... I do the following...
The contest rules say no communication with the car, so I need to bring a car with no telemetry and no RC receiver to the event. With no telemetry how do I record the position of all the waypoints ?
so I add a system to record specific points into memory using the "Gear" switch on the RC transmitter.

I then go across the parking lot and test this.... The doping class car works just fine, the Low cost car with the pooer GPS and lower GPS rate drives like a drunken sailor.... with an hour or so of loop gain tweaking it pretty much drives the course as programmed.

The one thing I have left to do is to program acceleration and deceleration into the Doping class car... so I take a bunch of data on how hard it accelerates/decelerates.  What speeds it can corner without slipping, how much brake is necessary to decelerate well etc....   given all this data I sit in the parking lot across the street and try to implement this....its all pretty much done when a security guard asks me to leave.
I tell hip its an empty parking lot nd I only need about 10 more minutes. ?he says as he makes his rounds he will be back in 5 min... I have till then...

So I hurry things up and go out to test the car.. in a hurry I put the new code in the car and rushing to get the car tested I drop the RC transmitter on the tailgate of my truck.... while holding the car.  The car goes to 100% throttle... (Over 100mph with this car) so I'm holding a car screaming like a banshee with significant gyro forces trying to tear it out of my hands.   I reach down and slam the throttle stick to full brake.

This is more than the speed control can take an the car, batteries and speed control errupt in flames.
Its now 10:15 pm the day before the race and the car just caught fire.

Back to the hotel room to strip the speed control off of last years car In the spares there is  a similar speed control ..I dissemble the car and install that.
His speed control is wired to a single battery connector and my ole one was wired for dual.. as my list of things to do included moving the battery for better balance I do that at this time too...
The battery voltage changed from 6S to 4S and the speed control changed from Mamba Monster  to Mamba Monster II.   I download the castle creations programming software to the lap top and try to reprogram the speed control into linear mode like the last one.. alas it does not support this mode.
So all the acceleration deceleration mapping data I took is now invalid.

Its midnight I'm out in an empty theater parking lot redoing the acceleration/deceleration curves.
I get this done and test the code.. a few tweaks later the car is running pretty good. Its insanely fast and I'm really happy with the results.   I decide to do one last run takes off really fast, makes the first corner ... turns left accelerates between corners  at the second corner it does not slow down.... it doesn't' turn it just goes straight and disappears from view as it leaves the area of lit parking lot at full speed....

Its now 1:30 am and I'm wandering a huge dark parking lot searching for my car... after about 15 minutes I find it, it hit the curb at speed and the left front shock mount snapped off the bolt holding it on and is dangling loose. The error is mine.. I let the battery that runs the GPS and CPU get too low and the GPS stopped reporting.  I go back to the hotel and dig through my spares.. I brought spares of all the suspension components... except the bolts that hold them together..... I head out to the all night walmart hoping they have bolts....  their bolt selection is really weak and and back at the hotel at 3am I end up stealing screws from other parts of the car to fix the broken parts.   Its 3:30 am I'm getting up at 6:30 to go to the event... I think the car is ready... I still have to strip out the code that listens to the RC receiver... I'll do that in the morning. Much better than last year I get 3 hours of sleep.  (As compared to 0)......

To be continued  I'll cover the day of the race in my next post.


Андрей Кульгин said...

You've done a great job. It's really nice of you to share this experience (especially taking into account the time you've finished it.) I was going to pay for research paper when I came across this post and I got stuck. Only aftre reading it till the end I can leave this page.

Lili Wang said...
This comment has been removed by a blog administrator.
Naveen Chaudhary said...
This comment has been removed by a blog administrator.
Amit Yadav said...
This comment has been removed by a blog administrator.
عبده العمراوى said...

شركة قمة الدقة للخدمات المنزلية
المثالية لتنظيف المنازل
شركة المثالية للتنظيف بالخبر
شركة المثالية للتنظيف بالدمام
شركة المثالية للتنظيف بالاحساء
شركة المثالية للتنظيف بالقطيف
شركة المثالية للتنظيف
شركة مكافحة حشرات براس تنورة
قمة الدقة

elbayt comp said...

شركة فحص فلل بالرياض
عندما تحتاج إلى عملية فحص فلل
جدية وعلى مستوى عالي من الدقة فأن شركة البيت السعيد لـ فحص فلل بالرياض هي المطلوبة ، فمن المعروف أن هناك الكثير من الفلل تتعرض للتلف الشديد سواء كان هذا التلف من الداخل أو من الخارج مما يعمل على تشوه الشكل العام للفيلا فان شركة البيت السعيد لـ فحص فلل بالرياض
هي الحل الامثل
شركة البيت السعيد
شركة فحص فلل بالرياض
اتصلو على شركة فحص فلل بالرياض

شركة فحص فلل بالرياض
او زورو موقعنا على الانترنت

elmarkz com said...

شركة مكافحة و ابادة الحشرات

أصبح اللجوء إلى شركة مكافحة الحشرات من الأمور الأولية التي قد تنتج عن وجود الحشرات والقوارض الضارة في العقار، والتي قد تدخل إلى العقارات من خلال الشبابيك المفتوحة ومن خلال الأبواب أو وجود القمامة في المنزل وتأتي أيضا من البلاعات المفتوحة التي تعتبر منبع الحشرات والقوارض الضارة، فقد توفر افضل شركة رش مبيد بالرياض
العديد من الخدمات المختلفة والمتميزة والتي تتمثل في تنظيف العقار وتعقيمه جيدا والتخلص من الأوساخ الموجودة في الحمامات وتقديم خدمة تنظيف الخزانات أيضا، وهذه الخدمات تقدمها الشركة بأفضل الأسعار الممكنة التي تجعلها تتنافس مع باقي الشركات التي تختص بتقديم نفس الخدمات.
شركة رش مبيد بالرياض للاستفسار عن جميع خدمات اضواء الرياض العزل المائي و العزل الحراري بالرياض ي و عزل اسطح و عزل خزانات و عزل فوم وجميع انواع العوازل و رش مبيد و مكافحة حشرات و تسليك مجاري و كشف تسربات المياه و فحص فلل و صيانة مباني و شركة ترميمات منازل بالرياضو نقل عفش و اثاث بالرياض يرجي الاتصال على 0543578920
او زورو موقعنا على الانترنت

susan said...

Pay for Research Paper service is required to be written by students at the end of each semester and term. They have to be detailed and can be written on several diverse topics from technical, social, scientific to any contemporary issues. When students are required to write research paper they tend to get sharp analytical skills and can write original content. Apart from developing such skills, they learn problem-solving, presenting logical and constructive solutions to several problems. If the student aims to achieve good academic success then he must produce good quality research paper only then can they have a bright future as grades really matter. Pay For Research Paper
live assignment help

Faiza Ashraf said...

The Custom Boxes Print said...

I have read your excellent post. This is a great job. I have enjoyed reading your post the first time.
I want to say thanks for this post. Thank you…
Custom Packaging Boxes USA

Custom Boxes said...

Thank you for sharing an interesting and very useful article.
And let me share an article about health here I believe this is useful. Thank you :)
Custom Boxes