Senin, 22 Februari 2016

Yellow boat 4 Arduino code with HK TR6 A V2 RX PPM interface

,


Im lowering the top BTW

The build here




The engineering in the boat the cooling fan circulates air blowing it out between the motors. This wee fan moves lots of air on 7.4 Volts






Arduino Inputs from RX

Ch3   Throttle                       Arduino pin 4
Ch1   Steering                       Arduino pin 5
Ch5   Throttle limit                Arduino pin 6
Ch2   Steering on Throttle       Arduino pin 7

Arduino analogue inputs

Anin 0  Ambient temp sensor                      Anin 1  Hall effect current sensor

Arduino outputs

Pin 8    Left jet
Pin 9    Right jet
Pin 10  Cooling fan speed
Pin 11  Steering

Mixing of the outputs

    
  //SteeringBias
  
  int SterringOnThrottle = (long)map((int)ch4v, 1500, 1100, 0, 1000); 
  
  if(SterringOnThrottle < 0) SterringOnThrottle = 0;
  
  SteeringBias = (long)map((int)ch3v - (int)ch3vWOZ, 0, 1000, 0, SterringOnThrottle); 
    
  int SteeringAngle = (long)map((int)ch3v, 1100, 1900, 1000, 2000);
  
  //Limit fan speed for 11.1 V
  FanSpeed = map(FanSpeed, 1100, 1900, 1000, 1500);
  
  //Update the outputs
   
  Servo1.writeMicroseconds((int)Throttle - (int)SteeringBias);
  
  Servo2.writeMicroseconds((int)Throttle + (int)SteeringBias);
     
  Servo3.writeMicroseconds((int)FanSpeed);
   
  Servo4.writeMicroseconds((int)SteeringAngle);


The cooling system



The fan is a 27 mm EDF should keep the air moving with a 10A ESC




There is a big heatsink and fan on the 30 AMp ESCs






0 komentar to “Yellow boat 4 Arduino code with HK TR6 A V2 RX PPM interface”

Posting Komentar

 

The Boat Plan Copyright © 2016 -- Powered by Blogger