Let's Make Robots!

This is my first autonomous 4WDBOT on a DfRobot Base.I try to keep all mountings as clear and functional as possible - no decoration parts.

Update:
After some code-tunings the obstacle avoiding system runs fine now - even with higher speed. I've implemented a speedboost-mode if the distance is higher as 200cm, so it much faster on larger distances. There is a new video online with the second obstacle avoiding test.

Update:
Success! Even there is a lot of finetuning with gears and delays to do it is really nice to see the bot running! There is a new video with the first obstacle avoiding test.

Update:
All sensors and motors are running great now. I got clear readings. Everything is hooked up nicely and the sensorhead reacts on lightconditions just fine. I can read the light on the left and ride side now with values between 0 (darkness) and 255 (bright sunlight). The URM gives me now smooth values between 5 and 300 (cm). Maybe I can start the first autonomus tests today. It evaluates three variables - front distance, left distance and right distance. It should be possible now to make movements because of different lightconditions and front/left/right distances. The code is cleaned up and commented out - but here is still a lot to do (there ist enough codespace free on the chip).

Update:
A new URM arrived. It's working just as it should be! Great! Yippie! I got a full range between 0cm and 280cm. In the meantime I had enough time to rearrange nearly every cable twice...  A nice little green plug-backpack is ready, too.


The mounted URM sensor


Better cable layout with a cleaned out cable backpack


Thumbscrews for cable holdings, antishake cable holder, vibration damper now everywhere...

Update:
At the moment I am working on the ultrasound navigation. I am not sure if my URM3.7 unit is broken - I can read the values over Rx + Tx but the measurement range is only between 4cm and 10cm. It should be between 4cm and three meters. I am using Miles Burtons URM library with Arduino 2.2 wich is originaly written for 1.7. Or I have to put the URM in another Mode over serial - I am not sure at the moment. If somebody here has got a good idea because of this strange behaviour I would be glad to hear it.
 

URM Update: The URM3.7 is destroyed - two of the capacitors on the back are missing. Maybe because of a weak solderingconnection? Maybe because of my fault? Who knows. But finally I have found the error and I can reorder a new part. Maybe is possible to fix it - but it's smd size and really small.

Update:
Today I have soldiered the cables to the two lightsensors and rearranged the cable layout. Maybe I will multiplex them later to eight - but at the moment two sensors are good (left side + right side). Additionally I have prepared the front for two speaker, for hyper hifi stereo. I have just ordered my second URM - and I've found a nasty little analog alcohol-sensor for 4€. Ordered.

The black box on the back is a 12V batterybackpack. It is planned to place a solar-cell on the back for autonomous power charge. There is still a lot to do, but I'll try to submit pictures of every stage of the building process. I hope you like it. Comments, suggestions and help are much appreciated.




Alpha

Sensorhead preview and batterypack mounted...



Light sensors, sharpies and 3W Stereo Audio Amplifier...

The sensorhead with the URM3.7 and sharpies mounted

Rotary encoders mounted

Preparing Stereo Audio in the perforated metal plate front (dustblocker)

Face with unmounted URM (arrrgghh!) - rearranged, cleaner cable layout... the perforated metal plate is for the hidden white LEDs - otherwise you would not see it's eyelights at daylight.

Update:
First pictures of my processing controlterminal for sensor- and encodertests

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Nice work! :)

It seems a bit jumpy still, but you'll get it figured out!

Janson's picture

After some work it runs much smoother now - even with higher speed :D

fritsl's picture

It's looking good :)

You eliminated the wire mess I see, nice job!
Gotte work out some kind of cable management myself as well, though with the board I soldered it's already a alot better.

 

I had a new test tonight, it runs even more beautiful than it already did, so I'm getting there.
How did it go for you? 

Janson's picture

My first test tonight wasn't such a great success - everything is up and running now and all components work, but the delays are just terrible. The bot stops and turns - just after it hits the wall :D I think I have to rearrange my messy code. I am not sure at the moment when it is time to take a measurement. My plan is: Get a measurement in centimeter, move the wheels, count the rotary encoders (1 turnaround = 18.85cm) then stop. Theoretically it is working - but pratically it hits the wall. Is it possible to compare some code with you?

I can publish my code tonight, but it's not ideal.
I don't have encoders so that won't help you.

I'm running my motors at not even 50% capacity at the moment while testing, and then I have about 10cm margin between bot and wall, when I set the stopping distance at 30 centimeters.

Simple flow:
Drive forward
Do measurment
When distance <= 30
Readsweep
Get reading at 0, 45, 90, 135, 180 degrees
Compare new distance to max distance
If new distance is higher than max distance, max distance = new distance, store angle
Turn to angle with most distance
get reading
if >= 30
drive

that works fine for me for now, I just need to figure out my turning routines since the 90 degree turns are about 100 degrees now, so tweaking to do.

As I said, I don't have the encoders, so I need to rewrite a bunch when I can get those.

Janson's picture

Thanks, Benji. This helps me a lot. I have compared your lifecycle with mine and the MASHR code (thanks again for this nice piece of code). It is working way better now -> Success! There is still a lot of finetuning to do, but it's working!

No problem, no effort at all :)

now show us some video's man! ;)

Also with an Arduino, and my readings are perfect.
Make sure you set the URM to TTL serial, NOT RS232.
Also, there is a jumper in the middle of the module, also on the back, break that connection.
If you share your code I can have a look if you want?

I'm working with the same platform by the way!