1 sensor line tracking picaxe 08m

only one sensor line tracking, created and programed with picaxe 08m

circuit, very simple:

sensor, lth:

robot:

program:

main:
readadc 2,b0
if b0 < 50 then blanco
if b0 > 50 then negro
low 1
low 4
pause 100
goto main

blanco:
low 1
high 4
goto main

negro:
high 1
low 4
goto main

circuit, simple:

Line tracking

  • Control method: Picaxe 08M
  • Power source: 4.5V (3AA)
  • Programming language: Picaxe basic
  • Sensors / input devices: LTH209 IR

This is a companion discussion topic for the original entry at https://community.robotshop.com/robots/show/1-sensor-line-tracking-picaxe-08m

** I am not fluent in PICAXE,**

 

I am not fluent in PICAXE, but I am intrigued in the simplicity and the one sensor. How do you know whether to adjust left or right when you go off line?

** maybe the line is half**

 maybe the line is half black and half white. So when it sees white, it goes left and when it sees black, it goes right.

** I have to try this!**

 I have to try this!

I don’t know if it matters

I don’t know if it matters but the normal way is to have the load (motor) on the collector side of the transistor. You should probably also have 1k resistor on the base to saturate the transistor. I would also recommend having a diode over the motor.

@arbarnhart: It seems that he is using two motors and two transistors and just running one of them to turn. (I might be wrong…) 

Trying to interpret the

Trying to interpret the code, it appears it will go straight only with a sensor reading of exactly 50. Higher, it adjusts one way, lower the other. Is the line a seam between a black panel and a white panel?