Welcome to another wearable project by circuito.io, this time for your doggy!
We have quite a few dogs running around here. You've met Luna, our office mascot, in the Evil Fruit bowl project and you've also met Yahoo in our Animatronic tail project (although he's not really ours).
And now you'll get to say Hi to Nikki!How does it work?
The night collar is a colorful and fun project you can make in no time.
The parts you need are: LDR - photo-resistive sensor, an LED Strip and an Arduino ProMini at its heart, powered by a Li-po 7.4v battery.
The basic functionality is simple: Once the sun sets the LDR triggers the LED strip that will play pre-coded sequences. As soon as the LDR detects light, it will finish the sequence and turn off the LEDs. So actually, it's an automatic LED collar that lights up when it gets dark, and you don't need to do a thing, except for charging the battery from time to time.Setting up the circuit
Here’s a magic link to circuito.io which shows all the components you need for the project. You can add or remove different components from the circuit if you want.
If you would like to replicate the project we made exactly, click generate.
You can also make some adjustments to the circuit: for example you can add a Gyro sensor such as the MPU6050 and support it in the code so when your dog is sleeping or not moving, the LED display will stop and save power. You can also use a GPS and an SD module to monitor where your dog is wandering off to.
After clicking “Generate”, you’ll see 3 sections in the circuito.io Reply: BoM (Bill of materials), step-by-step wiring guide, and code.
- Going through the BoM, make sure that you have all the parts you need. Notice that there are also auxiliary components such as capacitors and jumper cables, that are necessary for your project.
- Next, follow the step-by-step wiring guide which will show you exactly how to put together your circuit.
- Last, in the code section, you'll see a sample code for your circuit. This code is not specific for the tail project, but rather it is a sample code that activates the different components in your circuit.
To Upload the code, follow these steps:
- Download the code from the circuito.io reply
- Extract it to your computer
- Open with Arduino IDE
- Upload to your Arduino
Once everything works properly, replace the sample code you received from circuito.io with the code in this tutorial. Make sure to leave the //Include Libraries and //Pin Definitions at the top of the code, and also keep all the libraries that are on the original code from circuito.io.
- Get a collar that suits you and your dog.
- Cut the LED strip to the desired length and attach it to the collar. Don't forget to change the number of pixels in the code according to the length you want.
- 3D print the casing for the electronics, provided later in this tutorial.
- Assemble the electronics in the casing.
- Go have fun with your dog.