Pedestrian Crossing, re-imagined

Hi guys,

I’m an art student back with another project on the go.

I’m wondering if someone can help hold my hand a bit with motion sensing and ultra-bright LEDs.

I’ve got a pedestrian crossing which I’ve gutted, and want to re-program using my own logic, utilising motion sensing. So basically, when someone is within range of the object and moving, it tells them “don’t walk”, and as soon as they are still, it tells them “walk”. Think of it as a fickle/bossy/condescending pedestrian crossing that responds to your presence. I need the motion sensor to know at all times whether there is movement, as I would like the light to be immediately responsive.

As an artist I’m interested in what it means to be human in this technological age. This work is a contemplation of daily interface to rules and assumptions. I’m interested in what happens to the viewer when an object with known behaviours acts according to different logic.

Very grateful for any help, eager to learn, able to follow a good tutorial but not much brain capacity in the way of calculating things to do with numbers. Voltages and Watts and Ohms law frighten me a bit. It seems like every time I learn it I feel like I know it, but to put it in to practice is another thing all together.

I want to use my Raspberry Pi Zero. My pedestrian crossing was lit with 2 regular white household light globes before I gutted it. I’d like it to be bright, like, almost hurt your eyes levels of bright. The Red/Green from walk/don’t walk are embedded in the object itself, so my light need only be white.

The crossing also has inbuilt mirrored reflectors which I’m assuming amplify light pretty well. This also means that the angle of light needs to be arranged in a way that it will bounce outwards like a regular light globe. I’m just not sure what sort of lights I’ll need to emulate a strong household globe, and how to go about powering them.

Many thanks in advance!


Hi Marian,

Sounds like a fun project and could potentially get some odd reactions out of people interacting with it. I’ve got a couple of suggestions for the motion-sensing part, the high power LED part is a bit trickier but I’ve found some resources that explain the challenge in as simple terms as possible.

Motion sensing is normally done cheaply and easily using a PIR sensor, a lot of the PIR sensors Core sell operate at a higher voltage than your Pi Zero. You’ll need to double-check that the one you choose has a logic output level of no more than 3.3V, otherwise you have to add a logic level converter to stop the sensor from damaging the Pi.
This sensor I’ve linked below should run happily at 3.3V without requiring you to modify it like some of the others. It is your most basic type of PIR sensor, just a digital output pin that goes HIGH when motion is detected.

Another option would be to use a PIR sensor via the I2C interface of your Pi Zero, this means the device will know to wait until it has stabilised before giving an output reading but this adds a lot of complexity for not much gain. There is a hookup guide with library examples to use the I2C PIR sensor available.

High power LEDs like this 5-pack need to be driven by a power supply that won’t let them burn themselves out.
The video below is the best explanation I’ve seen yet in reasonably simple terms.

You can see those LEDs in action in this video to get a gauge of how bright they are here.

Unfortunately, the Pico Buck and Femto Buck constant current supplies mentioned in those videos have been out of stock for some time, so you may need to do a bit of searching to find a constant current driver that will suit the LEDs.

One other option which doesn’t strictly use high power LEDs directly might be to use something like a GlowBit Matrix and get your desired brightness via the sheer number of LEDs used. This would mean using addressable LEDs that need a library to drive them, and a beefy but more common type of power supply can be used.

Will your pedestrian crossing be connected to a mains power supply? If this needs to be battery operated things get a bit more difficult.


Ahh you’re amazing Spookee, thank you so much for taking the time to respond so thoroughly!

Firstly, regarding the PIR sensor, that looks really good spec-wise and simple enough for me to figure out. Thanks a bunch.

For the lights, I feel like the GlowBit would be a good option due to availability and the really well designed documentation - that quick start video is golden for people like me who are flailing around trying to make sense of it all.

Definitely not a battery operated project, so no issue there! I can’t seem to find out more about hooking it up to a power supply though, right now I have a 12V 2.5A AC Adaptor with a screw terminal block, would that work? The documentation says to get a 5V, 2A fixed voltage Plugpack. I don’t pretend to know anything about power :slight_smile:

I’d be looking to get two GlowBits, and If I’m reading correctly, two should be fine to run from the 1 power supply?

Am I missing anything? On my shopping list I’ve got the two GlowBits and the PIR sensor. I’ve got wires and soldering supplies around the place, a fair chunk of enthusiasm and a brain ready to learn.

Thanks again!


That will be very useful for some things, but not the GlowBit. That requires 5v at up to 2A (depending on the required brightness).

This is an example of a 12v bright white LED array. They actually come in many different shapes with a variety of bases. It has the advantage that you would control it from the Pi with a relay module and a simple on/off control from a GPIO pin, rather than programming individual pixels in an array.


Hi Marian,

I’m assuming you have a plugpack that outputs 12VDC at 2.5Amps, if your existing supply does have a DC output then it would be far simpler to go with @Jeff105671’s suggestion of finding a bright 12V LED light. The Glowbits will add extra complications which are only really beneficial if you’re going to want RGB colours.

The current requirement of the PIR sensor I linked maxes out at 100microamps, so it’s low enough you can drive it from the 3.3V rail of your Pi Zero safely which eliminates the need for a dedicated 3.3V supply or logic level converter circuit for it.

If you go with a 12V light your project will need two power supply rails to operate, one may be achieved by connecting a regulator to the other. For example, your 12V DC supply might feed the LED light, a relay to switch it, and a 5V regulator. The output of the regulator could then feed the Pi Zero, which then feeds the PIR sensor via its 3.3V pin. The negative of all these circuits would be connected together to a common point to prevent them from floating in reference to each other.

To check what current output the 5V regulator should have you can find the typical power requirements of Raspberry Pi boards using the link below. Most of these figures assume USB peripherals like keyboards and mice are connected to the Pis so the Max Stress figure for the Pi Zero module itself might be more relevant.


Hi guys! Back with a project update.

Here she is! Pedestrian Crossing on Vimeo

After chatting to a friend, I realised that I could use a motor controller that I already had to run 12v through to an LED strip. It worked really well as a way to test the concept quickly, though now I would like to reclaim my motor controller for another project, and also move the pedestrian crossing from mains to battery power, so that I can install the crossing in fun places, like a forest, or the middle of a field.

Hoping for some battery related advice!

I’ve since gotten my hands on an Arduino Nano and an Uno. Keen to use one of those for this next iteration. I also purchased 2 x 5v LED matrixes Kitronik Round 5V LED Matrix Lamp Kit | Core Electronics Australia

So in order to power said LEDs, will I need a 2 channel 5v relay module? I am assuming that I will kill the Arduino if I try to power it from there. I have a battery pack capable of powering 2 5v devices at once, do you think that would work, or is there some other power solution I should be looking at to make this mobile?


How long does the battery need to last? For serious light, some of the mains powered floodlights would be the go. These could be powered by an inverter (12V->240V) from a car battery. 4 x 50W on a short pedestrian crossing would achieve your ‘hurt your eyes’ bright. I assume these are not on all the time, just when a sensor picks up movement. A decent car battery should last an hour of on time, they are normally rated in Amp hours (how many Ampere for how long), 60Ah is a medium to big battery. A 500Watt inverter will draw about 40 Amp maximum so could deplete the battery to around 30% capacity in an hour, it is not nice to discharge it more and it should be recharged the next day to give it a good life. However, 4 x 50W is only 200W so the draw should be less and so stress the battery less.

Most of the cheap modified sine wave inverters come with a USB socket that can provide 5V but maybe not enough for your project. And then you’ve got 12V from the battery. The lights can be switched on and off by a heavy duty relay, there are interfaces to microcomputers to do this.

This is not a cheap option, maybe $600. Don’t know your budget.


Hi Marian,

Thanks for getting back to us with an update, it’s always great to see a project come to life bit by bit.
Where did you manage to find the traffic light module? That doesn’t seem like something you find new on the shelf of a store.

It’s best to power your lights directly from a 5V power source and just have the Arduino switch them on and off via a digital output pin. You could use a relay for that but it’s overkill as you don’t need electrical isolation between your high power circuit and your control circuit.
I’d recommend connecting your lights to a 5V power supply via this MOSFET switch kit, then just feed a digital output from the Arduino to the gate pin of the MOSFET.


I have the desire and need to connect 20 of these lights in one circuit. Can you tell me the best way to do it so that I don’t burn anything? If you don’t mind :slight_smile:

1 Like

It’s difficult to tell the wattage of those lamps - it could be anything from 2W to 5W - you would need to confirm the actual value for your particular item. At 5W each, a string of 20 would be 100W, or about 8.5A at 12v. A suitable supply is:

If your items are about 2W or less you would get away with the 5A version. You will wire them in parallel.