Notifications
Clear all

Garage lighting and parking sensor project

59 Posts
10 Users
22 Likes
1,600 Views
TASan
(@tasan)
Trusted Member
Joined: 12 months ago
Posts: 42
Topic starter  

I will use this post as a place to post my progress on a project for my garage. I am posting it in "Help Wanted" because I will inevitably need some help here. This first post will just be me trying to define the project for myself.

The end result for phase 1

I am going to split the project into phases. For the end of phase 1, I want to have the following setup:

  • Four 24V 75W RGBW LED strips of 2.5 meters each in the ceiling
  • A 24V DC power supply mounted in a box to the ceiling next to the outlet
  • An Arduino mounted in a box to the back wall with an ultrasonic sensor pointing forward and a PIR sensor pointing towards the side door

Β 

This is the functionality I want for phase 1:

  • The LED strips turn on full white when the PIR sensor detects motion, such as when a person enters the garage through the side door
  • The LED strips turn on full white when the ultrasonic sensor senses a car approaching, such as when backing into the garage
  • The LED strips turn on full green when the car is the proper distance from the sensor so that the garage door can close AND the trunk/boot door can open safely. I call this the safe zone for parking.
  • The LED strips will flash full red if the car gets too close to the sensor
  • The LED strips will turn full white for X seconds when the car has been stationary in the safe zone for Y seconds so that you can get everything out of the car and leave before the lights turn off

Β 

Considerations when it comes to programming:

  • I should probably debounce the ultrasonic sensor both so that I don't take readings too often, but also in a way that I filter out false large distances that I have seen happen in my tests. It can jump from 20 cm to 1086 cm and then back again. I need to make sure a large change in distance is real before acting on it.
  • I should probably program some "states", such as "car approaching", "car leaving", "car parked", and "no car present" so that I can ignore the PIR sensor when a car is approaching or leaving, etc.

Β 

Thoughts for phase 2

In phase 2 I want to add some other functionality. I want to connect the Arduino to my garage door opener using a cable so that I can automatically close the door when the car has left while simultaneously flashing red lights. I also want to add a magnetic switch or tilt detector to be able to tell if the door is open or closed. I fear that adding a tilt detector to the door will be a nightmare to cable manage, so a magnetic switch will probably be better. The garage door opener has an input for a photodetector that I could also add to stop the door if someone or something gets in the way while it is closing.

Current status

I have been shipped most of what I need to start this project. What I have done so far is being able to control the LED strip and fetch and use data from the ultrasonic sensor. I am going to work with the PIR sensor next. After that is up and running it's just a matter of programming the logic. The last, and for me the hardest, step is to connect all of this in a respectable package and mount it in the garage. I am particularly stressed about being able to connect the MOSFETs, resistors, and cables in a sensible way. I really want to just use Wago connectors and heat shrink, tucking everything into the boxes so it's not visible. But I probably have to buy a soldering station and learn to solder. I just want to avoid it if I can, because this is my first project and I don't really know how many other projects I will do that will require soldering given my daily time constraints right now. But again, I want to make something that can last.

Until the next post! πŸ™‚

Interested in learning about electrical engineering!


   
Inq and ron bentley reacted
Quote
Inq
 Inq
(@inq)
Noble Member
Joined: 2 years ago
Posts: 1842
 

Exceptional write-up!Β  It's nice to see the full conceptΒ before versus others coming right out and saying, "It's broke... what's wrong?" before they describe the setup.Β  🤣Β 

Β 

3 lines of code = InqPortal = Complete IoT, App, Web Server w/ GUI Admin Client, WiFi Manager, Drag & Drop File Manager, OTA, Performance Metrics, Web Socket Comms, Easy App API, All running on ESP8266...
Even usable on ESP-01S - Quickest Start Guide


   
ron bentley and TASan reacted
ReplyQuote
TASan
(@tasan)
Trusted Member
Joined: 12 months ago
Posts: 42
Topic starter  

@inq I'm guilty of that too, but this time I wanted to document the process both for myself, and also so that any errors are easily pinpointed! πŸ™‚

Interested in learning about electrical engineering!


   
ron bentley reacted
ReplyQuote
(@hilldweller)
Estimable Member
Joined: 12 months ago
Posts: 111
 

I've stuck a lot of LED strips and my first thought is you may be surprised at your first failure, as soon as they get warm they will fall off the ceiling. Super glue fixed it for me.

Dronebot has a brilliant video on measuring distances. Ultrasonic has real problems, if the air is moving due to wind, car, exhaust it can screw up the measurements. You may cure this in software.

You'll have all the local kids queuing up to see you park, better than an episode of Doctor Who.


   
TASan and ron bentley reacted
ReplyQuote
ron bentley
(@ronbentley1)
Honorable Member
Joined: 2 years ago
Posts: 392
 

@tasan, @inqΒ 

I agree whole heartedly with inq, it's really nice to see objectives and success criteria laid out.

I like it!!!

Regards

Ron B

Ron Bentley
Creativity is an input to innovation and change is the output from innovation. Braden Kelley
A computer is a machine for constructing mappings from input to output. Michael Kirby
Through great input you get great output. RZA
Gauss is great but Euler rocks!!


   
TASan reacted
ReplyQuote
TASan
(@tasan)
Trusted Member
Joined: 12 months ago
Posts: 42
Topic starter  

@hilldweller Hehe, yeah!

I'll be sure to check it out. The car is electric so the exhaust will not be a problem, but yes, I have seen the values fluctuate a bit. I might change to another sensor, but the ultrasonic was in the kit and other sensors are more expensive, like LIDAR.

Interested in learning about electrical engineering!


   
ReplyQuote
Inq
 Inq
(@inq)
Noble Member
Joined: 2 years ago
Posts: 1842
 

Posted by: @hilldweller

I've stuck a lot of LED strips and my first thought is you may be surprised at your first failure, as soon as they get warm they will fall off the ceiling. Super glue fixed it for me.

I've thought about lighting my whole workshop similar to what @tasan is doing except without all the smarts 😏 ... are you saying that the 3M double sided tape that often comes on these things isn't even good enough to keep it stuck?

Β 

3 lines of code = InqPortal = Complete IoT, App, Web Server w/ GUI Admin Client, WiFi Manager, Drag & Drop File Manager, OTA, Performance Metrics, Web Socket Comms, Easy App API, All running on ESP8266...
Even usable on ESP-01S - Quickest Start Guide


   
ReplyQuote
Ron
 Ron
(@zander)
Illustrious Member
Joined: 3 years ago
Posts: 5883
 

@hilldweller FYI @inq @tasan RV's use 3M VHB tape to secure solar panels on RV's going down the road at over 100 Km/Hr, they won't fall off if that tape is used.

Arduino says and I agree, in general, the const keyword is preferred for defining constants and should be used instead of #define
"Never wrestle with a pig....the pig loves it and you end up covered in mud..." anon
My experience hours are >75,000 and I stopped counting in 2004.
Major Languages - 360 Macro Assembler, Intel Assembler, PLI/1, Pascal, C plus numerous job control and scripting


   
Inq reacted
ReplyQuote
Inq
 Inq
(@inq)
Noble Member
Joined: 2 years ago
Posts: 1842
 

Posted by: @zander

@hilldweller FYI @inq @tasan RV's use 3M VHB tape to secure solar panels on RV's going down the road at over 100 Km/Hr, they won't fall off if that tape is used.

Hmmm!Β  I guess this means I can't open both ends of the workshop and use it as a wind tunnel.Β  Well crap!Β  😎 🤣Β 

Β 

3 lines of code = InqPortal = Complete IoT, App, Web Server w/ GUI Admin Client, WiFi Manager, Drag & Drop File Manager, OTA, Performance Metrics, Web Socket Comms, Easy App API, All running on ESP8266...
Even usable on ESP-01S - Quickest Start Guide


   
ReplyQuote
TASan
(@tasan)
Trusted Member
Joined: 12 months ago
Posts: 42
Topic starter  

@inq Oh no!

πŸ™‚

Well, I'll have them in opal diffusers, so at least they wont fall completely down and it will be an easy fix πŸ™‚

Interested in learning about electrical engineering!


   
ReplyQuote
(@hilldweller)
Estimable Member
Joined: 12 months ago
Posts: 111
 

Posted by: @inq

I've thought about lighting my whole workshop similar to what @tasan is doing except without all the smarts 😏 ... are you saying that the 3M double sided tape that often comes on these things isn't even good enough to keep it stuck?

Β 

The cheap reels of Neopixels I buy off ebay don't look like quality double sided tape and they are heavy and thin.

Β 

Add to that tasan was quoting huge power, mine are 1 or 2 amps at 5V.

Β 


   
ReplyQuote
TASan
(@tasan)
Trusted Member
Joined: 12 months ago
Posts: 42
Topic starter  

@hilldweller I bought some 5V at first, but then I realized they were like 40A so I quickly canceled the order and vent for 24V instead. They are 75W per 5 meters, so when splitting to 2.5 meters the power obviously halves. Should have mentioned that in the OP.

Interested in learning about electrical engineering!


   
ReplyQuote
(@hilldweller)
Estimable Member
Joined: 12 months ago
Posts: 111
 

Posted by: @tasan

@inq Oh no!

πŸ™‚

Well, I'll have them in opal diffusers,

Β 

Problem solved then. I hope you know how addictive this is. Next year you will have speakers, soothing music and rainbows drifting across the room to relax you when you get home.

Β 


   
ReplyQuote
TASan
(@tasan)
Trusted Member
Joined: 12 months ago
Posts: 42
Topic starter  

@hilldweller Let's say in ten years - I have two little kids so I barely have time to breathe, let alone think or tinker! πŸ˜€

But looking forward to the day!!

Interested in learning about electrical engineering!


   
ReplyQuote
(@hilldweller)
Estimable Member
Joined: 12 months ago
Posts: 111
 

Posted by: @tasan

I have two little kids so I barely have time to breathe,

Β 

I have two little kids. One is 50, the other 47. I've just spent two weeks helping one move into her new home as a result of a divorce. But the good news is, so much opportunity to fit her up with some ESP32s.

Β 


   
ReplyQuote
Page 1 / 4