Remote control 4WD robot build part2

I finally had some time to finish off the 4WD robot I first blogged about in February this year.

robot and remote control

Netduino 4wd robot and remote control unit

When I fired up the robot the nrf24L01 module on the embedded coolness shield was having some problems with electrical noise from the motors. This noise was causing the wireless module to report errors then stop working. So, based on this article by Pololu I added some noise suppression capacitors. There are two 0.1uF capacitors per motor and they connect the power supply pins to the metal casing of the motor. I have also twisted the motor supply wires and added some capacitors to the motor shield.

Motors with noise suppression capacitors

Netduino 4WD Robot motors with noise suppression capacitors

The Elecfreaks Joystick has to be modified to work with a Netduino. The remote control uses the initial position of the joystick for a calibration offset then sends 4 byte commands to the robot every 250mSec. The first two bytes are the motor directions and the last two are the motor speeds.

_module.OnDataReceived += OnReceive;
_module.OnTransmitFailed += OnSendFailure;
_module.OnTransmitSuccess += OnSendSuccess;

_module.Initialize(SPI.SPI_module.SPI1, Pins.GPIO_PIN_D10, Pins.GPIO_PIN_D9, Pins.GPIO_PIN_D1);
_module.Configure(_ControllerAddress, channel);

xOffset = xAxis.Read();
yOffset = yAxis.Read();

_timer = new Timer(SendMessage, null, 250, 250);


byte[] command = { motor1Direction, motor2Direction, motor1Speed, motor2Speed };
_module.SendTo(_RobotAddress, command);

After trialling the robot round the house I added a timer to shut the motors down if connectivity was lost. Before adding the noise suppression capacitors I managed to plough the robot into the wall when the radio link failed and the motors were running at close to full speed.

Timer CommunicationsMonitorTimer = newTimer(CommunicationsMonitorTimerProc, null, 500, 500);
void CommunicationsMonitorTimerProc(object status)
   if (( DateTime.UtcNow - _MessageLastReceivedAt ) > MessageMaximumInterval)
      Debug.Print("Communications timeout");
      M1Speed.DutyCycle = 0.0;
      M2Speed.DutyCycle = 0.0;

Quadcopter frame and motors ordered

Using the suggested parts list for a quadcopter on Hovership. I have ordered

1x Turnigy Battery Strap 330mm
1x On-Board Lipoly Low Voltage Alarm
2x Turnigy nano-tech 1800mah 3S 25~50C Lipo Pack
1x Hobby King Quadcopter Power Distribution Board
5x Turnigy Multistar 10 Amp Multi-rotor Brushless
5x Turnigy Aerodrive SK3 – 2822-1090kv Brushless Outrunner Motor
5x 8045 SF Props 2pc Standard Rotation/2 pc RH Rotation
1x Hobbyking X525 V3 Glass Fiber Quadcopter Frame 600mm
1x Hobbyking X525 V3 Glass Fiber Main Frame Bottom Plate
1x Hobbyking X525 V3 Aluminum Square Booms (4pcs/bag)
2x Hobbyking X525 V3 Glass Fiber Motor Mount (4pcs/bag)
2x Hobbyking X525 Glass Fiber Landing Gear (4pcs/bag)
1x Hobbyking X525 V3 Glass Fiber Main Frame Upper Plate (1pc/bag)
1x CNC Alloy Prop Balancer for Propeller, EDF & Heli Shaft/Blade

I have ordered plenty of spare propellers, motor mounts and frame bits as based on my experience with my Crazyflie Nano Quadcopter there will be many crashes while I debug the software and learn how to fly. I will purchase a Lipoly charger and battery bag locally.