Another First Robot based on fritsl design

 

 

Here's my first robot :) It's based on fritsl design. The differences are that it doesn't have a servo (it always looks forward) and has 2 touch sensors just in front of the weels so that if it bumps on something, it goes a little back and turn away.

Also, it's not held together by tape, but with a solid structure based on nuts and bolts (as you can see from the pictures) and CD plates. A wooden cube is the main attachment for all parts. I like this design becouse it's completely disassemblable, nothing is permanently attached. Also, it's quite strong.

Now i'm gonna add an ultraluminous led to act as a spotlight :)

UPDATE: I added the ultraluminous led! It make a very bright light cone, give great effect when the robot turns :) The led is mounted on the head near the IR sensor, along with it's resistor. It's actually connected to G and V, since i don't have a transistor lying around, so it's always on then the robot is on.

I added a couple of pictures, a video with the LED on, and the complete source code (nothing fancy there).

 

 

Source Code

 

pause 2000 ' wait to put the robot down :)

main:
' full forward
gosub fwd_right
gosub fwd_left

gosub read_dist
if w1 > 200 then
sertxd("Dist is ",#w1,", switching to evade", 13,10)
random w0 ' choose which side, randomly
if b0>120 then
gosub evade
else
gosub evade2
endif
endif
if pin0 = 1 then
gosub hit_right 'right bumper hit
elseif pin3 = 1 then
gosub hit_left 'left bumper hit
endif
goto main


hit_left:
'left bumper hit!
sertxd("hit left", 13,10)
gosub bck_right ' go very little backward
gosub bck_left
pause 250

gosub bck_right ' turn very little to the opposite direction
gosub fwd_left
pause 250
return

hit_right:
'right bumper hit!
sertxd("hit right", 13,10)
gosub bck_right
gosub bck_left
pause 250

gosub fwd_right
gosub bck_left
pause 250
return



evade:
gosub fwd_right ' turn one side
gosub bck_left
gosub read_dist
if w1 > 140 then
goto evade ' if still close to something, keep turning
endif
sertxd("Dist is ",#w1,", switching to main", 13,10)
return

evade2:
gosub bck_right
gosub fwd_left
gosub read_dist
if w1 > 140 then
goto evade2
endif
sertxd("Dist is ",#w1,", switching to main", 13,10)
return

read_dist:
' make average of two reads
' hoping to remove some disturbance
readadc10 4, w2
readadc10 4, w3
let w1 = w2+w3
let w1 = w1 / 2
sertxd("#A:",#w1,";", 13,10)
return

fwd_left:
low 4
high 5
return

fwd_right:
low 6
high 7
return

bck_left:
high 4
low 5
return

bck_right:
high 6
low 7
return

stop_left:
low 4
low 5
return

stop_right:
low 6
low 7
return

navigate via IR sensor and touch sensors

  • Actuators / output devices: SBGM9
  • CPU: Picaxe 28x1
  • Power source: 4x1, 2 AA battery
  • Programming language: Basic
  • Sensors / input devices: Sharp IR, microswitch touch sensors
  • Target environment: indoor flat surfaces

This is a companion discussion topic for the original entry at https://community.robotshop.com/robots/show/another-first-robot-based-on-fritsl-design

wow im prety impressed at
wow im prety impressed at how good that is for a first robot. and the extra bumper bar thingos are pretty cool. now all you have to do is add a mini gun. =0

very good look robot, you
very good look robot, you have made a nice job, gratz

Very smooth! I like the

Very smooth! I like the non-servo approach, it gives a funny sniffing robot!

And bumpers are also a very good idea! Cables are hard to detect with sensors alone.

(I do not know why you call it anything with my design - very large of you, but it is solely yours, and a nice robo too :D)

You can give it (cheap) IR-sensors to stop it from driving off a table… and then you can also use it as a sumo! (Have 2, and make them push each other out of a ring) Crap videos, but this might interest you for inspiration: https://www.robotshop.com/letsmakerobots/node/37

Cool, wel made, and welcome :slight_smile:

/ Fritsl

 

Hey… PS: You have 2 sensors… Are they connected to the same port? If not, you can make it make logic choises regarding which side to turn to!

It looks as if the IR already is made quite smart from you, so that it does not just make random turns?

:slight_smile:

Thanks everybody :slight_smile: I’m

Thanks everybody :slight_smile: I’m very happy you liked it! I wasn’t even sure i could build one… The soldering sessions was quite scary, those were my first ones :stuck_out_tongue:

About the sensors: the bumbers uses two different pins so are distinct, and indeed the robot turn on the opposite site. You can see for example in the second video at 7s, when it hit the wood piece.

The IR sensor instead, being just one, he can’t choose where to turn and actually chooses a direction at random. I considered checking if the distance was growing or decreasing during the turn so he could see if it’s gettin near the surface, but it looks good and somewhat natural as it is so i left it :slight_smile:

Thanks again :slight_smile: I’ll post other creations as soon as i do them!