Go Down

Topic: Problem with DFRobot Romeo V2 (Read 288 times) previous topic - next topic

Gilles_L

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  :)

GoForSmoke

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?


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

Gilles_L

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

steinie44


GoForSmoke

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.
I find it harder to express logic in English than in Code.
Sometimes an example says more than many times as many words.

Gilles_L

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 !

GoForSmoke

You should thank Steinie44 too!
I did.
I find it harder to express logic in English than in Code.
Sometimes an example says more than many times as many words.

Gilles_L

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


Go Up