Robotic metal finder

Posted: December 2, 2009 in Uncategorized

One of my first project’s I documented on my computer, was this so called “Robotic Metal Finder”. I build it from scratch I had laying around in my room, doing nothing so I thought it might be a nice little project to make. The whole project is powered bij an little but powerfull AVR Attiny13, that controls the interrupts of from the metal detector, and it controls the “left, right, backwards and forwards” of the RC-car. The input from the metal detector is created bij an voltage that is driving a LED to let the user see that it has found metal. The control of the RC-car is done bij some wires from the Attiny ports to the “Base” of the transistors on the RC-car’s PCB. A really simple construction, but héy it works!

All of the electronics are mounted on the back of the RC-car, on a breadboard because it was just a prototype. I have written a program to let it seek for metal in my garden, when found something stop and wait for 100 seconds.

Here are some pictures of what it did look like, with the schematic of the robot circuit:

Here’s the code, really simplistic and basic. Written in Bascom AVR.

'The ATTiny13 is used.
$regfile = "ATtiny13.DAT"
$crystal = 1200000

‘ I/O PORTS
Config Portb = &B11111101 : Portb = 00000000 ‘pb.1 is input

Dim Pinb.1 As Bit

‘ ALIAS
Forward Alias Portb.0
Backward Alias Portb.2
Left1 Alias Portb.3
Right1 Alias Portb.4

Aan Alias 1
Uit Alias 0

‘ VARIABLE START CONDITIONS
Forward = Uit : Backward = Uit : Left1 = Uit : Right1 = Uit

‘ BEGIN
Waitms 5000 ‘Time to put the robot down

Begin: ‘To start after a interruption

‘ INTERURRTION
On Int0 Metal Nosave
Enable Int0
Config Int0 = Rising
Enable Interrupts

‘ Main
Main:

Forward = Aan
Wait 10
Forward = Uit : Backward = Uit : Left1 = Uit : Right1 = Uit

Forward = Aan
Right1 = Aan
Waitms 1000
Forward = Uit : Backward = Uit : Left1 = Uit : Right1 = Uit

Forward = Aan
Left1 = Aan
Waitms 1000
Forward = Uit : Backward = Uit : Left1 = Uit : Right1 = Uit

Forward = Aan
Waitms 1000
Forward = Uit : Backward = Uit : Left1 = Uit : Right1 = Uit

Backward = Aan
Wait 10
Forward = Uit : Backward = Uit : Left1 = Uit : Right1 = Uit

Forward = Aan
Right1 = Aan
Waitms 1000
Forward = Uit : Backward = Uit : Left1 = Uit : Right1 = Uit

Forward = Aan
Left1 = Aan
Waitms 1000
Forward = Uit : Backward = Uit : Left1 = Uit : Right1 = Uit

Goto Main

Metal:

Forward = Uit
Backward = Uit
Left1 = Uit
Right1 = Uit
Wait 100
Goto Begin
Return

End

Comments
  1. vahid says:

    i would like to receive the circuit and ways of designing.about metal detector with it is full details .
    thank you in advance for your kind .

    • jjshortcut says:

      In this project I did not make the metal detector itself, I used a toy metal detector so I’m not able to give you full details about the inner works.

  2. Carlo Mares says:

    do you have a code for automatic robotic arm which it doesnt need any controller anymore it will just move repeatedly?? for pic16f877a thank you!

Leave a comment