3D Printed Hovercraft

3D Printed Hovercraft

Material Required

  • Printoo Core
  • DC Motors Drivers & two Motors
  • Bluetooth 4.0 Module
  • Solar Cell Connector
  • Mekoprint Polymer Solar Cell
  • LiPo battery
  • Smartphone
  • 3D Printer: https://www.beeverycreative.com/

logo_beeverycreative

Schematic

Schematic: 3D Printed Hovercraft

Schematic: 3D Printed Hovercraft

3D Model

Download from Thingiverse

3D-model hovercraft

Code

Download from GitHub

  1. /**********************************************************************
  2. * © 2014 YD Ynvisible, S.A.
  3. *
  4. * FileName:        Hovercraft.ino
  5. * Dependencies:    SoftwareSerial.h
  6. * Processor:       ATmega328
  7. * IDE:             Arduino 1.0.5
  8. *
  9. * Description:
  10. * Driving a 2 motors aquatic drone through a smartphone via Bluetooth 4.0
  11. * We used the LightBlue Bluetooth 4.0 terminal for iPhone for control
  12. **********************************************************************/
  13.  
  14. #include <SoftwareSerial.h> //Software Serial Port
  15. #define RxD 6 //Bluetooth TX=Core RX
  16. #define TxD 7 //Bluetooth RX=Core TX
  17. #define FRONT 1
  18. #define BACK 0
  19. #define OFF 0
  20. #define ON 1
  21. SoftwareSerial blueToothSerial(RxD,TxD);
  22.  
  23. int motor1_pwm=9;
  24. int motor1_dir=8;
  25. int motor2_pwm=11;
  26. int motor2_dir=12;
  27. char X[3], Y[3], A, B;
  28. int X1_num;
  29. int i=1;
  30. int X_num,Y_num, A_num, B_num;
  31. int X_numf,Y_numf, A_numf, B_numf;
  32. int motor1_way,motor2_way;
  33. char recvChar;
  34.  
  35. void setup()
  36. {
  37.   Serial.begin(9600);
  38.   //pinMode(BUTTON, INPUT);  
  39.   pinMode(RxD, INPUT);
  40.   pinMode(TxD, OUTPUT);
  41.   pinMode(motor1_pwm, OUTPUT); //Motor1 PWM
  42.   pinMode(motor1_dir, OUTPUT); //Motor1
  43.   pinMode(motor2_pwm, OUTPUT); //Motor2 PWM
  44.   pinMode(motor2_dir, OUTPUT); //Motor3
  45.   digitalWrite(motor1_pwm,LOW);
  46.   digitalWrite(motor1_dir,LOW);
  47.   digitalWrite(motor2_pwm,LOW);
  48.   digitalWrite(motor2_dir,LOW);
  49.   setupBlueToothConnection();
  50. }
  51. void loop()
  52. {
  53.   if(blueToothSerial.available()){   //check if the pipe is free
  54.     recvChar = blueToothSerial.read();
  55.     switch (recvChar){
  56.       case '#':                          //go forward
  57.         analogWrite(motor1_pwm,150);
  58.         digitalWrite(motor1_dir,LOW);
  59.         analogWrite(motor2_pwm,150);
  60.         digitalWrite(motor2_dir,LOW);
  61.         delay(250);
  62.         analogWrite(motor1_pwm,180);
  63.         digitalWrite(motor1_dir,LOW);
  64.         analogWrite(motor2_pwm,180);
  65.         digitalWrite(motor2_dir,LOW);
  66.         delay(250);  
  67.         break;      
  68.       case 'r':                          //go right
  69.         analogWrite(motor1_pwm,150);
  70.         digitalWrite(motor1_dir,LOW);
  71.         analogWrite(motor2_pwm,0);
  72.         digitalWrite(motor2_dir,LOW);
  73.         delay(250);
  74.         analogWrite(motor1_pwm,180);
  75.         digitalWrite(motor1_dir,LOW);
  76.         analogWrite(motor2_pwm,0);
  77.         digitalWrite(motor2_dir,LOW);
  78.         delay(250);
  79.         break;
  80.       case 'l':                           //go left
  81.         analogWrite(motor1_pwm,0);
  82.         digitalWrite(motor1_dir,LOW);
  83.         analogWrite(motor2_pwm,150);
  84.         digitalWrite(motor2_dir,LOW);
  85.         delay(250);
  86.         analogWrite(motor1_pwm,0);
  87.         digitalWrite(motor1_dir,LOW);
  88.         analogWrite(motor2_pwm,180);
  89.         digitalWrite(motor2_dir,LOW);
  90.         delay(250);
  91.         break;
  92.       case 's':                          //stop
  93.         analogWrite(motor1_pwm,0);
  94.         digitalWrite(motor1_dir,LOW);
  95.         analogWrite(motor2_pwm,0);
  96.         digitalWrite(motor2_dir,LOW);
  97.         delay(250);
  98.         analogWrite(motor1_pwm,0);
  99.         digitalWrite(motor1_dir,LOW);
  100.         analogWrite(motor2_pwm,0);
  101.         digitalWrite(motor2_dir,LOW);
  102.         delay(250);
  103.         break;
  104.       default: break;
  105.     }
  106.   }
  107. }  
  108.  
  109. void setupBlueToothConnection(){
  110.   blueToothSerial.begin(9600); //Set BluetoothBee BaudRate to default baud rate 9600
  111.   delay(10); // This delay is required.
  112.   blueToothSerial.print("AT+RENEW"); //Restore all setup value to factory setup
  113.   delay(10);  // This delay is required.
  114.   blueToothSerial.print("AT+ROLE0"); //make it a slave  
  115.   delay(10);  // This delay is required.
  116. }
  117. //END
/**********************************************************************
* © 2014 YD Ynvisible, S.A.
*
* FileName:        Hovercraft.ino
* Dependencies:    SoftwareSerial.h
* Processor:       ATmega328
* IDE:             Arduino 1.0.5
*
* Description:
* Driving a 2 motors aquatic drone through a smartphone via Bluetooth 4.0
* We used the LightBlue Bluetooth 4.0 terminal for iPhone for control
**********************************************************************/
#include <SoftwareSerial.h> //Software Serial Port
#define RxD 6 //Bluetooth TX=Core RX
#define TxD 7 //Bluetooth RX=Core TX
#define FRONT 1
#define BACK 0
#define OFF 0
#define ON 1
SoftwareSerial blueToothSerial(RxD,TxD);
int motor1_pwm=9;
int motor1_dir=8;
int motor2_pwm=11;
int motor2_dir=12;
char X[3], Y[3], A, B;
int X1_num;
int i=1;
int X_num,Y_num, A_num, B_num;
int X_numf,Y_numf, A_numf, B_numf;
int motor1_way,motor2_way;
char recvChar;
void setup()
{
  Serial.begin(9600);
  //pinMode(BUTTON, INPUT);  
  pinMode(RxD, INPUT);
  pinMode(TxD, OUTPUT);
  pinMode(motor1_pwm, OUTPUT); //Motor1 PWM
  pinMode(motor1_dir, OUTPUT); //Motor1
  pinMode(motor2_pwm, OUTPUT); //Motor2 PWM
  pinMode(motor2_dir, OUTPUT); //Motor3
  digitalWrite(motor1_pwm,LOW);
  digitalWrite(motor1_dir,LOW);
  digitalWrite(motor2_pwm,LOW);
  digitalWrite(motor2_dir,LOW);
  setupBlueToothConnection();
}
void loop()
{
  if(blueToothSerial.available()){   //check if the pipe is free
    recvChar = blueToothSerial.read();
    switch (recvChar){
      case '#':                          //go forward
        analogWrite(motor1_pwm,150);
        digitalWrite(motor1_dir,LOW);
        analogWrite(motor2_pwm,150); 
        digitalWrite(motor2_dir,LOW);
        delay(250); 
        analogWrite(motor1_pwm,180);
        digitalWrite(motor1_dir,LOW);
        analogWrite(motor2_pwm,180); 
        digitalWrite(motor2_dir,LOW);
        delay(250);   
        break;      
      case 'r':                          //go right
        analogWrite(motor1_pwm,150);
        digitalWrite(motor1_dir,LOW);
        analogWrite(motor2_pwm,0); 
        digitalWrite(motor2_dir,LOW);
        delay(250); 
        analogWrite(motor1_pwm,180);
        digitalWrite(motor1_dir,LOW);
        analogWrite(motor2_pwm,0); 
        digitalWrite(motor2_dir,LOW);
        delay(250); 
        break;
      case 'l':                           //go left
        analogWrite(motor1_pwm,0);
        digitalWrite(motor1_dir,LOW);
        analogWrite(motor2_pwm,150); 
        digitalWrite(motor2_dir,LOW);
        delay(250); 
        analogWrite(motor1_pwm,0);
        digitalWrite(motor1_dir,LOW);
        analogWrite(motor2_pwm,180); 
        digitalWrite(motor2_dir,LOW);
        delay(250); 
        break;
      case 's':                          //stop
        analogWrite(motor1_pwm,0);
        digitalWrite(motor1_dir,LOW);
        analogWrite(motor2_pwm,0); 
        digitalWrite(motor2_dir,LOW);
        delay(250); 
        analogWrite(motor1_pwm,0);
        digitalWrite(motor1_dir,LOW);
        analogWrite(motor2_pwm,0); 
        digitalWrite(motor2_dir,LOW);
        delay(250); 
        break;
      default: break;
    }
  }
}  
void setupBlueToothConnection(){
  blueToothSerial.begin(9600); //Set BluetoothBee BaudRate to default baud rate 9600
  delay(10); // This delay is required.
  blueToothSerial.print("AT+RENEW"); //Restore all setup value to factory setup
  delay(10);  // This delay is required.
  blueToothSerial.print("AT+ROLE0"); //make it a slave   
  delay(10);  // This delay is required.
}
//END

Video

 

3 comments for “3D Printed Hovercraft

  1. Tom
    May 12, 2014 at 15:06

    Cool, where can I get the solar cell? How much is it?

  2. MCamara
    May 12, 2014 at 15:39

    Hi,

    The Solar Cells come as part of the RC Modeling, Printed, Printed Prime and Ultimate Blimp pack of Printoo on Kickstarter:
    https://www.kickstarter.com/projects/1030661323/printoo-paper-thin-flexible-arduinotm-compatible-m

    Thanks,
    Manuel

  3. Tom
    May 12, 2014 at 15:55

    ah okay, I just find it myself :) looking forward to the project

Comments are closed.