Raspberry Pi Project Advice

Pufferfish94

Senior Member
Joined
Sep 6, 2016
Messages
647
Reaction score
125
Okay so I have never worked with a raspberry Pi before but I have a fun project I have been wanting to work on.

Essentially we have a 1 car garage but 2 cars, I am wanting to know when a car is parked in the garage already or if it is available for me to use without having to pointlessly open and close the garage door.

My assumption is that I can hook a break beam sensor up to a raspberry Pi to turn an LED light red or green to indicate if the parking is available or not.

Are my initial thoughts correct? What materials would I need to achieve this? Where can I source those materials?

Thanks in advance!
 
Okay so I have never worked with a raspberry Pi before but I have a fun project I have been wanting to work on.

Essentially we have a 1 car garage but 2 cars, I am wanting to know when a car is parked in the garage already or if it is available for me to use without having to pointlessly open and close the garage door.

My assumption is that I can hook a break beam sensor up to a raspberry Pi to turn an LED light red or green to indicate if the parking is available or not.

Are my initial thoughts correct? What materials would I need to achieve this? Where can I source those materials?

Thanks in advance!
You'd be better off using a microcontroller (raspberry Pi is a microprocessor) - far simpler and it's bulletproof as it doesn't have to run a big OS or need an SD card. Arduino is the most common. You can get away with an Arduino Nano for R200. Alternatively a Raspberry Pi Pico (microcontroller) will be fine too though I haven't had much experience with them so can't comment, but I imagine they're easy to use. If you're still learning, get one with the soldered headers on board to make it easier to plug things in.


 
Even easier, just get these and be done with it:


They take 12v input and a relay is switched when the beam is broken - you can run an LED off that.

Probably the way I’d go. It’s full proof in the sense you don’t have any OS to maintain or server etc
 
Even easier, just get these and be done with it:


They take 12v input and a relay is switched when the beam is broken - you can run an LED off that.
Okay cool that sounds like a good option then!

When I say I have never done a project like this I mean that seriously, so how would I go about connecting the LED to the sensors and how would it know when to turn green / red? Also should I be looking for any specific LED for this?
 
Okay cool that sounds like a good option then!

When I say I have never done a project like this I mean that seriously, so how would I go about connecting the LED to the sensors and how would it know when to turn green / red? Also should I be looking for any specific LED for this?
You'll need 2x LEDs and a couple of resistors to limit the current.
Go with the super bright LEDs if you want it to be more visible in daylight:

Depending on what you want to achieve, I assume you want green if there's no car in there and red if there is?
I see the Centurion device already has an LED built in that turns on when aligned (when no car breaks the beam), you can possibly steal power from that LED to power your own - no resistor required as the LED will already have one in the circuit if you just disconnect it and connect your own off a piece of solid core (low impedance) comms cable. A nice piece of Cat5 or higher data cable will work - use one twisted pair for your + and -.

Short of building it myself, I can't offer advice on sizes of components - but make sure the LED works on 12v. Resistors are cheap, so get a few to experiment with - starting with maybe 1k and down to 100 ohm at the low end. If 1k is fine and the LED glows nicely, stick with that.

More info here on the resistor setup: https://sciencing.com/wire-leds-12v-5743679.html

I'll have a look at my beams later when there's time to confirm whether the relay used is normally open or normally closed, hopefully NO - that would be easier.
 
Stick a camera in the garage.
Also a cheap option:

Comes with an app for your phone.
 
Okay cool that sounds like a good option then!

When I say I have never done a project like this I mean that seriously, so how would I go about connecting the LED to the sensors and how would it know when to turn green / red? Also should I be looking for any specific LED for this?

That will be done with the programming side of the project. The hardware side will be connecting the led and the output of the beam to the arduino.
 
Stick a camera in the garage.
I think the idea is - when he drives home he wants to see if there is a car in the garage before he opens the door. If there is no car he can open the door and park in the garage, if the wife got home first then he wants to see a red light meaning he must park in the driveway.

Camera is not going to be the best solution here. Having a screen mounted on the outside of the garage is also going to have its own risks.
 
I think the idea is - when he drives home he wants to see if there is a car in the garage before he opens the door. If there is no car he can open the door and park in the garage, if the wife got home first then he wants to see a red light meaning he must park in the driveway.

Camera is not going to be the best solution here. Having a screen mounted on the outside of the garage is also going to have its own risks.
Ohhh ok.

Well no that's easy. Just tell the Wife to always park outside? the man gets the garage.
 
I built something like this a few years ago. Arduino is the way to go.
Either use a ultrasonic transducer or a IR LED to detect when the car is in the garage. Then when it's detected switch a red/green LED on/off.

Very simple project and lots of fun.
 
Ohhh ok.

Well no that's easy. Just tell the Wife to always park outside? the man gets the garage.
I wish I had the power you think I do lol.

But the main issue with that is that our driveway is single lane so her not being in the garage would block me from getting in
 
I would definitely go Arduino instead,it's meant for electronic input -> minor processing -> electrical outputs

Botshop (used to maybe?) run a monthly course on Arduino programming,might be they still do - includes a starter project kit with the bits and bobs and they do a few different stages from initial and wiring to programming the unit for outputs
 
My assumption is that I can hook a break beam sensor up to a raspberry Pi to turn an LED light red or green to indicate if the parking is available or not.
There are many approaches that can solve this requirement. The simplest is something like an IR beam (as per lkpat's suggestion) which gives you a relay output to control the LED(s), or you can use a RPi/Arduiono/any other controller to read the input from the detector and drive an output for the LED. This then performs the same function as the already present relay output of the IR sensor.

If you want to do more complex things (check garage status over the internet, get text message on phone or some other automated alert when the garage status changes) then using a more sophisticated controller makes sense. If you want to start with the simple LED requirement, but want to get started with RPi (or any of the other suggestions) then it is a good first project.
 
You don't necessarily need 2 LEDs, just one. If LED is on then the condition is true, if off the condition is false. But yes different coloured ones is nicer.
 
Top
Sign up to the MyBroadband newsletter
X