Hackster is hosting Hackster Holidays, Ep. 7: Livestream & Giveaway Drawing. Watch previous episodes or stream live on Friday!Stream Hackster Holidays, Ep. 7 on Friday!
Armando Leonardo
Published © GPL3+

Sensor module to aid rescue and monitoring

Construction of a terrestrial drone or inspection or rescue rover, equipped with the RSL10-SENSE-DB-GEVK sensor module.

IntermediateFull instructions providedOver 3 days579
Sensor module to aid rescue and monitoring

Things used in this project

Hardware components

Garagino (discontinued)
Similar to Arduino UNO. Rover Controller.
×1
Dual Motor Garagino (Discontinued)
Motor and servo controller
×1
Micro servo Tower Pro MG 90S
For the camera's Pan Tilt
×2
Camera FPV 1000TVL 1/3 CCD
To view where the rover is
×1
transmitter Boscam Ts 5828 600mw 32ch
×1
RF Transmitter module 433mhz Arduino
Sends commands to the engine and pan tilt
×1
RF Receiver Module 433mhz Arduino
Receive commands for engines and pan tilt
×1
Tamiya Twin Motor Gearbox 2 motors
Rover structure
×1
Tamiya 70157 Universal Plate Set (2pcs.)
Rover structure
×1
Tamiya Track Wheel Set
Rover structure
×1
Led High Brightness 5mm White
Rover flashlight
×3
Arduino Nano
Command transmitter controller for the rover
×1
Analog Joystick Module for Arduino
For the command transmitter
×2
Linear Potentiometer 1KΩ
For the command transmitter
×1
Otg Fpv receiver for mobile phones 5.8 Otg Uvc
FPV receiver
×1
RSL10-SENSE-GEVK
onsemi RSL10-SENSE-GEVK
×1

Software apps and online services

Arduino IDE
Arduino IDE
RSL10 Sense and Control
Available on Play Story. ON Semiconductor Corp
Easycap & UVC Player(FPViewer)
Available on Play Story. Labsp
FreeCAD 0.18
Ultimaker Cura

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)
jumper wires
screwdriver
3D Printer Ender 3 Creality
Filament PLA 1.75 mm various colors

Story

Read more

Custom parts and enclosures

Rover structure

Parts of the rover's structure in file for 3D printing.

Rover structure in FreeCAD

FreeCAD structure file

Schematics

Transmitter Scheme

Receiver Scheme

Code

Arduino code of the RF transmitter

Arduino
Arduino code to be loaded into the Arduino Nano of the rover radio transmitter.
Controls the camera's engines and pan tilt.
/* Cdigo para o transmissor eo receptor para mdulo Nrf24L01, do Drone Terrestre 
 * do projeto: Sensor module to aid rescue and monitoring, do concurso 
 * do Site https://www.hackster.io/, Contest Transform Your Thinking, 17/01/2019
 
    (1) Transmissor Module RF 433 // Arduino NANO   
    
    GND    ->   GND
    Vcc    ->   5v
    Data   ->   D12
    Ant    ->   Antena
    
    (2) Joystick // Arduino NANO

    Esquerdo eixo x -> A1
    Esquerdo eixo y -> A0
    Direito eixo y  -> A3
    Direito eixo x  -> A2

    (3) Potenciometro -> A6

Sketch com 5 canais, feito com base em http://www.brincandocomideias.com/ e http://www.electronoobs.com
*/
#include <VirtualWire.h> //Inclui a biblioteca VirtualWire.h

#define pinRF 12

//*************** Controle do RF ***********************

struct tipoPacote { //mesma estrutura para o transmissor e para o receptor

   int joystEsqX; //recebe valores entre 0 e 1023
   int joystEsqY;
   int joystDirX;
   int joystDirY;
   int potenc;
};

  tipoPacote pacote;

void setup(){
  
  //*************** Controle do Transmissor ************
  
  vw_set_tx_pin(pinRF); //Configura o pino D12 para a leitura dos dados
  vw_set_ptt_inverted(true);
  vw_setup(2000); //Configurao da velocidade (at 4000 bits por segundo)
    
}

void loop()
{
   //Gera valores correspondentes de 0 a 1023.
   int Valor_joystEsqX = analogRead(A1); 
   int Valor_joystEsqY = analogRead(A0); 
   int Valor_joystDirX = analogRead(A2);
   int Valor_joystDirY = analogRead(A3);
   int Valor_potenc = analogRead(A6);
    
   pacote.joystEsqX = Valor_joystEsqX;
   pacote.joystEsqY = Valor_joystEsqY;
   pacote.joystDirX = Valor_joystDirX;
   pacote.joystDirY = Valor_joystDirY;
   pacote.potenc = Valor_potenc;
    
  vw_send((uint8_t *)&pacote, sizeof(pacote));
  vw_wait_tx();
 
}

Arduino code rover radio receiver.

Arduino
Arduino code to be loaded into the Garagino of the rover's radio receiver.
Controls the camera's engines and pan tilt.
/* Cdigo para o transmissor eo receptor para mdulo Nrf24L01, do Drone Terrestre 
 * do projeto: Sensor module to aid rescue and monitoring, do concurso 
 * do Site https://www.hackster.io/, Contest Transform Your Thinking, 17/01/2019
 
    (1) Receptor Module RF 433 // Garagino
    
    GND    ->   GND
    Vcc    ->   5v
    Data   ->   D11
    Ant    ->   Antena
            
    (2) Morores
    Neste projeto M1  -> motor direito
                      -> motor esquerdo
    M1 Velocidade -> D5
    M2 Velocidade -> D6
    M2 Sentido -> D7
    M1 Sentido -> D8

    Biblioteca DualMotor.
    Comandos:
    M1move(Velocidade,Sentido) -> M1move(D5,D8)
    M1parar()
    M2move(Velocidade,Sentido) -> M2move(D6,D7)
    velocidade (0 a 255) e 
    sentido (0 - horario,frente ou 1 - Anti-horario,tras)

    (3) Servos da camera

    Servo eixo D cima/baixo -> D4
    Servo eixos XY Direita/Esquerda -> D9

    (5) Potenciometro -> D10

Sketch com 5 canais, feito com base em http://www.brincandocomideias.com/ e http://www.electronoobs.com
*/

#include <VirtualWire.h> //Inclui a biblioteca VirtualWire.h
#include <ServoTimer2.h> //Biblioteca substituindo Servo.h que conflita
                         //com VirtualWire. Disponvel em https://github.com/nabontra/ServoTimer2/blob/master/ServoTimer2.cpp
#include <DualMotor.h> //Dual Motor Garagino
#include <Wire.h> 
#include <SoftwareSerial.h> //Saida TXRX

//Definies
#define pinRF 11 //Pino de recep. do radio

//*************** Controle do RF ***********************

struct tipoPacote //mesma estrutura para o transmissor e para o receptor
{ 
   int joystEsqX;
   int joystEsqY;
   int joystDirX;
   int joystDirY;
   int potenc;
};
tipoPacote pacote;

//Varivel para o armazenamento do buffer dos dados e do do tamanho do buffer
uint8_t buf[sizeof(pacote)]; 
uint8_t buftam = sizeof(pacote);

//*********************Controle do receptor***********************

ServoTimer2 camD;
ServoTimer2 camXY;
DualMotor dualmotor;

//Declarao de variveis dos dados recebidos pelo radio
int joystEsqX_valor = 1500;
int joystEsqY_valor = 1500;
int joystDirX_valor;
int joystDirY_valor;
int potenc_valor;

void setup() {
 
  //Definio dos pinos dos servos da camera
  camD.attach(4);
  camXY.attach(9);

  //Definio dos pinos dos motores
  pinMode(5, OUTPUT);
  pinMode(6, OUTPUT);
  pinMode(7, OUTPUT);
  pinMode(8, OUTPUT);

  //Definio do pino do Potenciometro
  pinMode(10, OUTPUT);
  
  //Inicializa o mdulo receptor
  vw_set_rx_pin(pinRF); //Configura o pino D11 para a leitura dos dados
  vw_setup(2000); //Configurao da velocidade (at 4000 bits por segundo)
  vw_rx_start(); //Inicia a leitura de dados do mdulo receptor
   
}

//****************************

void sentidoFT(){
  if(joystDirY_valor >= 0 && joystDirY_valor <= 85){
    dualmotor.M1move(potenc_valor,1);
    dualmotor.M2move(potenc_valor,0);
    
  }else if (joystDirY_valor >= 170 && joystDirY_valor <= 255){
    dualmotor.M1move(potenc_valor,0);
    dualmotor.M2move(potenc_valor,1);
  }
  
}

void sentidoDE(){
  if(joystDirX_valor >= 0 && joystDirX_valor <= 85){
    dualmotor.M1move(potenc_valor,1);
    dualmotor.M2move(potenc_valor,1);
    
  }else if (joystDirX_valor >= 170 && joystDirX_valor <= 255){
    dualmotor.M1move(potenc_valor,0);
    dualmotor.M2move(potenc_valor,0);
  }
}

//****************************

void loop() {
  
  if(vw_have_message()){
    vw_get_message(buf, &buftam);
    memcpy(&pacote,&buf,buftam);
 
    joystEsqX_valor = map(pacote.joystEsqX, 3, 1021, 2248, 748);
    camXY.write(joystEsqX_valor);
  
    joystEsqY_valor = map(pacote.joystEsqY, 3, 1021, 2248, 748);
    camD.write(joystEsqY_valor);
  
  }    

  joystDirX_valor = map(pacote.joystDirX, 0, 1023, 0, 255);
  sentidoDE();

  joystDirY_valor = map(pacote.joystDirY, 0, 1023, 0, 255);
  sentidoFT();

  potenc_valor = map(pacote.potenc, 0, 1023, 0, 255);
  
}

Credits

Armando Leonardo
3 projects • 5 followers
I have electronics and computer as a hobby. I like to build and create things as well as solve logic problems

Comments