The TMC2208 stepper motor drivers are a popular choice for reducing the stepper motor noise on 3D printers and laser cutters. They’re particularly useful because they can be used as an almost direct replacement for the A4988 stepper motor drivers which are already widely used. They have the same footprint and pin layout so that they are able to operate in place of an A4988 driver without any significant modifications.
Here’s a photo of the green A4988 driver on the left and the white TMC2208 driver on the right. The TMC2208 driver has a significantly larger heat sink, the boards are actually the same size.
I’ve heard that people have been impressed by how well they’ve worked to silence their 3D printers, but I was curious about how much quieter they would be. So I ordered two to try out. They’re typicallyy about $10 each (including shipping etc.), which is quite a bit more than the A4988’s, which you can often get for $2-3 each, but you only usually need 3 or 4 of them at a time, so it’s not an expensive upgrade. You can also often get much better pricing if you buy an upgrade set of 4 or 5 of them.
For this test, I’m going to compare the two side by side using the same motor so that you can hear the difference. I’ll also show the actual sound level readout in decibels from an app on my phone for comparison.
Here’s a video of the full test so that you can hear the sound difference for yourself:
Let’s start by setting them both up on a breadboard so that we can compare them. We’ll use the same signals from the Arduino to each driver, so both drivers are on the same supply voltage, the same logic level voltage and are receiving the same direction and step signals from the Arduino. I’ll just swap the motor connection between the two to change which driver is driving the motor.
I’ve also add a 10K pot to one analog input so that we can adjust the motor speed.
You may also have noticed, with the two boards set up side by side, that the current limit adjustment pot is on opposite sides of the two boards, so keep this in mind if you do swap your A4988 drivers with TMC2208 drivers so that you don’t install them the wrong way around.
Before starting, we’ll also need to set the motor current limit on each driver to suit this motor, which has a rated current of 0.8A. This is important to limit the maximum around of current which can be supplied through the motor coils so that the motor does not burn out.
Here is the sketch that I’m using to drive the motors using the potentiometer:
Lets start by testing the sound level on A4988 driver.
In full-step mode the steps are quite choppy when the motor is turning slowly, if we speed it up a bit it sounds a bit smoother.
So running at a medium to high speed, we have a sound level of around 74 decibels on the A4988 driver.
Let’s change the motor over to the TMC2208 driver and see how that does. I’ll also be turning the Arduino off between tests so that we’re not swapping the motor over while the coils are being energized.
I must admit that when I tried this the first time I got frustrated that I wasn’t getting the TMC2208 driver to work and I kept messing around with the connections and power supply until I noticed that it was actually working, it was just completely silent. I wasn’t expecting such a substantial difference, I thought it would still make a small amount of noise, but it is literally almost completely silent at low speeds.
If you turn the speed up a bit you can start to hear it. Even at high speed, we’re only getting an increase of around 3 decibels over the ambient sound level and most of this is caused by the motor “stuttering” which is likely caused by the poor quality connections on the breadboard.
Now, to be fair to the A4988 driver, when operating in legacy mode, the TMC2208 will automatically interpolate the received step signals into 256 micro-steps. So let’s try changing the A4988 driver to 16 micro-step mode (which is the maximum it allows). This allows the driver to micro-step the motor 16 times for each full step, so it should be a bit quieter and smoother. We do this by putting 5V on the three micro-stepping pins on the driver.
Micro-stepping the motor has made it a lot smoother and quieter. We’re now getting a sound level of around 45 decibels, but it’s still way louder than the TMC2208 drivers.
So if you’re looking for a way to make your 3D printer quieter, and it uses these A4988 drivers, then this is a great way to do it without having to spend a fortune.
Let me know in the comments section if you’ve used these drivers on your 3D printer or laser cutter. They’d also be great for camera sliders, where smooth movement is critical.
Owning your first home is an important milestone in life, so it’s important to make it beautiful. Some people prefer to buy their home, while others enjoy starting from scratch and building their own dream house. Both options are fine, but the second one carries more weight as it requires careful planning, analysis, and more effort. Of course, it’s totally up to you to decide which one works better. So, if you’ve decided to design your first family house, here are some important things you should consider.
Be realistic and start slow
Sometimes, it’s easy to get carried away with planning every single detail that you often forget about the basics. But that’s quite common, so before you start planning, remember to keep your head on your shoulders and be realistic about the possibilities. Also, if your architect/interior designer tells you that something is unfeasible, it’s better to listen to them. Doing something just because you want it can have consequences in the future, so make sure to avoid all the risks in the beginning.
Assess your needs first
The number of rooms in your house is important when choosing a layout. So, make sure to assess your needs first? Do you have kids? If yes, then they’ll probably need their own rooms and a bathroom too. Do you or your spouse work from home? Consider getting a home office so you won’t have to work in the dining room. Also, if you have guests frequently then consider adding a separate room where they can sleep in peace. Additionally, you can use one room as your home office and guest bedroom, or even a soothing meditation corner, that way you’ll save space for more important stuff.
If big house is not an option, find other alternatives
A big family house is the ultimate home goal for many, however, in this economy, owning a large property is simply not always an option. Luckily, there are other alternatives that can be equally enticing and elegant, such as modern duplex designs that will accommodate your needs to the fullest. This is great for childfree couples and families alike, but it’s also important to plan the space in communication with professionals, so everything feels fit to a tee.
Include some extra storage space
In many homes, garages are used as storage space, but this doesn’t have to be the case if you plan things well. Of course, feel free to use your garage as you see fit, but when designing your new home, it’s important to include some extra space that can be used for storage. This can come handy if you plan more kids, because keeping strollers, toys and bicycles can become exhausting as time goes by. So it’s always better to have a designated space for things you don’t use on a regular basis.
If you want staircases, plan them properly
Having lavish dramatic or spiral staircases look great in theory, but if you have kids, they can be more of a nuisance than an asset. That’s why it’s crucial to plan the placement of staircases before you have kids or while they’re still too young to walk and explore their surroundings. Unusual or spiral staircases can actually pose a threat for children, as they’re difficult to navigate due to their structure. So before you opt for a staircase, make sure to plan things through and consult an expert who will be able to find the perfect solution for your needs.
Don’t forget your yard space
Yard space can add a whole new dimension to your home, especially if you plan to decorate it with a patio or various plants and even trees. However, before you start planning landscaping, you should make sure to put safety as your top concern, even if you don’t have children. Adding water access such as a swimming pool or a man-made pond can freshen up your backyard, along with a fire pit or an outdoor kitchen. But, in order to make your yard pop, you have to take care of every detail, so hiring a landscape designer or an architect can be a great idea, especially if you don’t have experience in this type of design.
Conclusion
Choosing a family house layout is not an easy task, but with a bit of planning, it’s possible to turn your dreams into beautiful reality for the whole family to enjoy. Just make sure to follow the advice of those who know more, and also, don’t be afraid to voice your concerns or add your opinions, because after all, you and your family will leave there, so be sure to do your best to make your space look great and comfortable.
In this project, I’ll be showing you how to make a simple light up acrylic sign with a dimmer and power switch for under $5. In fact, this one cost me just under $3 to make. They’re battery-powered and all of the electronics are contained in the free-standing base, making them perfect for a table, desk, or shelf. The LED lighting is eye-catching, especially in darker environments, so they’re great marketing and promotion tools for indoor or night time events.
You can change the brightness of the sign using the adjustment pot on the back of the base.
Each sign is powered by a CR2032 coin battery which can easily be replaced through the bottom screw-on cover.
A small power switch and adjustment pot on the back allows you to switch the LED on and off and make adjustments to the brightness.
Here’s a video of the build and the sign being used, read on for the step by step build instructions.
You’re also going to need some basic DIY tools and a 3D printer, but if you don’t have a 3D printer, you can also make use of an online printing service to print the components for you and ship them to your door.
Here’s the 3D printer I’ve used:
Creality Ender 3 Pro – https://amzn.to/3aYDssg
Black PLA Filament – https://amzn.to/2QNYemS
The above links are affiliate links, intended to indicate the correct components required and provide an option for any components you aren’t able to source locally. For this project, it would be most cost effective to visit a local electronic component store to source the parts you need.
How To Make Your Acrylic Sign
Cut & Engrave The Acrylic
The start out, you’ll need to cut and engrave your acrylic sign. This is the part which is going to be glowing when the LED is illuminated, so it’s worthwhile spending a bit of time on it to make sure that it’s done neatly.
Also, keep the protective film on the acrylic while you’re working on it as any scratches or chips will be illuminated by the LED as well.
I designed the sign to be 60mm wide with a 5mm cutout in the center for the LED. You can make the sign as tall as you’d like to accommodate your logo and any text you want to display. Any length up to 120mm on this size base should work well.
You can print out the templates provided through the above link as a guide, or use the .svg files to laser cut your own. I’ve used two sizes in this example, a smaller one which is 50mm high and a larger one which is 80mm high.
The easiest way to cut and engrave the acrylic is with a laser cutter. If you don’t have access to one, there are a number of online services that will cut and engrave the acrylic for you.
If you’d like to keep the cost down, you can also cut the acrylic yourself using a simple hack saw or band saw and engrave your logo by tracing out the text using a sharpie and then engraving it with a Dremel or other rotary type tool.
3D Print The Base
Next, you’ll need to print out the two plastic components which make up the base. I printed these out in black PLA with a 15% infill.
You can make the base any colour you’d like to match your theme or brand colours.
Solder The Electronic Components
Finally, we’ll assemble the electronic components.
The circuit is a simple LED dimmer circuit with a 22K resistor across the LED and a 10K pot to control the brightness. It’s connected to a power switch to turn the LED on and off and the lead then feeds into the battery tray in the housing, so you don’t need to buy a separate battery holder.
Try to solder the resistor directly across the legs of the LED and the bridge onto the legs of the pot to save additional wiring.
Try holding the leads onto the battery and sliding the power switch to provide power to the LED and test that the circuit works. Also, try turning the pot and check that the LED is able to be dimmed.
Once you’ve soldered and tested the electronics, install the components into the housing.
There are already cut-outs in place in the housing for the switch and the pot.
I put a drop of hot melt glue onto the inside of the switch and over the LED to keep them in place.
The pot is held in place with a nut on the outside.
Assemble The Acrylic Sign
To complete the sign, you need to install the battery, close up the base with the cover and then insert the acrylic sign.
Place the battery into the battery holder with the negative lead touching the bottom of the battery. Then place the positive lead over the top of the battery.
When you install the bottom cover, the cylinder on the cover will press this lead down onto the battery to keep it in contact.
Once you’re happy with everything functioning then close up the bottom cover and secure it with two M3 x 15mm machine screws.
You can do one last check on the electronics before installing the acrylic sign if you’d like.
Now you just need to push your acrylic sign into the base and switch it on. It should be a snug fit into the base so you don’t need to glue it and you can then easily swap out or change the signs if you’d like.
You sign is now complete.
I hope that you enjoyed this project, have fun making your own Acrylic signs. Let me know what you’ve made them for in the comments section.
I’ve seen a couple of different designs for YouTube subscriber counters and social media follower counters and I had a Raspberry Pi Zero W lying around which I wanted to put to use. I didn’t want the distraction of a bright LCD display at night, so an e-ink or e-paper display seemed like the best option. So, in this project, I’ll show you how to make your own Youtube Subscriber Counter using a 7.5” Waveshare E-Ink display and a Raspberry Pi Zero W to update it.
The Raspberry Pi uses a Python script to query the YouTube API a couple of times a day and then refreshes the e-ink display to update the counter. It’s really simple to make as it just uses the Waveshare Hat for Raspberry Pis, so there is no soldering required and you don’t have to worry about tinkering with any other electronics to get it working.
The e-ink display provides great visibility during the day, even in bright light, and only uses power when it’s being refreshed, so the counter uses very little power to run. The updates take about 40 seconds to complete and between updates the Pi uses around 0.5W while at idle.
Here’s a video of the build and the display updating, read on for the step by step instructions to build your own.
What You Need To Make Your Own Youtube Subscriber Counter
Waveshare 7.5” HD E-Ink Display (B) With Controller – Buy Here
6×8” Shadow Box Frame – Buy Here (The one linked to is not exactly the same as used in the project, but the most similar I could find on Amazon)
Keyboard, Mouse & Monitor For Setup (Or Connect Through SSH)
All you need for this project is a Raspberry Pi Zero W, an SD card, and a Waveshare E-Ink Display, make sure that you order the display which includes the hat display controller for the Raspberry Pi. You’ll also need a suitable frame to put it in, you may even have one lying around your home.
Connect & Prepare The Electronics For Your YouTube Subscriber Counter
Let’s start by preparing the Raspberry Pi Zero W. You’ll need the header pins to be soldered to your Pi Zero, so if yours didn’t come with them already installed, then you’ll need to install them before starting. Also, attach the heat sink to the CPU, this project isn’t particularly strenuous on the CPU, but it’s a good idea to install it anyway.
Once your Pi is prepared, you can connect the display. I’ve used the 7.5” HD 3 colour version, the three colours being white, black and red. You also get a two colour version which is just black and white and another 3 colour version which had yellow instead of red. The red just works better for the YouTube play button.
In the box, you get the SPI e-paper display controller, which is designed as a Raspberry Pi hat, to plug directly onto the GPIO pins. It also includes a plug and a set of leads to connect the controller to another SPI capable device, such as an Arduino or ESP32.
The actual display is really thin and has a thin ribbon cable at the bottom which plugs into the controller.
To connect the electronics together, you simply lift the black tab on the back of the connector, plug the display’s ribbon cable into the connector and then push the black tab down to lock it into place. Make sure that you get the orientation of the plug correct, the components are all face-up when laid on a flat surface.
You’ll need to prepare your SD card with an installation of Raspberry Pi OS, which can now be easily done using the Raspberry Pi utility for Windows and Mac computers. You just choose the operating system you’d like, then the target SD card, and the utility does the rest for you.
For this project, you can use the full version of Raspberry Pi OS or the Lite version which doesn’t have the GUI (graphical user interface) if you’re comfortable using the terminal (command line prompts) to set it up. If you’re planning on setting it up using SSH then you’re better off just using the Lite version.
Plug your formatted SD card into your Pi and then plug the hat onto the GPIO pins.
You can now get started testing the display. I’d suggest that you get it working like this before building it into the frame if this is your first project using one of these e-ink displays.
The Waveshare Wiki for the 7.5″HD e-Paper Hat (B) is a great place to start. It walks you through the exact steps required to get the example code working and the display running through some example images and text. The Python script used for this project is based on this Waveshare example script.
If you’re not comfortable tinkering with the display and working through this Wiki then just follow the steps I’ve outlined in the subsequent sections to get it working for this specific project.
Build The Electronics Into The Frame Or Display Box
Now let’s build the display into the frame or display box. I found this cheap 6×8 inch box frame which will work quite well. You should be able to pick up a shadow box or deep photo frame around this size from a local discount store for a few dollars.
I started by removing the back layer to get to the white frame panel.
This is likely sized for a 4×6 inch photo like mine, so you’ll need to open it up a bit using a craft knife and a ruler so that it fits your display.
Measure the size of the display area and then mark it out on your frame insert.
Use a sharp craft knife and a ruler to cut along the new lines to open the frame up to fit the display.
You could also just adjust the display content size to fit within the frame area if you don’t want to modify yours.
Peel off the protective film from the display.
Then carefully glue the back of the display to the frame, making sure that it’s centred and straight. I used a drop of hot glue on the corners to hold it in place.
Next, mark out and cut a slot in the back layer to pull the display’s ribbon cable through.
I also made the holes to mount the Raspberry Pi onto the stand.
Now re-assemble the frame and clamp the back layer back into place. If you don’t want a glossy finish to your frame, you could remove the glass panel from the front or use a matt finish panel instead.
Plug the display back into the controller and glue the connector in place so that it doesn’t put any stress onto the display’s ribbon cable.
Now lets add some plastic standoff mounts to mount the Raspberry Pi and the Hat.
Your frame is now complete and ready for programming.
Setting Up & Programming Your Raspberry Pi Zero W
The first time you boot up the pi, it will take a while to set up the Operating System, get connected to your WiFi network, and do any updates. Most of this is done automatically and you should be guided through prompts until you get to your Desktop view and your Pi is ready for programming.
Before you start with the Python script, there are a couple of libraries to install and setup steps to work through.
Please also remember that software changes quite often with these devices, these steps work as of 6 October 2020, but you may encounter errors in the future as packages are updated and pieces of software become obsolete.
The Raspberry Pi communicates to the display controller using the SPI interface, so you’ll need to enable it on your Pi.
Open the terminal window and enter the following command:
sudo raspi-config
Choose Interfacing Options -> SPI -> Yes
You may need to reboot your Pi for the changes to take effect.
sudo reboot
Once you’ve restarted your Pi, open a new terminal window again and enter the following to install the libraries:
Install the BCM2835 libraries:
wget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.60.tar.gz
tar zxvf bcm2835-1.60.tar.gz
cd bcm2835-1.60/
sudo ./configure
sudo make
sudo make check
sudo make install
In order for the Python script to retrieve your current subscriber count and number of views, you’ll need to add your Channel ID and your YouTube API key.
Go to your Dashboard and the click on “Create Project”, choose a name for your project and click “Create”.
Next, click on “Enable APIs and Services” and type – Youtube Data API v3 – into the search box. Enable it and click “Create Credentials”.
On the next page, you should see a link to create an API key in small letters, click on this link.
Next click “API Restrictions” and select “YouTube Data API v3”.
Click “Create” and you should then be given your API key which you’ll need to copy into the main Python script below.
You’ll also need to get your Channel ID. You can find this under “Advanced Settings” for your channel account. Click on your profile picture in the top right, then go to “Settings”, wait for the page to load and then click on “Advanced Settings” from the menu on the left.
You can test your API Key and Channel ID by going to the following address in your broswer, replacing YourChannelID and YourAPIKey with the ones you’ve just got:
We start by importing the libraries, functions and directories needed as well as getting the current date.
We then use the Youtube API to get the subscriber count and number of views. Remember to update these in your script before running it, just replace the ****** with your own ID and Key.
We then format the returned numbers with commas and finally connect to the display to update it. You’ll also need to update your channel name to your own channel name by replacing the “Michael Klements” with your own channel name in this portion of the code.
The script then puts the display into a low power sleep again until the next update.
If you’d like to play around with the layout of the display, try adjusting the numbers in the display portion.
draw_blackImage.text((200, 435), noViews, font = font24, fill = 0)
The first number is the X position and the second number is the Y position of each object to be displayed.
You’ll also need to run the setup.py script, included with the above code download, once before you run the actual script:
Try to run the script and after a few seconds, you should see your display start to refresh. The full refresh of the display does take quite a while, somewhere around 30 seconds on the Raspberry Pi Zero. It is a bit faster on a Raspberry Pi 4.
The flickering is normal for these controllers and is done to prevent burn-in on the display. It’ll first flicker black and white to clear the display, then load a black and white version of the image and finally replace some of the black with red as instructed.
Schedule The Python Script To Run Automatically
Once you’ve got the script working, you’ll just need to schedule the script to run automatically using crontab, mine updates the YouTube subscriber counter display every 8 hours, running three times a day. You could probably just refresh the display once a day, but Waveshare recommends updating the display at least once every 24 hours to prevent burn-in. So I just went with every 8 hours to be safe.
I followed this guide by scottkildall to get crontab to automatically run the script at 6AM, 2PM and 10PM.
You essentially need to create a launcher.sh script in the same folder as your Python script:
#!/bin/sh
# launcher.sh
# navigate to home, then script directory, then execute, then back home
cd /
cd home/pi/SubCount/SubCount/
sudo python3 subCount.py
cd /
This script tells the Raspberry Pi to change directory to the home directory, then navigate to your script, then run the script using python3 and then go back to the home directory.
Once you’ve got your launcher script created, open crontab by opening a terminal window and entering:
crontab -e
You’ll then edit crontab to run the launcher.sh script by adding lines:
Save the changes and your Raspberry Pi should now be all set to update automatically at 06:00, 14:00 and 22:00. You can edit the minutes and hours in the above lines to set the times you’d prefer. The first is the minutes and the second the hours, in 24 hour format.
Using Your YouTube Subscriber Counter
Once you’ve got the scripts set up and scheduled to run automatically, your Youtube Subscriber Counter is complete. Just plug it into a USB power supply and place it on your desk or shelf.
The date in the bottom right corner is updated to reflect the last time the stats were updated, so you’ll be able to see if anything goes wrong and the Pi stops updating the display regularly by checking this date as well.
I wanted to build this particular YouTube Subscriber Counter using a Raspberry Pi Zero W, but you could also use an ESP32 to use even less power by putting the controller to sleep between updates to the display, something that’s difficult to do on a Raspberry Pi.
Let me know what you think of it in the comments section and let me know if you try building your own!
A while ago, I made a soil moisture monitoring stick that gives you some useful information about the soil moisture level for your indoor plants.
It does a great job, providing indication LEDs and giving you a numerical readout of the moisture content of the soil, but it looks quite ugly stuck into your pots and it’s not easy to see the flashing LEDs from far away. This got me thinking of a way to make a better-looking moisture level indicator which could give you all of the basic information you need at a glance, a smart indoor plant base.
After throwing around a couple of ideas, I thought of making a round base for the pot to stand on, similar to a coaster, with an indicator layer which could be lit up in different colours to indicate whether your plant needs some attention.
The indicator layer would be lit up in green when the plant had enough water and red when it needed more water. I could also create a colour fade between these two limits as a sort of level indicator. So a greeny-yellow would mean that there’s still a fair amount of water, while an orangy-yellow would mean that you’d need to water the plant soon.
I didn’t want the base to become bulky and unattractive as well, so I wanted to keep it as thin as possible.
Here’s a video of the build and the smart indoor plant base in use, read on for the full step by step instructions.
I decided to use a layer of 3mm acrylic wedged between two layers of 3mm MDF. An RGB LED on the back would illuminate the edges of the acrylic to be green when the plant was healthy and red when it needed some attention, with the levels in between being varying shades of yellow.
I’ll still be using the same soil moisture sensor that I used previously, only now it won’t have any other electronics attached to it, all of the processing will be done in the base by the small microcontroller.
The microcontroller I decided to use was this Seeeduino XIAO. It’s really small, has an ARM Cortex CPU, and is Arduino compatible, so it’s easy to program and interface with the components. The best part is that they cost just $5 from Seeed Studio.
Designing The Smart Indoor Plant Base
I started out by measuring the base of the pot so that I could design the new base to be slightly larger. I designed the three circular layers of the base and the small enclosure at the back to house the Arduino.
The Arduino has a built-in USB C port for power, so it’s easy to just plug the base into a USB outlet using a USB C cable to power it once it’s built.
The components were designed in Inkscape so that they can be exported for laser cutting.
Once the components were designed, I cut them out on my laser cutter.
If you don’t have a laser cutter, you can also easily cut MDF and acrylic with a hand saw. Just print out the PDF template supplied with the laser cutting files and trace them out onto your MDF and acrylic.
In order for the edges of the acrylic to light up evenly, you need to roughen them with some sandpaper so that they’re opaque. The rough edges diffuse the light and make the acrylic layer look as if it is lit up entirely.
I used some 240 grit sandpaper until they had an even white appearance all around.
Next, I glued the three layers together using some epoxy adhesive.
Use a small amount of epoxy, you don’t want it to seep out of the edges and onto the areas you’ve just sanded or you’ll need to sand them again.
I used some small tool clamps to hold the layers in place while it cured.
Solder The Electronic Components Together
While the epoxy was curing, solder the electronic components together.
The circuit is not very complex as you’ve only got two components to interface with the Arduino, the sensor and the LED:
You need a current limiting resistor on each leg of the LED, 100Ω on the red leg and 220Ω on the green leg, and some header pins to plug the moisture sensor into. The green light from the LED tends to be more intense and washes out the other colours, so I used a higher resistance on the green leg than the red leg to balance it out.
I connected my soil moisture sensor the 3.3V output on the Arduino. I have noticed that some of these sensors don’t run reliably (or some even at all) on 3.3V, although they are supposed to be able to accept 3.3V to 5V. If yours is not working correctly, try powering it from the 5V supply on the Arduino – VCC. The sensor steps the voltage down in any case, so you’ll still only be supplying 3.3V back to the analogue input. Be careful if you’re using a different sensor as this Arduino’s analogue inputs can only accept a maximum of 3.3V.
Install The Electronics Into The Base
Next, you’ll need to install your soldered electronics into the housing at the back of the base.
When I tried to assemble my electronic components I saw that I had been a bit optimistic in thinking I’d get all of the components into the two-layer space. So I cut an additional spacer to create a bit more headroom. This spacer is included in the cutting file download and should be glued to the underside of the top cover.
Push your LED into the hole in the acrylic, not too far as you want the brightest part to be in the acrylic layer. Then glue your Arduino into the housing and glue the pins into the cover layer. It’s a good idea to cover up the soldered joints on the header pins so that they don’t short out on the LED legs when you assemble it.
Lastly, close the housing up. I used a glue gun as it’s quicker to work with, but you can use your epoxy adhesive as well.
That’s it for the assembly, now we just need to program and calibrate it.
Programming The Arduino
The sketch is quite simple, it just takes analogue readings from the moisture sensor and then adjusts the LEDs proportionally between two limits.
You’ll need to calibrate and set the two limits up according to your own plant as some plants need more water and some can survive in dryer soil. Essentially you want the LED to be red when you need to water it and go green once you’ve given it enough water, you shouldn’t need to over-water the plant to get the base to turn green. There’s more about this setup step later on.
In my first revision of the sketch I just updated the LEDs with the value read from the sensor. I noticed that there was some variation between measurements and every so often there was a value significantly higher or lower which caused weird colour flicker to occur.
So I switched to a moving average system where the average of the past ten readings is taken and this produces much more consistent results and a slow fade when you water the plant. This is why the code looks a bit more complex than it should have been.
Here is the final version of the sketch:
//The DIY Life
//Michael Klements
//26 September 2020
#define greenLED 3 //Define the IO pin numbers
#define redLED 5
#define moisturePin 9
#define wetCal 750 //Wet and dry calibration limits
#define dryCal 1023
int measurements [10]; //Array to store the last 10 measurements
int counter = 0; //Counter to keep track of the current array position
void setup()
{
pinMode(greenLED, OUTPUT); //Define the pin modes
pinMode(redLED, OUTPUT);
for (int i=0; i<=9 ; i++) //Populate the array with starting readings from the sensor
measurements [i] = analogRead(moisturePin);
}
void loop()
{
addData(analogRead(moisturePin)); //Take a new reading and add it to the array
int moistureLevel = getAverage(); //Get the new average of array readings
if(moistureLevel > dryCal) //Constrain reading between the high and low limits
moistureLevel = dryCal;
else if(moistureLevel < wetCal)
moistureLevel = wetCal;
int greenBrightness = map(moistureLevel, dryCal, wetCal, 0, 255); //Calculate the green and red LED brightness according to the reading
int redBrightness = map(moistureLevel, wetCal, dryCal, 0, 255);
analogWrite(greenLED, greenBrightness); //Set the green and red LED brightness
analogWrite(redLED, redBrightness);
delay(2000);
}
void addData(int num) //Function to add a reading to the array and increment the counter
{
measurements [counter] = num;
if (counter < 9)
counter++;
else
counter = 0;
}
int getAverage() //Function to return the average of all readings in the array
{
int ave = 0;
for(int i=0; i<=9 ; i++)
ave = ave + measurements [i];
ave = ave/10;
return ave;
}
We start by defining the IO pin numbers and the calibration limits, we then have an array to store the last ten readings and a counter to keep track of the array position being updated.
In the setup function, we define the pin modes and then populate the array with ten initial readings from the sensor as a starting point.
In the loop function, we take a new reading and call the addData function to add the reading to the array in the current position. We then get a new average value for the array before checking that the value is within the wet and dry limits. If it is not, it is limited to a maximum and minimum, being the two limits.
We then map the average moisture level to a corresponding green and red led brightness and then set the LED brightness accordingly using a PWM output. We then wait 2 seconds before repeating the loop.
We then have two functions, addData and getAverage which manage the data in the array. The addData function just adds the latest measurement to the array at the current position and then increments the counter. The getAverage function returns the average of all of the values in the array.
Calibrate the Sensor
As mentioned previously, you’ll need to calibrate your sensor in order to get meaningful results from the base. The best thing to do is to start when your plant soil is “dry” or at a level where you’d expect to need to water your plant again.
Place your plant onto the base, push the sensor into the soil, and plug it into the header pin socket.
Connect the Arduino to your computer using a USB C cable, and open up your Serial monitor on your Arduino IDE. Output the soil moisture readings to the monitor, one every second or two, and note the average of around 10-20 readings once they’ve stabilised (aren’t varying significantly). This will be your dry setpoint.
Once you’re happy with your dry readings, you’ll need to water the plant. Water your plant as you would normally, giving it enough to be fully absorbed into the soil, but not over watered. Now do the same as you did before and take the average of around 10-20 readings on your serial monitor. This will be your wet setpoint.
Update the two setpoints in your code and then re-upload the sketch to start using the base properly.
Since you’ve just watered your plant to calibrate it, the indicator layer should now be green. It will slowly go red again over the next few days as the soil dries out.
Using The Smart Indoor Plant Base
You’ve now got a smart base for your indoor plants which shows you at a glance when your plant needs to be watered.
The Smart Indoor Plant Base when your plant needs more water:
Give your plant some water:
After a minute or so, the water should be absorbed into the soil and the sensor base should indicate that the plant has been watered:
The base after a day or two when the water is drying up:
If you’re going to use yours in a really sunny room then you’ll probably want to add two or three LEDs and possibly another layer of acrylic to brighten the display a bit. Else you’ll only be reminded to water your plant at night.
Let me know what you think of this smart indoor plant base in the comments section. Are you going to try building one?
Are you stressed by your schedule and struggling to stay organized? Then a bullet journal may be just what you need! The bullet journal, also called a “BuJo” for short, was created by Ryder Carroll and has become a huge help for people to take control of their lives. As a beginner, it is easy for you to start a bullet journal to organize your work, home, hobbies, and any other areas that matter to you. One journal can be used for everything! Stay flexible and customize the journal to fit your unique needs.
Starting a bullet journal will help you to be organized in every part of your life. It will serve as your planner and your journal. Having a bullet journal will reduce your stress and anxiety and help you to create achievable goals with action steps to reach them. It also provides you a creative outlet, as you can decorate your journal as much as you like, and it can become a pretty keepsake for years to come. The best part is that it does not take much to get started, just a notebook and pen!
The Notebook
You can use any notebook or journal, but I would suggest a larger notebook with heavier paper to avoid bleeding and ghosting. You also will want one that is easy to open and write in. The good thing is that almost anything will work, depending on your preferences! One popular journal is the Lechtturn 1917 which has numbered pages, a built-in index, two ribbons, excellent paper to use with watercolors, brush pens, and fountain pens, and a variety of colors and grid versions (plain, ruled, graph paper or dot grid).
The Pen
Like the notebook, any type of pens or markers will work to begin your bullet journal depending on what works for you. You should strive to find a good nice quality pen or set of pens that you can write with comfortably on a daily basis. It is also nice to have a variety of colors. A favorite option of many is using a fountain pen. There are many great fountain pens that are extremely fun to write with as the ink glides effortlessly over the page with less pressure. Fountain pens provide a more unique writing style that can be changed by the type of nib, hold, and angle of the pen. A good pen can be the motivation you need to start writing in your journal every day!
Getting Started With Your Bullet Journal
Now that you have all that you need to get going, here are a few basic things to consider when getting started.
Create an index where you can keep track of all of your pages. You can use any format, but an easy one is just to have two columns: one for the page content and one for the page numbers. Remember to keep your index updated as you create new pages.
Create a key for all of the symbols that you want to use in your bullet journal, making it easier to keep your entries and to-do lists brief. You can be as creative or as simple as you want. For example, you can use happy and sad faces to represent your mood on that day, checkmarks for accomplished tasks, and stars for very important events.
Create your first monthly page. This is a wide view of the month. Typical formats include some sort of calendar or lists of dates. I also suggest having a place to write out your monthly goals.
Create your weekly and daily logs. These sections are where you put all of your regular daily notes, your schedule and to-do lists of tasks to be accomplished.
Decide on additional sections (collection) that you want to have in your bullet journal that are important to you. Some examples include future goals, finances, savings plan, diet and fitness, meal planning, date night ideas, a mood tracker, and a gratitude log. There are endless possibilities for what you can include.
Decorate your bullet journal and make it your own. Let your creative side show by jazzing up your journal with watercolors, hand lettering, modern or traditional calligraphy, original artwork, doodles, stamps, and stickers.
Now it is time to start your own bullet journal. Remember to have fun and make it your own!
Elegoo is one of the popular names in the Arduino starter kit spaces, making great value starter kits with a good instruction set to get you started tinkering with Arduinos and electronics. They sent me their Uno project super starter kit to try out and share with you. So, I’ll be doing just that and sharing two small projects which I built using the kit as well.
The kits are available through their Amazon storefronts in a number of different countries.
You can watch my video of the unboxing and projects here, or read on for the write-up.
Unboxing The Elegoo Uno Project Super Starter Kit
As expected from Amazon, the kit arrived really quickly and was well packaged and protected. The kit arrived in the usual bubble-sleeve Amazon-branded package and inside it was this yellow package, which Elegoo themselves have wrapped up as well.
Inside this yellow package, the kit is packaged into a plastic storage case, which is great for keeping all your components together after you’ve started using them.
The super starter kit case is pretty tightly packed when you get it, but once you’ve removed the plastic packaging and foam pieces for shipping, you shouldn’t have a problem getting the components back into the box again once you’re done with a project.
Included with the kit is a CD which contains a detailed tutorial guide as well as the code or sketches and the libraries used in the tutorials. We’ll have a look at this in more detail later on.
Let’s get the kit unpacked and see what’s included.
You’ve got a pretty good range of electronic components to get started with, here is what’s included in the Elegoo Uno Project Super Starter Kit:
1pcs Elegoo Uno R3 Controller Board (Arduino-Compatible)
1pcs LCD1602 Module
1pcs Prototype Shield With Mini Breadboard
1pcs Power Supply Module
1pcs ULN2003 Stepper Motor Driver
1pcs Stepper Motor
1pcs Servo Motor (SG90)
1pcs 5V Relay
1pcs IR Receiver
1pcs Joystick Module
1pcs DHT11 Temperature and Humidity Module
1pcs Ultrasonic Sensor
1pcs DC Motor and Fan
1pcs Active Buzzer
1pcs Passive Buzzer
1pcs IC 74HC595
1pcs IC L293D
5pcs Push Button
1pcs Potentiometer
1pcs 1 digit 7-segment Display
1pcs 4 digit 7-segment Display
1pcs Tilt Switch
1pcs IR Remote
1pcs Breadboard
1pcs USB Cable
10pcs Female-to-male DuPont Wire
65pcs Breadboard Jumpers
1pcs 9V Battery
30pcs Various Resistors
5pcs Yellow LED
5pcs Blue LED
5pcs Green LED
5pcs Red LED
5pcs White LED
2pcs RGB LED
1pcs Thermistor
2pcs Diode Rectifier (1N4007)
2pcs Photoresistor
2pcs NPN Transistor (PN2222)
As with any starter kits, there are probably components that you’re interested in and some which you may never use, but you really can’t beat the value you get with a kit like this. You’d easily pay two to three times what this kit costs if you try and buy the components separately, so it’s a great way to start out.
The Arduino you get with this kit is Elegoo’s copy of the Uno. It’s a great starter board, compatible with a wide range of shields and accessories, and is probably one of the most widely used as well. So you shouldn’t have any trouble trying out different projects and new sensors once you’ve worked through their tutorials.
They’ve included both a full-sized breadboard along with a prototype expansion shield with a mini breadboard on the top so that you can build more compact projects as well.
I do like that they’ve labelled the sides of the header pin strips with the port numbers. This is really useful if you’ve got a shield plugged in or you can’t see the top of the Arduino because it’s tucked into a tight case or container for a project.
Some other nice inclusions are a dedicated breadboard power supply with a 5V and 3.3V regulator, an LCD display and a stepper motor and driver.
Tutorial Guide & Included Code
Now let’s have a look at what is included on the CD with the Elegoo Uno Project Super Starter Kit.
As mentioned before, the CD contains a detailed tutorial guide as well as the code or sketches and the libraries used in the tutorials in a number of different languages.
This is quite useful as a few kits I’ve seen leave it up to you to find the libraries they’ve used, which can be a problem for new users. You can also download the contents of the CD along with up to date libraries through the Elegoo website, the download is around 250MB.
The tutorial guide starts out by explaining the Arduino IDE as well as how to connect and program your Arduino and how to install the included libraries.
They also detail how to install the drivers for the board. Both my Windows PC and mac picked the board up as an Arduino Uno right away and I didn’t need to install any additional drivers.
You’re then guided through 24 Lessons in total, which show you how to connect and program the Arduino to use all of the components supplied in the kit. Once you’ve worked through all of these, you should have a really good understanding of how any Arduino works and you’ll be able to build some pretty cool projects.
The lessons are quite details and tell you exactly what you need and how to connect them. They also give you a bit of background information for the components and give you a photograph of what the final setup should look like. You shouldn’t have any trouble getting each lesson up and running using the included components and the included sketches.
The only issue I could point out with the lessons is that they don’t go into much detail on how the code works. Some lessons have more details than others and they do point out any areas which you may get stuck or need to change for your specific project, but you probably won’t learn too much about the code if you don’t already have a basic understanding of the Arduino programming language or C++. But there is enough information to help you get by and get through each of the lessons.
Rather than go through one of the lessons which have already been done, I’ve put together two basic projects which use the included components and just combine sections of the included example code to make, so are really easy to get running.
Sample Project 1 – DC Motor Throttle
The first project I tried with the super starter kit is a simple throttle for the DC motor and fan. It uses one axis of the joystick to control the speed and direction of the motor using the included L293D motor driver chip. This project uses Lesson 12 for the analog joystick module input and Lesson 21 for the DC motor and driver. I assembled the components onto the prototyping shield and mini breadboard.
For this project, you’ll need:
Elegoo Uno R3
Prototyping Shield & Mini Breadboard
9V Battery & Lead
L293D Motor Driver
DC Motor & Fan
Joystick Module
Power Supply Module
Jumpers
I’ve connected the motor and driver as well as the analog joystick to the Arduino as outlined in the two Lessons in the tutorial.
For the joystick, we’ll only need one axis, I used the one to A1:
For the L293D DC Motor driver, I’ve used the circuit as shown, but with the mini breadboard. The power connections will need to be made directly onto the 5V header pins on the power supply module.
Once you’ve made the connections, your breadboard should look like this:
You’ll then need to program your Arduino.
I’ve also just copied sections of code from both lessons to make a really simple sketch to drive the motor.
//DC Motor Throttle Example Project
#define ENABLE 5 //Define the motor driver pins
#define DIRA 3
#define DIRB 4
const int X_pin = A1; //Define joystick input pin
int motSpeed = 512; //Variable to store the motor speed
void setup()
{
pinMode(ENABLE,OUTPUT); //Set the motor driver pin functions
pinMode(DIRA,OUTPUT);
pinMode(DIRB,OUTPUT);
}
void loop()
{
motSpeed = analogRead(X_pin); //Read in the joystick position
if (motSpeed>=532)
{
motSpeed = map(motSpeed,532,1023,0,255); //Map the motor speed to the driver range
analogWrite(ENABLE,motSpeed); //Set motor speed
digitalWrite(DIRA,HIGH); //Set motor direction
digitalWrite(DIRB,LOW);
}
else if (motSpeed<=492)
{
motSpeed = map(motSpeed,492,0,0,255); //Map the motor speed to the driver range
analogWrite(ENABLE,motSpeed); //Set motor speed
digitalWrite(DIRA,LOW); //Set motor direction
digitalWrite(DIRB,HIGH);
}
}
I found the included battery to be a bit sluggish, for the motor, so I replaced it with a power supply to give it a bit more speed.
Push the joystick forward to drive the fan in one direction and backwards to reverse the fan.
The fan’s speed is also proportional to how far the joystick is pushed, so you can slow it down or speed it up in either direction. Have a look at the video at the beginning of this review to see some clips of the motor running.
Sample Project 2 – Parking Assistant
The next project is a bit more complex, but all of the components and lessons used are included with the Elegoo Uno Project Super Starter Kit. It’s a parking assistant, which can be mounted onto a wall in front of your parking bay or garage to indicate when your car is in the right spot.
This parking assistant measures the distance to your car and guides you to park it in the correct spot using an LCD display readout and an LED, which progressively changes from green to red. The red LED starts flashing if you get too close. A button on the assistant lets you set a new parking position as well.
For this project, you’ll need:
Elegoo Uno R3
Breadboard & Jumpers
Ultrasonic Sensor
LCD Display
Tactile Pushbutton
5mm RGB LED
2 x 200ohm Resistors
10K Potentiometer
This project uses the following lessons from the tutorial:
Lesson 4 – RGB LED
Lesson 5 – Digital Inputs
Lesson 10 – Ultrasonic Sensor Module
Lesson 14 – LCD Display
I’ve kept the connections for the LCD display the same as in the tutorial. The other components have been adjusted for the available IO.
Start off by plugging your components into your breadboard. Try to separate them as much as possible, so that you’ve got lots of space to connect your jumpers.
There are three components which you should position in certain places to avoid additional jumpers:
Plug a 220ohm resistor onto a track connected to each of the positive (anode) legs of the LED. You’ll only need the red and green legs, you can leave the blue leg disconnected.
Plug the wiper (center leg) of the pot onto the same track as V0 on the LCD. This pot will be used to adjust the contrast of the LCD.
I’ve tried to keep this project as close to the example lessons in the Elegoo kit as possible so that it’s pretty easy to use the same connection diagrams and just copy and paste parts of the code to get it working.
Start off by connecting power to the components as shown in the below image, or follow the connections outlined in the lessons. You need a GND and 5V supply to the ultrasonic sensor, GND to the LED, GND to the pushbutton, and then a number of GND and 5V connections to the LCD and pot.
The connections to the LCD are done as per Lesson 14:
Once this is done, you can connect the remaining components to your Arduino’s IO:
Pushbutton – D2
Ultraonic Sensor Echo – D3
Ultrasonic Sensor Trigger – D4
RGB LED Green Leg – D5
RGB LED Red Leg – D6
LCD RS – D7
LCD EN – D8
LCD D4 – D9
LCD D5 – D10
LCD D6 – D11
LCD D7 – D12
Once you’ve made all of the connections, you can upload the sketch to your Arduino. This sketch has also been mostly constructed from parts of the four lessons, so it should be fairly easy to follow:
//Parking Assistant Example Project
#include "SR04.h" //Import Ultrasonic Sensor Library
#include <LiquidCrystal.h> //Import LCD Library
#define TRIG_PIN 4 //Define sensor pins
#define ECHO_PIN 3
SR04 sr04 = SR04(ECHO_PIN,TRIG_PIN); //Create sensor object
LiquidCrystal lcd(7, 8, 9, 10, 11, 12); //Create LCD object
int greenLedPin = 5; //Define IO pins
int redLedPin = 6;
int buttonPin = 2;
int maxDist = 80; //Define parking assistant parameters
long dist;
long parkDist = 20;
void setup()
{
lcd.begin(16, 2); //Start the display and display startup text
lcd.print("Parking");
lcd.setCursor(0,1);
lcd.print("Assistant");
pinMode(greenLedPin, OUTPUT); //Define IO pin functions
pinMode(redLedPin, OUTPUT);
pinMode(buttonPin, INPUT_PULLUP);
delay(2000);
lcd.clear(); //Clear the startup text
}
void loop()
{
boolean tooClose = false;
dist = sr04.Distance(); //Measure the distance to an object
lcd.print("Distance"); //Display the measurement
lcd.setCursor(0,1);
lcd.print(dist);
lcd.print("cm");
if(dist >= maxDist) //Define the parking distance limits for the LED
dist = maxDist;
else if(dist <= parkDist)
{
dist = parkDist;
tooClose = true;
}
analogWrite(greenLedPin, map(dist,parkDist,maxDist,0,255)); //Display the object distance on the RGB LED
analogWrite(redLedPin, map(dist,parkDist,maxDist,255,0));
if (tooClose)
{
digitalWrite(redLedPin, HIGH);
delay(250);
digitalWrite(redLedPin, LOW);
delay(250);
}
if (digitalRead(buttonPin) == LOW) //Set the new parking distance if the button is pushed
{
parkDist = dist;
digitalWrite(greenLedPin, HIGH); //Flash LED to indicate new distance has been set
delay(500);
digitalWrite(greenLedPin, LOW);
digitalWrite(redLedPin, HIGH);
delay(500);
digitalWrite(redLedPin, LOW);
}
delay(500);
lcd.clear(); //Clear the display
}
When you power the parking assistant up, it shows a brief Parking Assistant splash screen and then starts taking distance measurements to the object in front of the ultrasonic sensor, to a maximum of 80cm – this can be changed in the code to suit your parking spot/garage.
The distance is displayed on the LCD and the RGB LED will light up according to the distance to the object. If the object is at the maximum distance, the LED will be completely green and if it is at the minimum distance (the correct parking spot) then it will be completely red.
The LED will change colour proportionally in between these two limits, with a yellow colour in the middle. If the object comes closer than the minimum distance, the LED will flash red.
The LCD will continue to display the actual measured distance while the LED is flashing.
Trying moving your body or hand in front of the ultrasonic sensor and check that the measurements on the LCD change and that the RGB LED changes from green when you’re far away to red when you’re close by. Have a look at the video at the beginning of the review to see some clips of the parking assistant in operation.
To set a new parking position, make sure that the car is parked in the new position to be set and that the display is showing the correct distance to the car, then push the button to update the parking position. Note that this doesn’t change the maximum distance, so if you need to park your car further than this distance, then you’ll need to update this in the code, this adjustment is meant to be used for fine adjustment.
Try placing an object or your hand at a certain distance, say around 40cm from the ultrasonic sensor and push the button. The LED should flash green and then red and the new distance will then be set. You should now notice that the RGB LED turns completely red by 40cm instead of 20cm and starts flashing when the distance is less than 40cm.
To reset the distance, set the object to 20cm from the sensor and press the button again.
The correct spot being 20cm and the maximum distance being 80cm are just arbitrary numbers used for this example. You’ll need to set up your own limits for your own garage and car before you use it.
That’s it, your parking assistant can now be installed into an enclosure and mounted onto the wall in your garage. You might also want to position the LCD and LED a bit further up the wall than the ultrasonic sensor so that it’s easier to see.
Conclusion
Overall I think this is a great value kit and an excellent way to get started tinkering with Arduinos and electronics. There’s a good selection of components and unlike some other starter kits, Elegoo includes loads of jumpers, resistors and LEDs for more complex projects.
If you’re interested in buying one of these kits, head over to Amazon to pick one up. Elegoo have given me a discount code to share with you too, use the code DWZRAUL5 to get a discount on the kit from their Amazon store until 27/09/2020 11:59 PM AEST
I bought this kit a while ago when I was looking at building an Arduino based 8x8x8 LED cube. This one was listed on Amazon as Arduino compatible, meaning that I should be able to re-program it using the Arduino IDE after assembling it to display what I want.
The kit was delivered quite quickly, but there was one pretty obvious thing missing, the assembly manual. I had a look on the product page on Amazon, emailed the supplier, and Googled the supplier and other 8x8x8 cube kits to try and find the manual. The supplier never got back to me and although I found a few similar cubes, I never found an assembly manual for this particular cube, so I packed the kit away and forgot about it for a few months.
A week ago, I found the kit again and decided to try assembling it. At worst, I’d have a cube that didn’t work and would just be a dead shelf decoration.
Here’s a video of the build and the 8x8x8 LED cube working, read on for the detailed assembly.
Buy Your Own 8x8x8 LED Cube Kit
8x8x8 LED Cube Kit (Like The One In The Video, Probably Has No Instructions Either) – Buy Here
8x8x8 LED Cube Kit (Better Quality, Not Arduino Compatible) – Buy Here
Assembling The 8x8x8 LED Cube
So let’s get started with putting the cube together.
The kit arrived quite quickly and this is what was delivered.
There was a bag of LEDs, they said that 550 LEDs are supplied in case some are faulty, the PCB to mount the components, and then a small case with the chips and other electronic components.
The product page said that the cube was Arduino compatible, although the chip supplied is a STC12C5A60S2 micro-controller. You’ll need a USB-2-TTL programming module to re-flash this micro-controller. There is guide a good guide and software to re-programming the STC micro-controller on GitHub.
Soldering The LED Layers
I started out by testing all of the LEDs. I’ve never found a new LED to be dead, but since they said that they included 550 LEDs in case some were faulty, I decided to test them all first to avoid have to replace LEDs once it was all assembled. I set up a simple 5V power supply and 220 ohm resistor on a breadboard and got testing.
I didn’t find any faulty LEDs, but I still think it was worthwhile to save the frustration if I had.
Next, I laser cut a template to lay out the LEDs. Rather than trying to get the placing right for each individual LEDs, having an MDF board which I could press the LEDs into and then connect up while they’re held in place would dramatically speed up the process and hopefully result in nice straight and evenly spaced grids of LEDs.
I cut two layers, one with 3mm holes to hold the LEDs and one with 5mm holes to be the bottom spacer layer so that the LEDs don’t touch the table underneath them when they’re pushed into the template.
I then layed out the 64 LEDs on the template, making sure that the LEDs were all facing the same direction.
So with the longer positive leg or anode on the right side and the negative leg, or cathode on the left side.
Next, the idea is to connect all of the positive legs together in each column and all of the negative legs together in each row, making sure that they don’t touch each other. I started with the negatives, bending them all down so that there was some overlap between them.
I then soldered them together.
Once all of the negatives were done, I did the positives. I used a pair of pliers to space the bend a little away from the back of the LED so that the positive connections were spaced about a millimeters away from the negative connections. In hindsight, these legs should have been bent in the opposite direction in order to keep the connections on the back side of the cube when it’s on display, but this isn’t particularly noticeable in the end.
I continued this until all of the columns and rows on this layer were connected.
I then tested the LEDs again, this time testing the soldered connections. I used a small battery pack for this and just ran the leads over the columns and rows, checking that each LED lit up. I was glad I did this as I found two bad connections on my first layer.
I then carefully removed the layer of LEDs from the template, trying not to bend the legs of the LEDs.
I was worried that I might have damaged some of the joints when removing the LEDs, so I tested this layer again once I removed it from the template.
I tested the subsequent layers only after removing them from the template. The next few went a lot better, but I did still find one or two bad connections, and one LED installed the wrong way around.
Creating these layers is the most time-consuming part of the build, but time spent here will result in a much neater looking cube down the line. It’s also definitely worth taking the extra minute or two between layers to test all of the connections. Even fixing a single bad joint once the cube is assembled will be near impossible without damaging it when taking it apart again.
Soldering The PCB Components
Once all of the layers of LEDs were made, I got started with soldering the components into place.
This was where some guesswork came in. It was pretty obvious when making the layers that the LEDs had to be connected in a particular way, but it’s less obvious which capacitors and resistors go in which places on the PCB when it isn’t labeled.
The two electrolytic capacitors were the same value, despite the markings on the PCB being different sizes, so I just installed those in the two available spots. The ceramic capacitors were all the same size, although there were three supplied and only two spots on the PCB for them. I also noticed that there were two different value resistors supplied, 2 of one resistance and 8 of another. I noticed that the PCB had two resistors on one side and 8 on the other, so I decided to install them with two of the same on one side and the 8 others on the other side and hope for the best.
There are three different size chips. The ones that are the same size are all the same, so those are quite easy to figure out and the remaining components could be figured out based on the PCB holes.
The final part of the PCB assembly is to mount these LED leg holders onto the board to plug the LEDs into. I cut the strips up into individual pins and then broke the plastic off of them. I then installed one on each of the holes on the PCB. Luckily these could be installed from the component side of the PCB as the back side of some of these pins were covered by the IC sockets, something which I hadn’t thought about earlier.
I also noticed that on the PCB there are laocations for some header pins and two pushbuttons, but the components weren’t supplied. I assumed that the header pins are for programming the chip and the pushbuttons could be used to change the display currently being run on the cube, but this probably wasn’t preloaded onto the chip either. I decided to install these components as I had some pushbuttons and pins lying around and I wanted to be able to re-program the chip later as well.
Assembling The Cube Layers
Now that the components are all in place, I could plug the LED layers in.
From other cubes I’ve seen online, I assumed that the positive legs of the LEDs went into the holes directly underneath the cube for the columns and that the negative legs would get joined in layers and connected to the holders alongside the cube. It turned out that the negative legs on my LED layers should have been on the other side, as that was the back side of the cube, but this doesn’t really make much difference.
First LED layer in place.
I then installed them remaining LED layers.
Once the layers were installed, I bent the negative legs at 90 degrees to join each layer together and soldered them together.
The next mystery was to decide which layer to connect to which numbered holder. I wasn’t sure if pin 8 was to go to the bottom layer or top layer? One diagram in another cube’s manual had the layers labelled with 1 being the top layer and the image alongside clearly showing the bottom layer being wired to 1.
I decided to temporarily connect these are there was a good chance my guess would be wrong.
Another issue was that the red insulated wire supplied to connect the layers to the holders was too short by 2-3cm. I didn’t waste any of it with incorrect lengths or stripping too much wire, so I’m not sure why it was too short. I made a plan for the shortest connection and was then ready to power up the cube.
Powering Up the Cube
I plugged the power supply into a USB charger and pushed the switch to turn it on.
The built-in program is a bit odd in the beginning and its not really clear if the of the layers are working or not working correctly. I would have thought that a good initial test would be to light up all LEDs or at least the layers sequentially.
I left it running and eventually some recognizable patterns started emerging and it looked like I had guessed the layers correctly. There was a typical “rain” type animation where the LEDs drop from the lit-up top layer, and the top layer was actually at the top of the cube, so I assume that I’ve got the layer numbers correct. If they were the wrong way around then the rain would fall upwards.
As expected, the buttons don’t seem to do anything, but I’ll be looking to program them to change what is being displayed on the cube once I figure out how to program it. It also seems like the resistors are correctly installed, there aren’t any obvious bright or dim rows or columns.
Next I’m going to try and figure out how to program it and I’ll be making a clear acrylic case for it as well.
Have you tried building your own 8x8x8 LED Cube? How did it go and did you build it from scratch or use a kit? Let me know in the comments section below.
In this project, I’ll be showing you how to assemble and configure a Raspberry Pi Zero W to be used as a WiFi security camera, which is also accessible over the internet.
We’ll be using an operating system called MotionEyeOS on the Raspberry Pi, which is a web-based, mobile and tablet friendly surveillance system. It can be used with both the Raspberry Pi camera or any USB web camera plugged into the Raspberry Pi. You can also set up motion detection with email notifications, take still images and time-lapse movies, and even configure it to upload media files to network storage locations or to cloud storage services.
Here’s a video of the build and the camera in operation, read on for the full step by step instructions.
Optional Alternative (You’ll still need to buy the camera):
Pi Zero W Kit (Includes Pi Zero W, Case, SD Card, Power Supply & Camera Ribbon Cable) – Buy Here
Assembling The Raspberry Pi Zero WiFi Security Camera
I’ve used a Raspberry Pi Zero W for this project because they’re relatively cheap and compact, making them perfect to mount discretely around your home. You can set up a couple of cameras around your home for less than $100. The W version has built-in WiFi, so there’s no need for an external WiFi or Ethernet adaptor to connect it to your home network.
Let’s start by assembling the components into the Raspberry Pi Zero case.
If your Pi Zero came with a heat-sink, attach it to the board using the adhesive tape on the heat-sink.
Once you’ve done that, you’ll need to connect the camera to the Pi.
The ribbon cable just slides into the connector with the contacts facing towards the board.
Make sure that the black clip is pulled away from the connector to open it. Then push the black clip back into place to grip the ribbon cable once it is seated correctly in the connector.
Now do the same on the connector on the Raspberry Pi to connect the camera module to the Pi.
Next open up the case and push the Pi into the back of the case. There are small pegs on the case which align with the screw holes on the Pi and the ports should all be aligned with the cutouts on the side of the case.
Next, clip the camera into place on the top cover and then close up the case to check that it all fits correctly.
We can now move on to preparing the SD card with the MotionEyeOS operating system.
Loading The Operating System Onto The SD Card
Use a card reader to plug the card into your computer.
If you’re not using a Raspberry Pi Zero, or you’d like to use a different board, have a look at the list of Supported Devices to see which version of the operating system you should download.
Go to the list of latest releases and make sure that you download the latest version of the software which is compatible with your board.
We’ll be using the Raspberry Pi version which was released on the 6th of June.
Once you’ve downloaded the software, you’ll need to unzip it to a folder on your computer. I used Easy 7-Zip for this. Don’t try to flash the zipped image to your SD card, it won’t work.
You’ll then need to use an image flasher to flash the disk image to your SD card. The one recommended in the installation instructions on GitHub is Balena Etcher. Once you’ve downloaded and installed the software, you can flash the disk image.
You’ll need to first select the source file, which is the disk image that you unzipped in the previous step.
Then select your destination target, which is your SD card.
Then click on Flash and wait for the software to write the disk image to your SD card.
Finally, you’ll need to tell your Raspberry Pi how to connect to your WiFi network.
To do this, use the template below. It’s a basic text file in which you’ll need to add your country code and then your Network name or ID and the network password.
Rename the file to wpa_supplicant.conf, making sure to change the extension as well and then put it into the 30MB settings partition which you’re able to write to on your SD card.
Once you’ve done this, your SD card is ready to be installed into your Pi for the first boot up.
Booting & Configuring Your Pi Zero Security Camera
You don’t need to attach a monitor for this next step, but it is helpful to check that you don’t get any error messages and to make sure that the Pi has finished booting up.
The first boot up takes about a minute or two to complete, it’ll boot up much faster than this after the first boot.
If you haven’t used a monitor then you’ll need to find the IP address of the Pi using a network analysing tool on your computer.
Once you’ve found the address, type it into your browser to access the Pi and it’s video feed.
If everything is working correctly, the video feed from your camera should show up after a few seconds.
If you open up the settings menu, you can also shutdown or restart your Pi, which you’ll need to do if you’re going to be disconnecting it to install elsewhere. If you’re asked for login details, the default username is admin, with no password.
Mounting Your Camera
I 3D printed a small GoPro adaptor to stick onto the back of the Pi case so that it can be mounted onto any standard GoPro mounts.
I’m going to be using a suction cup mount to mount the Pi onto an outside window. It’s under cover, so it’s protected from direct sunlight and rain.
This mount also enables the camera to be positioned so that it’s pointing in the right direction.
You’ll need to power it using a USB power supply. You can also use a power bank to temporarily power it for a mobile surveillance system.
Let’s have a look at the video feed outside.
You can also access the camera using your mobile phone or tablet by typing the same IP address into your device’s browser.
Configuring Port Forwarding To Access Your Camera Over The Internet
The last step is to configure port forwarding on your router, so that you can access the camera from the internet.
You’ll need to start by assigning a fixed IP address to your camera, so that it doesn’t change every time it re-connects to the network. This can be done in the MotionEyeOS settings menu. Set the IP configuration to manual and then change the IP address to the address you want to always assign to the camera. This should be out of the range that your router typically assigns addresses to otherwise you’ll land up with a conflict it that address has already been used.
For example, if your router typically assigns IP addresses in the 192.168.10.1 to 192.168.10.20 range then you should pick an address higher than 20, so something like 192.168.10.21 and onward for your cameras.
You might also need to change your Default Gateway to your Router’s address.
Next, you’ll need to set up port forwarding on your router. This is something I can’t really show you how to do because it’s very different for each router make and model. But you essentially need to login to your routers configuration page and then add a port forwarding instruction so that requests from outside your local network on a specific port are forwarded to a particular device, in this case, your Raspberry Pi camera.
Here’s the general idea of what you need to do:
You’ve got your Raspberry Pi’s local IP address (this is what you’ve been using to access the camera through your browser), you now need to know what port number it is communicating on. This is usually Port 80 by default. Since this is the default, it’s a good idea to change it to a port number that is unused by any other services as a security measure.
Next, you’ll need to find your router’s external IP address. This can be done by googling – “What’s My IP” from any device connected to the same internet-connected network.
This is the IP address you’ll need to type in over the internet in order to access your camera while you’re away from home. It is the IP address which your provider has assigned to your router. So this might change if you don’t have a fixed IP address arrangement with them.
Lastly, you need to choose an external port to forward. Again, you can choose any unused port. You’ll use the combination of your router’s IP address and this port number in your mobile device’s browser in order to access the camera.
Now that you have an external IP address and port as well as your internal IP address and port, you should have all of the information that you need to configure the port forwarding instruction on your router. This is the part that is very different for each router manufacturer and model, so you’ll need to figure out how to do this on your own router.
Essentially what you’re doing is telling the router that when an external request is sent to it on the particular port you’ve chosen, the router should forward the “web page” which is served to it when it calls the local IP address and port number so that you’re able to see it from outside the network.
Once this is done, you should be able to access your camera over the internet in the same way you could do it locally. If you’re still unsure how to do this, try searching for setting up Port Forwarding on your specific router make and model.
Let me know if you’ve built your own Raspberry Pi Zero WiFi Security Camera in the comments section. What are you using it for?
Last month, I built an Arduino based reaction timer game, which allows you to challenge your friends and family to see who has the fastest reaction time. We managed to get our times down to around 160 milliseconds and I’ve seen videos of people who can get down to 120 milliseconds, but now I want to know – How fast can an Arduino react to the same game?
Here’s a video of the test, have a look at it to see the Arduino react to the reaction timer’s LED, otherwise read on for the full write-up and details.
In order to test the Arduino’s reaction time, we’d need a sensor to detect the light coming from the LED on the game and then an actuator to push the button to stop the timer.
I built a simple setup with an LDR to detect the LED’s light and a micro-servo to push the button. I also included an LED so that we can see if there is any delay between the Arduino telling the servo to move and the servo actually pushing the button since there is a motor to spin up and a number of gears between the motor and the servo arm.
I soldered the components together using a few strips of ribbon cable and some header pins.
I then found a plastic base which was the right height to mount the servo on so that it could be positioned just above the button.
Next you’ll need to position the LDR as close to the LED as possible. I glued the resistor onto the side of the game using a glue gun and could then adjust the legs of the LDR to position it directly over the LED.
Now let’s have a look at the code.
//Michael Klements
//The DIY Life
//7 May 2020
#include <Servo.h>
Servo react; //Create a servo object to control the reaction servo
int lightOn = 0; //Variable to read in LDR value
void setup()
{
//Serial.begin(9600);
react.attach(6); //Set the servo pin to pin 9
pinMode(7, OUTPUT); //Output pin for LED
react.write(80); //Set the servo to an initial position just above the button
}
void loop()
{
lightOn = analogRead(A0); //Read the output from the LDR
//Serial.println(lightOn);
if (lightOn > 800)
{
digitalWrite(7, HIGH); //Light up the LED
react.write(65); //Move the servo to push the reaction button
delay(600); //Wait 400 milliseconds
react.write(80); //Move the servo back to the initial position
digitalWrite(7, LOW); //Turn the LED off
}
}
We start by including the servo library to control the servo.
We then create a servo object called react to control the servo and create a variable to store the value read from the LDR.
In the setup function we set the servo pin number, then set the LED pin as an output and set the servo position slightly above the reaction button.
In the loop function, we read in the LDR sensor level, then compare it to the light set point. If the measured level is greater than the set point, then we turn the LED on and then move the servo downwards to push the button. We then wait 400 milliseconds for the servo to move and then move the servo back up for the next push and turn the LED off again..
I’ve also included a serial monitor printout of the sensor value which is used initially to measure the game’s LED set point. You’ll need to run the game and see what value is measured by the sensor when the reaction timer’s LED is on and then update this value in the code accordingly. Once you’ve done this, then remove or comment out this code so that it is now slowing down the loop for the actual test. We’ll look at this in the next step.
Calibrating The Light Sensor
If we upload the code and then open the Serial Monitor, we get a stream of input values read from the sensor, detecting the ambient light. Now press the button on the reaction timer to start a game and look out for the change in values when the LED comes on.
You can see that we get a reading of around 775 when the LED is off and it goes up to around 830 when the LED is on.
We can now go change the setpoint value to a value just above the off value so that it triggers the servo movement as soon as the LDR starts to register the change in light. You want it to trigger as the LDR starts detecting the light change as the LDR will “slowly” ramp up to the maximum value over a couple of milliseconds.
Remember to comment out the Serial communication for the final version as you want the code to be as quick as possible.
Let’s upload the code and see how it quick it is.
Testing The Reaction Time Of The Arduino
Press the button once to start the game and then quickly position it under the reaction servo.
For the first run, we get a reaction time of 54 milliseconds, which is pretty quick considering we have to wait for the servo to move to push the button as well.
I tested it a couple of times like this and consistently got around 50 to 60 millisecond reaction times.
Watching one in slow motion (included in the video at the beginning), you can see that the LED comes on really quickly after the reaction timer’s LED turns on, but there is a bit of a delay in getting the servo to move. By looking at the individual frames, I calculated that it takes around 8 milliseconds LED to come on after the reaction timer’s LED is turned on, the servo then takes around 50 milliseconds to press the button after this.
I then tried to see if making it darker around the LDR with some tape would result in a faster response time. It didn’t really make much of a difference, although there was a very slight improvement of around 1-3 milliseconds.
I also tried disabling the LED so that the Arduino just had to move the servo, this improved the reaction time by almost 10 milliseconds, so I got times around the mid-forties.
Conclusion
So from this test, we can see an Arduino react to an external light source in under 10 milliseconds, the servo movement takes up most of the reaction time from there. With the movement of a servo, the response time is just less than 50 milliseconds.
There are ways to further improve an Arduino’s response time by using Direct Port Manipulation, but this is probably not going to make a significant difference in this example, as the delays in the LED lighting up, the LDR responding to the light and the second LED lighting up is much more significant than the amount of time the Arduino takes to respond to the input.
Have you tried building any projects which required your Arduino to react quickly? What have you built? Let me know in the comments section below.