A simple light chasing robot

I’ve been meaning to try this idea for a simple direction finding car for ages. The idea is you place down a light source (i.e. a torch) and the car will head towards it. This was going to make the core of a practical but that wasn’t to be, so it’s been on the back burner for a while. It’s not only simple but very cheap, so I didn’t want to spend a lot on it.

The impetus came when someone released some sort of Arduino car the result of which is you can now get wheel/gearbox/motor assemblies on EBay for 99p if you’re prepared to wait for a boat from China (£1.50 if you’re impatient). That allowed me to make tis for a very very low budget.

Before I continue, I do realise this would have needed fewer components and been more flexible with a microcontroller. I prefer playing with not-computers on the weekend and I also like the appeal of the “no magic” aspect of it. Even an 8 pin uC like an ATtiny or a PIC12F675 would have been more expensive.

Anyway, the first part is to make a directional light sensor. I made this from an LDR (10p in a bag of 20), black card, tape and glue. They look like this:


And here’s how I made them:

  1. Make a tube of black card and tape it up.
  2. Push an LDR into it so the back of the LDR is about 5mm in.
  3. Fill up the hole at the back with grains of hotmelt glue.
  4. Heat gently with a heat gun (100C) to melt the glue.
  5. Repeat 2-4 until it’s full.
  6. While the glue is molten, gently wiggle the LDR to spread the glue.
  7. Tape over the back with opaque electrical tape to prevent light ingress

They’re pretty directional by my reckoning. It’s hard to get a good measurement of sensitivity because I don’t have an infinite point light source and by the time the resistance gets to 200k, even small stray reflections can have a quite large effect. Even so, here’s some hacky measurements:


On order to tell which direction a light source is, you need to have two pointing in different directions and compare their level. The light is on the side which has lowest resistance. To make a direction finding car, you need to turn towards the side with the lowest resistance. Since I have motorised wheels, this is a question of running one motor or the other.

Then of course, you need to build it into a car:

Note how the two sensors are pointing outwards in different directions. There’s also a castor at the back. The body is just a bit of scrap pine, and the motors are screwed to it with some M3 studding. It also turns out the tyres are a bit slippery and the motors spin up fast with plenty of torque, so the first version just sat and span the wheels going nowhere. I velcro’d the battery to the front to get more traction. It’s tricky to get velcro to stick to end grain stronger than it sticks to itself, about the only thing I’ve found reliable is gorilla glue.

Plus this is the first and only time I’ve used the sticky pad on the bottom of a breadboard.

The circuit diagram is very simple:


Total cost about 90p (not including batteries).

The two LDRs form a divider and the midpoint is compared to a reference with a comparatorvery cheap opamp. The op-amp switches on one motor using a massively overspecced MOSFET. The other is connected via an ad-oc not gate, so either one motor is on or the other is. I could have used the other half of the dual op-amp for the inverter, but I have future plans for that.

As long as you get the LDRs and motors the right way round, it will always turn towards a strong light source. Here’s a video of it in operation!

There’s an LED torch down at the far end of the hall and the car heads right towards it. The wild swinging backwards and forwards is because it can only have one motor on at once and because there’s a fair amount of momentum and slip. So it spins one wheel cranks up to speed, and passes the midpoint. The other wheel comes on, but it keeps on swinging until eventually the other wheel bites at which point it’s way over. So it has a long way to come back by which time it’s got plenty of speed by the time it crosses the mid point and so on…

Works pretty well for sucg a simple version 1 🙂



Die grinder woz ‘ere

In the world of heavy automation and mass production it’s sometimes easy to forget that there’s a person around at every stage. But sometimes a nice little reminder finds its way through. A while back I bought a Raspberry Pi universal power supply. It’s universal in that it comes with a selection of mains prongs which clip on.

There’s a disposable plastic cover for the area in which they clip on, and on the inside of the cover, some person wrote the initials “bc” by hand with a die grinder, between the ejector pin holes:


It’s probably a little messy because it’s hard to write with a die grinder and they had to mirror-write it so it looked right after moulding.

Can it be true? That I hold here in my mortal hands, a splat of purest crud?

Today, a semi-successful experiment. I tried to make a small arc furnace using an arc welder, a graphite crucible and some inanimate carbon gouging rods. The goal was to melt aluminium successfully enough to do some casting. The idea behind using the arc welder is that it’s accessible and doesn’t require faffing around with fire, and getting the consumables brought in (gas, for example). The whole thing ought to be less messy and quicker to set up and tear down.

The furnace consists of a solid, 4kg sized graphite crucible (remarkably inexpensive) sitting in a badly welded, but very stable steel holder steel holder:


An arc furnace. The white stuff on the inside is alumina fumes which settled on the side.

The idea was to strike an arc with the crucible and a copper clad carbon rod (a gouging electrode). It kinda worked, but the arc was pretty unreliable and surprisingly weedy even on the highest setting on the welder. I had much better luck striking the arc between two carbon rods and moving that around as a heat source.


The rods are very much a consumable!

That kinda worked, and I was certainly able to get some melting (as you can see in the splat). Enough to prove the principle but not enough to actually do some casting. The summary is kind of:

  • Someone stole my flux (own brand lo-salt), so I got a lot of aluminium oxide for my troubles.
  • The welder doesn’t like the 16A breaker for the outdoor power socket. Works fine on the other 16A breaker in the basement but keeps tripping out.
  • Not enough insulation, a rather large crucible, repeated cutouts and cold weather meant I couldn’t retain enough heat to make a pour.

The thing to do now it appears is to make the furnace by hollowing out an alumina firebrick. They’re very porous and so excellent insulators (one video has the person picking up his brick with bare hands with a pool of molten aluminium in the central hole).

Nonetheless, it proves the principle. The 400 and 600A (one of each) crocodile clip style rod holders hold the carbon rods well. The rods work, strike an arc and provide aluminium melting heat.