BasicMicroUK - Forums

www.basicmicro.co.uk
It is currently Tue Oct 23, 2018 2:29 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Rover Shield, can't get the motors running
PostPosted: Fri Jul 26, 2013 11:38 am 
Offline
Citizen

Joined: Wed Jul 24, 2013 10:16 pm
Posts: 6
Hi,

I can't get the motors on my Rover Shield of my Johnny Tank (now RTK1 Robot Kit) running. I've an example program from Orion called TankJohnny.ino but it makesuse of a PS2-COntrol which I don't have. For my understanding, I have to use some ports for direction and break(?) and other ports for speed, but my tryings were unsuccessful.

A small example of my trying:

Code:

#define IN1 4
#define IN2 2
#define IN3 9
#define IN4 7
#define EN1 6
#define EN2 5

#define LEDA 8
#define LEDB 10

#define BUTTONA 18
#define BUTTONB 19


void setup() {       
 
  pinMode(IN1, OUTPUT);
  pinMode(IN2, OUTPUT);   
  pinMode(IN3, OUTPUT);
  pinMode(IN4, OUTPUT);       

  pinMode(LEDA,OUTPUT);
  pinMode(LEDB,OUTPUT);

  Serial.begin(4800);
 
}

void loop() {
 
  Serial.print("start\n");
 
  digitalWrite(IN1, LOW);
  digitalWrite(IN2, HIGH);
  digitalWrite(IN3, LOW);
  digitalWrite(IN4, HIGH);

  analogWrite(EN1, 255);
  analogWrite(EN2, 255);

  digitalWrite(LEDA, HIGH);
  delay(1000);
  Serial.print("stop\n");
 
  digitalWrite(LEDA, LOW);

  analogWrite(EN1, 0);
  analogWrite(EN2, 0);

  delay(10000);   
       
  Serial.print("\n");

}


Would be great, if anybody can help me with this. Thanks in advance.

Cheers,
Dominik


Top
 Profile  
 
 Post subject: Re: Rover Shield, can't get the motors running
PostPosted: Mon Jul 29, 2013 7:12 pm 
Offline
Site Admin
User avatar

Joined: Thu Mar 01, 2001 7:00 pm
Posts: 1316
Location: Temecula, CA
First thing, check the Batt/Vcc jumper. Make sure a jumper is on either Batt or Vcc. Its in the middle of the rover shield. If neither is connected no power is getting to the motor driver chip.

Based on your code this is the most likely cause of the problem. The reason the jumper is there is so you can run from 5v regulated power or straight from your batteries.

Also what batteries are you using? Lipo rechargeable, Lithium AAA, Alkaline? From my own testing regular Alkaline just don't cut it. They work but poorly. The Lithium batteries work well and my preference is a small 2cell Lipo battery.

_________________
Tech Support
Basic Micro - Robotic Technology Evolved


Top
 Profile  
 
 Post subject: Re: Rover Shield, can't get the motors running
PostPosted: Tue Jul 30, 2013 2:25 pm 
Offline
Citizen

Joined: Wed Jul 24, 2013 10:16 pm
Posts: 6
Hi,

thanks for your help. I don't have a jumper on it, so I'll try that tonight.

What exactly do you mean with "small 2cell Lipo battery"? Something like that?
http://www.amazon.de/Turnigy-LiPo-Pack- ... +lipo+2200

Thanks and best regards,
Dominik


Top
 Profile  
 
 Post subject: Re: Rover Shield, can't get the motors running
PostPosted: Tue Jul 30, 2013 10:48 pm 
Offline
Citizen

Joined: Wed Jul 24, 2013 10:16 pm
Posts: 6
With a jumper it works. Thank you! :-)

Cheers,
Dominik


Top
 Profile  
 
 Post subject: Re: Rover Shield, can't get the motors running
PostPosted: Wed Aug 07, 2013 6:58 pm 
Offline
Site Admin
User avatar

Joined: Thu Mar 01, 2001 7:00 pm
Posts: 1316
Location: Temecula, CA
Yes, the 7.4v lipo's are what I use. I use one that is about 1" x 2" x .5" I got from Hobbyking.

_________________
Tech Support
Basic Micro - Robotic Technology Evolved


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

phpBB SEO