Pages: [1]   Go Down
Author Topic: Problem with DFRobot Romeo V2  (Read 140 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi Guys,

I've a DfRobot Romeo V2 which drive a 4wd DFRobot Baron mobile platform.

There are an DfRobot URM37 ultrasonic sensor mounted on a servo and five Sharp GP2Y0A41SK IRSensor (Two on each front side, three on the rear : left, center, right)

When my Romeo is connected to my PC and i test my Robot, all seem working fine : i have all the debugging detecting messages for each sensor on the Serial Monitor and the robot seems taking the good decisions.

So, i deconnect the usb cable, and put the robot on the ground, and nothing work... The robot goes straight away without detecting anything and bumping on objects or walls...

I think it must be a problem with all the instruction, and maybe i have to use interrupts...

The code (i adapt one from many sources) is join to this message

Is someone can help me ?

Thank you

Gilles
Sorry for my English, i'm French  smiley

* myRobotGilles.zip (8.07 KB - downloaded 4 times.)
Logged

Pittsburgh, PA, USA
Offline Offline
Faraday Member
**
Karma: 95
Posts: 4767
I learn a bit every time I visit the forum.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What's the difference between connected to USB and not? Power? But it runs without....

There's too much code to just pour over looking for needles in the haystack.
I don't see any Serial reads but plenty of writes/prints. Possibly they affect timing.

At what stage did it quit working when unplugged?


Logged

I find it harder to express logic in English than in Code.
Sometimes an example says more than many times as many words.

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for your response.

When i unplugged the usb cable, the robot is moving forward and didn't stop when there's an obstacle.

I can't see in what stage because i haven't the serial monitor when unplugged.

I've made some tests with a more simple code and i noticed it was the same... Maybe Romeo V2 can't handle motors, ultrasonic sensor and five ir sensors on the same time ?

If you have some code i can test with interrupt for example ?

Thanks for your help
Logged

Shelby Township, Disco, Michigan
Offline Offline
Sr. Member
****
Karma: 15
Posts: 482
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

How are you powering it?
Logged

Pittsburgh, PA, USA
Offline Offline
Faraday Member
**
Karma: 95
Posts: 4767
I learn a bit every time I visit the forum.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Does it all work when you have it plugged in to USB?
If so then it is more likely that there is a different problem than you think.

Maybe the motor(s) get power and the rest lacks power without the USB supplying 500mA?
Then the motor(s) would run but not the rest.
 
I don't need interrupts to do many things on time at once, more than you list.
But you have a lot of code that I don't know the pieces so I can't say how much work to change over.
What I saw did not look like problems, only delay() I remember is in the Leonardo setup, no big deal.

So for the easier path, if the code works when plugged in to USB, let's see if there is a simple answer.
Logged

I find it harder to express logic in English than in Code.
Sometimes an example says more than many times as many words.

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello GoForSmoke

You found the problem. It was a lack of power.

My robot uses the standard battery support delivered with the robot : five AA battery cells. It seem's to be too low to power motors, sensors, servo and the Romeo card.

So i plug an another 4 AA battery pack on the Vin an Gnd of the Romeo and all work fine !

Thanks for your help !
Logged

Pittsburgh, PA, USA
Offline Offline
Faraday Member
**
Karma: 95
Posts: 4767
I learn a bit every time I visit the forum.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You should thank Steinie44 too!
I did.
Logged

I find it harder to express logic in English than in Code.
Sometimes an example says more than many times as many words.

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Oh yes sorry, also thanks to Steinie44 who guided me on the right way !

Logged

Pages: [1]   Go Up
Jump to: