Friday, August 3, 2012

Never Say Never - The RC Arduino Library

I always told myself I would never write an Arduino library but after looking at the assembly code of some of my recent projects I have changed my mind.

Most of my projects involve reading and writing RC Signals, these are both time critical activities, the difference between full brakes and full throttle is only one thousandth of a second.

Existing solutions such as the code I have posted previously are perfectly good, but they are based on general purpose libraries that sacrifice performance and accuracy for flexibility.

Examples using general purpose libraries -
Servo Library
http://rcarduino.blogspot.com/2012/01/can-i-control-more-than-x-servos-with.html

PinChangeInt library
http://rcarduino.blogspot.com/2012/03/need-more-interrupts-to-read-more.html
http://rcarduino.blogspot.com/2012/04/how-to-read-multiple-rc-channels-draft.html


I am in the testing stages with a dedicated RC Library which sacrifices some flexibility for a big improvement in accuracy, size and performance.

I have a the perfect test bed for the library in my existing projects -

The L293D RC Robot
http://rcarduino.blogspot.com/2012/05/rc-arduino-robot.html

RC Race Car Child Mode
http://rcarduino.blogspot.com/2012/01/traction-control-part-13-we-have.html

Active Yaw Control
http://rcarduino.blogspot.com/2012/07/rcarduino-yaw-control-part-2.html

By converting each project to use the new library I can demonstrate the performance, ease of use and reliability of the library. I also plan to include the existing projects as samples within the library download.

Bench testing is complete, road testing starts tomorrow.

Duane B


5 comments:

  1. Really interested to see how this goes. Was thinking of using arduino to create a F1 style telemetry throttle and steering trace for my cars to compare laps but have no clue how to go about it.

    ReplyDelete
  2. Telemetry is not too difficult especially if you just listen in on the signals rather than read them in and transform them. Some of my first projects were data logging -

    http://rcarduino.blogspot.com/2011/12/data-logging-part-3-data-logged.html

    It was difficult to know how to read the data so I changed to focus on the lap timer instead. The great part about the lap timer is it gives you instant audio feedback at the end of every lap -

    http://rcarduino.blogspot.com/2012/07/lap-timer-build-along-part-one.html

    Anyway, if telemetry is the way you want to go, you will want an SD Card, there is a library for to them from Arduino and also some easy to use ready built circuits, my library will handle the RC Signal part.

    SD Card Breakout -

    http://www.oomlout.co.uk/microsd-breakout-board-p-268.html?zenid=211de3cc26046733d0c8110bd0f16259

    or this if your us based -

    http://www.adafruit.com/products/254

    Duane

    ReplyDelete
  3. Hi is there a code for rc boat esc brushed motor i am building a bait boat and are looking for forward and reverse nothing more found on pic12f675 but i like arduino can some one please hel me

    ReplyDelete
  4. Why use a micro controller at all ? wouldnt normal RC Gear do everything that you need for a bait boat ?

    Duane

    ReplyDelete

  5. Really Work Fast,******************

    Fast and reliable solution for Herpes Cure

    I was cured from Herpes with herbal med..

    Contact him for Relationship/marital problem,

    He will give you the best..

    Thanks to [[[robinsonbucler @ gmail com]]]

    ReplyDelete