Little Dog, Big Step
My dog (Ally) is a dachshund (aka. weiner dog) and is short at only 9″ tall, but quite long at 22″. My back step is about 7″ from the ground and quite a jump for such a short little dog.
Short and Almost Blind…
My wife an I noticed that Ally was showing signs of back issues and attributed it to the back step since she often struggled to get into the house.
To solve that issue I build a ramp that would allow the dog to walk easily in and out of the house and require no jumping. The only problem was that Ally seemed to prefer jumping at the side to walking up the ramp and I had to block the sides to force her down the middle. After that training and in daylight she was fine to use the ramp.
After the sun went down, we noticed that Ally seemed to be a bit blind. She is an older dog so it makes sense that jumping and her vision would be a couple of her struggles.
To solve the vision issues and to help her find the start of the ramp I decided to add some LED lights. I didn’t want the lights to be on all the time, and I thought it would be fun if the lights only highlighted the ramp when it was needed.
A NEW Project!
I decided to tackle this project with a motion sensor, a microprocessor, and some addressable LED strips to create the perfect dog ramp!
I’ve been looking for a project to play around with addressable LEDs and this seemed like the perfect project. I already had a PIR (motion) sensor from another project and several microprocessors.
I decided to use my 3D printed to create the box to hold everything. So this became a project in a project!
It took several iterations of the 3D box before I was able to create a box that was big enough to contain all the parts, and the first few designs lacked holes for the wiring.
Having the 3D printer available certainly made it easy to create the chassis box that is a perfect fit for the project. Of course, once I had the design figured out I decided I should have done it in black!
While the box was being printed, I worked on the wiring and coding for the LEDs. The LEDs themselves are very easy to wire as there are only 3 wires; positive, ground and signal.
The programming was also quite easy and based on some samples from the web I was easily able to put together a chaser algorithm for the project.
The wiring is very straightforward. Besides power, there are only 2 wires of interest. The signal wire from the PIR (motion sensor) and the wires to the LEDs to send signals to the LED controller.
Chaser Lights for a Cool Effect
The lighting algorithm was designed as shown below in pseudo code and used random colours between each iteration. The full source code is attached at the end of this post.
if motion detected while loops < 5 get a random colour change all LEDs one-by-one get a random colour change all LEDs in reverse order one-by-one end while end if change all LEDs to black
The results worked out perfectly and I am already looking for the next project where I can use addressable LEDs like these.
I may also add some additional code to the solution to allow me to turn the ramp off wirelessly from in the house. Oddly my wife is not keen about walking the runway when she heads to the hot tub! 😀