Let's Make Robots!

Using photoresistors with PICAXE-28X1 as a switch

Hello my name is Robin and I am new here. I finally decided to make my first robot and ordered parts online, they are still on their way, so I have not seen a picaxe board in real life yet.


I was trying to get sleep yesterday and I started wondering.

-Would it be possible to use a photo-resistor with the “How to make your first robot”-robot and make it automatically trigger a “driving” light for the robot when it gets dark?

Ore is the Sharp GP2D120 IR Sensor

no good in dusk?


Apologizes for my bad English


Comment viewing options

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

Firstly, welcome to LMR!

The Sharp IR sensor already has a built-in IR LED, so the SHR (Start Here Robot) will actually be able to see even better in total darkness than during the day, because there's less ambient light to interfere with the sensor readings.

If you want to give your bot the ability to sense how much ambient light is around for other purposes, then a photoresistor is a good choice. You can connect a photoresistor and a fixed resistor together to form what's known as a Voltage Divider, and you can connect the middle of the voltage divider to one of your PICAXE's input pins to allow your bot to sense the light levels. The value of the fixed resistor will depend on the resistance range of your photoresistor and also how sensitive you want your bot to be.

You can do all sorts of things with just this basic sensor configuration: make your bot turn on a headlight as you mentioned, make your bot more or less active at night (imitating diurnal/nocturnal animals), turn around and retreat when entering a dark area, and of course about as many more options as you can dream up.

Have a think about what you'd like your bot to do; there are plenty of people here at LMR that can help you figure out how to do it.

:D I knew it! I will probably be asking how it is done in a couple of weeks, if I don't figure it out myself.

Can't wait to get my parts!

I got it working! :D Now when it gets a little dark, my RP-01 robot turns on its lights and when completly dark it goes to sleep mode.

Sounds awesome, congrats =)

Go take some photos/video and post your bot here =D