Reading PWM Signals of an Aquacraft Wildcat RC Boat

These are my notes on connecting an Arduino to an Aquacraft Wildcat RC boat and reading the PWM signals for the Servo and ESC during the arming sequence.

Reading the Servo PWM was as simple as connecting one wire from the receiver signal pin(usually white) for the Servo channel to a PWM input pin on the Arduino and using the same sketch I used to read a Traxxas radio.

The only other wire needed was to create a common ground, connect the ground from the radio receiver to the ground of the Arduino.

Plugging in the boat battery and turning on the transceiver, I then read the values in the Serial monitor.

Neutral: 1490

Left: 1930

Right: 988


Serial Monitor Output



Sniffing the PWM Signal to the ESC

Next I read the PWM use to control the throttle, and more importantly, determine the Arming Sequence.  I did this one a little differently.  Instead of connecting the receiver signal pin to the Arduino, I used a Y-harness.  This allowed me to read the signal and simultaneously send the signal to the ESC and verify the arming.  I connected joined end to the receiver.  One end of the split connected directly to the ESC.  The other end I used to connect the signal wire to the Arduino PMW input pin.


The Arming sequence was as follows:

Neutral position for about 1 second(1500 PWM).  Full-throttle for about 1 second(2000 PWM).  Here the ESC gave a two beep confirmation.  And finally, neutral again for one second(1500 PWM).  This gave a three beep confirmation that the ESC was now active.

Serial Monitor Output


Simple as that folks.  Next step will be to connecting the Arduino and GPS in the same manner as my two other robots and we’ll have an incredibly fast autonomous boat!

Open Water Remote Control Test

Selected a hobby grade remote control boat as a suitable platform in the next step for my quest to build an autonomous watercraft.  Picked up a AquaCraft Wildcat Brushless Catamaran and took it out to Lake Berryessa to test under remote control.  Got a feel for the speed, turn rate, and battery life.  The boat is much faster than I need it to be as an autonomous robot.  At its slowest speed, turning is still very responsive.  I estimate I’ll only use around 20% of the rudder deflection angle.

I drove the craft for approximately 14 minutes at various speeds, including full throttle.  Overall, this consumed 65% of a 2200 MAH 3s Lipo.

At autonomous speeds, imagine I’d get at least double that duration.

This was my first RC boat experience, and I have to say, it was wicked fun.

Speed Run Number 2

Alright, after two years in this hobby I finally got my first Lipo battery.  Gee, what took me so long anyways?  Decided to skip 2S and go straight to 3S,  at 50C.

Kept the same gears as the prior run to test how the battery change alone would compare, everything else being equal.

  • Traxxas 2wd Slash
  • Velineon VXL-3s ESC
  • Lipo 3S 50C Battery 5000 mAh
  • 27T 48P pinion
  • 76T 48P spur




Conclusion:  Switching from NIMH to 3S 50C Lipo resulted in 63% speed boost.

Next experiment:  Foam tires.

Getting in to RC Car Speed Running



My first foray in to speed running.  These are my notes for posterity.

I want to baseline my vehicle first, as I’ve been driving it for this last year, without any modifications for speed:

  • Traxxas 2wd Slash
  • Velineon VXL-3s ESC
  • NiMH Battery 3000 mAh
  • 23T 48P pinion
  • 90T 48P spur

Baseline Run:  30mph

Experiment #1:

Replace the pinion and spur to 27/76 and measure the speed.

Result : 33mph

Wow, interesting!  That was a huge bump in gearing I would have expected more than a 10% speed increase.

Conclusion:  I think we’ve hit the peak discharge rate of the NiMH battery.

Next experiment:  I need to obtain foam tires and a LiPo battery(probably 3s), bring the gears back to 23/90, and see how each of those compare to baseline.



Programmable Headlights on an RC Car

Experimenting with smart LEDs on an RC Car…

These are Adafruit Pixie Chainable Smart LEDs and an Arduino Uno.  On the car I replaced both channel’s servo cables with Y-harnesses.   Plugging one end of each harness back in to the servo/ESC, the other end is used to connect to Arduino PWM input pins.  Reading those values and using that information to  control the LEDs.  Adafruit Pixie LEDs are chained together but individually assignable to any color by the program.  This allows for making turn signals when turning the vehicle and also being able to do other things with the lights when the car is throttled or neutral.  I only have two LEDs in this example, but you could string more than that together.

Source code for the video demo:

  This sketch is for two Smart LEDs on an RC car as programmable headlights.
     - Neutral position = "demon eye" red transition
     - Left turn        = left turn signal
     - Right turn       = right turn signal
     - Throttle         = blue, variable brightness
     - Full throttle    = white flashing

     Author:  John Reed

#include "SoftwareSerial.h"
#include "Adafruit_Pixie.h"

#define NUMPIXELS 2 // Number of Pixies in the strip
#define PIXIEPIN  6 // Pin number for SoftwareSerial output
#define UP        1
#define DOWN      2
#define INCREMENT 2
#define OFF       0
#define LEFT_LED  0
#define RIGHT_LED 1
#define BRIGHTNESS     200
#define MAX_BRIGHTNESS 255
#define FLASH_DELAY    100

byte SERVOPIN    = 3;
int servoPWM;
int throttlePWM;

#define MAX_RED 254
#define MIN_RED 20
int currentRed = 0;

// Servo signal PWM values
int leftThreshold     = 1400;
int rightThreshold    = 1600;
int throttleThreshold = 1550;
int fadeDirection     = UP;

SoftwareSerial pixieSerial(-1, PIXIEPIN);
Adafruit_Pixie strip = Adafruit_Pixie(NUMPIXELS, &pixieSerial);

void setup() {

  pinMode(SERVOPIN,    INPUT);


  pixieSerial.begin(115200); // Pixie REQUIRES this baud rate

  // brightness is 0 to 255


void loop() {

  // Measure servo values and then map them to the lights
  servoPWM    = pulseIn(SERVOPIN, HIGH);
  throttlePWM = pulseIn(THROTTLEPIN, HIGH);

  if(throttlePWM > throttleThreshold){
  if( servoPWM < leftThreshold ){ turnSignal(LEFT_LED); } else if( servoPWM > rightThreshold ){

 * Slow fading red.
 * Since this is a slow light sequence, I needed to make it interruptable
 * so there isn't a delay changing to another light sequence.  I did this by maintaining the
 * current light value.  Once per loop I inc/dec the current light value(depending on whater it's fading in or out) 
 * and display it.  This gives the loop a chance to decide to do something else.
 * The fade rate is entirely dependent on the speed of the main loop.  If the loop is very busy, for example, demonEyes  
 * wont refresh as often.  Thus, the INCREMENT value can be changed to compensate.
void demonEyes(){
    if( fadeDirection == UP ){

        if( currentRed < MAX_RED ){ currentRed += INCREMENT; strip.setBrightness(currentRed); strip.setPixelColor(LEFT_LED, 255, 0, 0); strip.setPixelColor(RIGHT_LED, 255, 0, 0);; } else{ fadeDirection = DOWN; } } else { if( currentRed > MIN_RED ){
            currentRed -= INCREMENT;
            strip.setPixelColor(LEFT_LED, 255, 0, 0);
            strip.setPixelColor(RIGHT_LED, 255, 0, 0);

          fadeDirection = UP;


 * Flashes amber once.  Takes a NUMPIXELS(the LED number in the chain) that will flash.
void turnSignal(int ledNum){

    int otherLed;
    if( ledNum == 0 ){
        otherLed = 1;
        otherLed = 0;

    strip.setPixelColor(ledNum, 255, 125, 0);
    strip.setPixelColor(otherLed, 0, 0, 0);;

 * Bright white double flash.
void whiteDoubleFlash(){

    // Loop twice.  Two flashes
    for( int i = 0; i < 2; i++ ){
        strip.setPixelColor(LEFT_LED, 255, 255, 255);
        strip.setPixelColor(RIGHT_LED, 255, 255, 255);;


Autonomous Long Distance Test

1.1 Mile Autonomous Drive on the UC Davis campus


Took Bitzero out today on the UC Davis campus during the early morning hours for a long distance autonomous test drive.  It was a success.  A total of 1.1 miles driven.


Around KDVS and the Coffee House


The most valuable observation was around waypoint resolution.  The further away a GPS waypoint was, the more likely it would brush against the sidewalk on the way.  I believe this is happening because the calculated heading angle is much smaller at longer distance, and the less correction the vehicle thinks it needs.  The solution is a higher density of GPS points.   It will be particularly important on water when other forces come in to play, like wind and current.  This is why we test.

Problem Connecting DJI Drone to Android

Connecting my DJI Phantom 3 Standard to my Android(v7) phone has always been painful.  You connect to the drone’s Wi-Fi, and nothing happens.  You load up your DJI app and still nothing happens, you don’t get the usual Camera mode.

I’ve finally figured out how to do it reliably, and I’m writing it down because I did not find the answer online.  And right now, you’re standing in a field somewhere, looking for this information.

The key is to forget the Wi-Fi network before each and every flight.  Hopefully you did not change the password and forgotten it because it will ask you for it.



But if you didn’t change the password, then add the network WiFi again.  The default password is 12341234.  Don’t tell anybody I told you, ok?

Enter the secret password.



After 5 to 10 seconds you get the Magic Screen.  This is the screen of joy.   It makes me happy, it will make you happy too:

This the place to be.


Tap the “Wi-Fi has no Internet Access” notification.   This is it!  The Final Checkpoint.  Ankh.  Sanctuary.  Choose YES.

But don’t bother selecting the checkbox to “Don’t ask again for this network”.   It would seem reasonable that all would be well to check it.  But it won’t.  This is the source of much unhappiness and ultimate suffering.  The problem with doing that is the next time you try to fly, it doesn’t detect Internet and assumes there’s no reason to connect.  Worse, it’s not even going to ask you about it anymore.  And the key to fixing the problem is already described:  Forget the Wi-Fi network before every flight.

Don’t do it!



Open Water Test Three – Final Conclusion

Is this Lake Berryessa or Myst Island?


Today marks the conclusion of testing the airboat platform.  And the result is:  I will stop prototyping with it. The wind was a little higher today and the boat was unable to steer autonomously at the speed I intend to build a rover.   The rudders attempted to steer the craft, but the wind kept it from making the turn.  It appeared to be incorrectly sailing the wrong GPS point, but really it was in a state of balance with the wind.  When I switch to manual mode, I was able to overcome the force and drive normally, but that’s because i’m using a lot more throttle.  And that’s not how I intend for the drone ship to sail.  So that pretty much is the end of this boat type and I will need to do some brainstorming on what ship to buy or build next to get us to the next phase of this project.

Open Water Test Results – 1/20/18

Today I took AquaBitsTwo out for its second test in open water.  These are the results, notes, and lessons I learned…

Markley Canyon at Lake Berryessa
  • Wind.  I was unaffected by this during the first test and didn’t need to deal with it.  Today there was some wind.  Not very much, just a few miles per hour.  But my motor mount and rudder acted like sails and the boat wanted to align with the wind.  Boat bottom is flat.  I guess that’s what fins and keels are for, eh?  Couldn’t solve that problem on the water, but I did increase the propeller speed to mitigate it.  In general, I might be driving the boat too slowly.  Would probably be easier to do my initial tests and tuning at higher speeds to overcome things like wind or rudders not pushing the boat with enough force for a proper turn.
  • Before I increased the propeller speed, the boat was sailing as if it were going to the wrong waypoint.  Right now I can’t say if it was a problem of GPS code, or if it was simply trying and failing to overcome the wind.  This would have been obvious with a terrestrial rover.  Interesting problem.
  • I spent a lot of time trimming and tuning.
  • Realized I have no way of telling if the Arduino servo controls are correct, what if I had placed the servo horn on backwards?  I will be adding a test sequence during startup, maybe turn right for a few seconds so I have positive confirmation it is correct.
  • Something is triggering the boat to go in to automatic mode and run it’s “drive straight to get a heading” function.  I’m pretty sure the transceiver’s trim button is doing this and possibly something else.
  • I chose boats as a robotic platform because I didn’t think it would have as many obstacles as land based rovers do.  But I’m seeing wind now as an obstacle.  It’s just not as obvious visually as lampposts and mailboxes.  Someday(hopefully), current will be an obstacle to overcome as well.
  • My drone won’t fly if the battery is less than 15 degrees Celsius.  I did not know that.  No fun aerial photos.  Next time I’ll leave it in the car until I am ready.
  • Lots of boaters on the water at dawn on Saturdays.  There were at least six nearby.  Don’t they know it’s robot season?

Project Update: AquaBitsTwo

After the lessons learned building and launching AquaBitsOne, I’ve begun to scope out ideas for the next version, hereby named AquaBitsTwo.  Rather than custom build something out of foam or wood, I ended up deciding to just try out a body board.  Found this at Leslie’s Pool Supply:  a Big Lizard 24/26 Inch Small.   It was only nine dollars.

Size comparison photo shows it’s a near identical replacement. Except that it will lack one critical flaw of the previous version:  it cannot leak.

AquaBitsOne and Next Version Comparison.  Ribbit!


It looked like it was covered in fabric so next it was stripped to bare foam.  Setting the motor and rudder back on top and it sure looks like we are back in action!

The beginning of AquaBitsTwo

I might install the electronics in a waterproof case, though I don’t think this necessary yet for where I’m at in the project.  It is driven slowly and the lake surface is pretty stable.  I have a lot of testing I need to do before I worry about making it sea worthy.  Any old storage container will probably be fine for now. We’ll see.  I estimate that I should have a working version ready for launch this  weekend.