If you’ve used a stock k40 laser cutter, then you’ll know that positioning the laser for a cut is a bit of a guessing game. So in this guide, I’ll show you how to add a small red dot laser pointer to the laser cutter head to indicate exactly where the laser is aiming. This way you can accurately position your cuts along the edges of your material without wasting material or starting a cut off the edge.
Here’s a video of the modification, read on for the step by step instructions, and print files.
Make sure that you turn off and unplug your K40 laser cutter before working on it and allow the machine to stand for 10 minutes before working on it. While this addition is made to the low voltage DC side of the supply, there is always a risk in working in the open electrical compartment with the power still on.
How To Install The Red Dot Laser Pointer On Your K40
Mount The Red Dot Laser Pointer
I started out by measuring the head of the laser cutter in order to design a 3D printed bracket to hold the pointer.
I wanted the red dot laser pointer to be adjustable so that you can make changes to the dot position for different thickness materials and different focal points on a range of lenses.
This is the design that I came up with. I designed a bracket and duct to support a small radial fan at the same time to try out a fan air-assist modification and see how well it works. I’ve included print files for the model with and without the fan bracket, so you can decide which works best for you. Here is the other guide if you’re interested in adding a radial fan air assist system to your K40 as well.
I printed out the bracket using black PLA with a 50% infill.
There are three included models in the download, one for the pointer only, one for the fan assist only and one for the pointer and fan assist.
For the red dot pointer, I chose to use one of these focusable 5mW 5V laser pointers which are available from a range of online stores. They’re low power and have an adjustable focus ring on the end to accurately focus the pointer.
Push the laser pointer into the laser holder, it should be a snug fit.
Now screw the laser holder onto the main bracket using an M3 x 15 hex head screw.
This screw allows you to adjust the angle of the pointer in order to line it up with the laser at different heights and focal points.
Slide the bracket onto the bottom of your head of your laser and then secure it with another M3 x 15 hex head screw.
Now that the pointer is in place, we need to add the power supply and a pushbutton to turn it on. I’m going to be doing this next step in conjunction with the fan assist addition, but the method is exactly the same for either or both done together.
Supply Power To The Pointer
You’ll need to add a drag chain to support the power cables to the head of the laser so that they don’t get caught up when the laser is moving. The one end of the drag chain gets connected to the head of the laser and the other onto the sidewall of the machine.
First, we’ll need to add an anchor screw onto the laser cutter head. I took the head off for this step as its easier to work with. I drilled a 4mm hole on one side of the head and add an M4 x 25mm screw which was long enough to fit through the drag chain and then replaced the head.
Place the end of the drag chain onto the laser cutter head and then measure out the length that you need. You want it to be long enough to reach all four corners of your bed but not too long that it gets in the way.
Remove the spare links so that it’s the correct length and then add the end support.
Mark off the two holes for the end supports so that you can drill the required holes.
I used a 4mm drill bit to drill two holes for some M4 x 15mm screws which I then secured through the sidewall.
You might also want to add a thin screw or rod onto the head to stop the drag chain from being able to move into the path of the laser. This will interrupt the laser’s path, causing your cut to fail and potentially damage the drag chain or cause it to catch on fire.
Next, I added some pushbutton to the control panel. I added four buttons, one for the pointer and one for the fan assist and then another two which I plan on using for a height-adjustable print bed in the future. I wasn’t too worried about keeping them neat as I’m planning on replacing the front panel in the near future as the LCD display is not very useful and the more basic ammeter panel is actually a better and more accurate option.
I removed the control panel to drill the holes and install the pushbuttons.
I then got to work on the wiring. I needed three wires to the head, one for 24V for the fan, one for 5V for the pointer, and one common/ground. If you’re not using the fan or not using then pointer then you’ll only need two.
Feed then wires through the side of your machine and into the electronics compartment. I ran them in the existing cable bundles so that the wiring is kept neat. I ran the wires up to the pushbuttons and then down to the power supply for power.
You’ll need to hook your wires up to these three terminals on the power supply, depending on what you’re supplying. Keep in mind that this power supply is not really designed with much extra capacity, so don’t add anything which will draw a lot of power or you may burn it out.
Once all of the wiring is done, check the connections and then turn it on to try it out.
Align The Pointer With Your Laser
Put a piece of wood, cardboard or acrylic into the cutting area.
Make sure that the piece is at the correct focal point for your lens. Most stock k40s come with a 50.8mm focal point lens. This means that your workpiece should be 50.8mm from the bottom side of the lens for best engraving results.
Now turn the pointer on using your pushbutton and adjust the focus ring until a small focused dot is made.
Briefly turn your laser on using a low power setting (15% / 5mA) in order to make a mark to adjust the pointer onto.
Now tilt the pointer so that it is pointing at the mark and then tighten the screw to lock it into position
Check the laser again, the pointer and the laser should be in exactly the same spot on your material. Remember that this is now set up at this specific distance from the lens. If you use a different thickness material or work at a different bed height then you’ll need to adjust the pointer again, which is quite quick and easy to do.
You now have an easy way to see exactly where your laser is going to cut, allowing you to position it accurately and avoid wasting material or overrunning the edges of your material.
Let me know if you’ve built a laser pointer onto your laser cutter in the comments section below. What other additions have you made to your k40?
In this project, we’re going to be making a really easy tree canvas using hot glue and some basic craft supplies. They’re really cheap and easy to make and they look great. Each one costs around $2 to $6 depending on the size of the canvas and where you get the supplies from and it takes about an hour to make. You can pick up most of the supplies from your local dollar store, packs of two or three canvases are usually cheaper.
It’s worth making a couple at a time, they’re quite effective as an arrangement of four together or as three or four in a line down a passage or hallway.
What You Need To Make Them
To make one canvas you’ll need:
A blank craft canvas, 40cm x 40cm (16″ x 16″) or larger – Buy Here
A metallic ink stamp pad, silver, gold or copper works well – Buy Here
Black spray paint (you can use craft paint too, it just takes longer to apply) – Buy Here
Note: The purchase links above are affiliate links, provided as a guide to the type of product to buy. The products are suitable for the project, but you’re likely to be able to get the products at much better prices from a local craft or dollar store.
How To Make The Hot Glue Tree Canvas
To start with, we’re going to make a rough sketch of the tree.
You don’t have to be an artist for this step and you can make as many mistakes as you need, you’re going to cover it up with paint anyway.
I started by dividing the canvas up with some basic marks for the roots, trunk, and branches in order to get the proportions correct. Mostly because I’m pretty bad at drawing.
Use your marks as a guide to sketch your trunk, then add the roots and then the branches.
You can sketch over areas that don’t come out well and add branches as you need. Try not to make the branches too thin and get them relatively evenly spaced out so that they fill most of the upper half of the canvas.
Once you’re happy with your tree sketch, its time to add the glue.
Add stripes of glue along your trunk, root, and branch lines. You want them to be thick and rounded. It’s ok if there are gaps between the stripes of glue, you don’t want to put them too close together and have them join up.
Fill in all of the lines you’ve drawn until you’ve completed the tree.
Once the glue has hardened, pull off any stringy ends and make sure that there aren’t any drops or sharp ends.
Now you’re going to cover up your canvas and glue with the spray paint.
You don’t have to use black paint, you can use any paint that’ll match your theme, just try to use a colour which contrasts well with your stamp colour. So use a light paint with a dark stamp or a dark paint with a light stamp.
I used spray paint because it’s quick and easy to apply and it dries quickly too.
Spray the whole canvas and the edges. Make sure that you get in between the glue stripes as well, there shouldn’t be any white showing when you’re done.
Allow the canvas to dry properly before moving on to the next step. This usually takes half an hour to an hour, depending on how thick your paint layer is.
Once it is dry, use your paintbrush to highlight the glue.
Brush your paintbrush on the stamp pad so that the tip of the paintbrush has some metallic ink on it.
Don’t put a lot of ink onto it, you want the brush to still be relatively dry. Next, brush the ink across the glue stripes to highlight them, use quick and light brush strokes perpendicular to the length of the stripes (90 degrees to the direction of the glue).
Don’t press down too much and try not to get the ink onto the canvas, you just want to highlight the glue.
Highlight the trunk, roots, and branches.
Once the ink is dry, your tree canvas is ready to hang. Your canvas should come with a picture hook on the back or the sides.
While you can often sell your old iPhone to help pay for your next one, sometimes you’re left with one which is a bit too old or damaged to be worth trying to sell. Or you may want to keep it as a backup phone just in case. Either way, instead of letting your old iPhone waste away in a drawer, here are some creative ideas to put it to use again.
Combined Dash Navigation & Camera
While built-in GPS navigation and Apple Carplay has become quite common in modern vehicles these days, there are plenty of older cars that don’t have a GPS. Purpose-built dash-mounted GPS systems typically don’t have any internet connectivity and as a result, their maps quickly become outdated and they don’t display traffic information, but your old iPhone does.
Grab a dash phone mount and you can take advantage of your old iPhone’s up to date maps and traffic information as well as use the built-in camera as a dashcam. There are also options to mount your iPhone to your windscreen, from your review mirror, air vents, and even your old CD slot.
Home Automation Controller
Old tablets and mobile phones make excellent home automation controllers. Pair them with your smart home hub, like the Samsung SmartThing Hub, and then mount them onto the wall or even leave them on your coffee table. They’re perfect for parties and guests, allowing people to control your smart home functions without having to hand your phone over to them.
Baby or Security Monitor
There are a number of baby monitor and home surveillance apps that are perfect for turning your old iPhone into a remotely accessible video camera, some with two way audio communication as well. Dedicated WiFi-enabled cameras can be expensive, especially if you consider that you may have a free one just lying around. All you need is a phone mount and a dedicated charger cable and you’re good to go.
Download a barometer or weather app and you’ve got yourself an interactive weather station dashboard. You can even mount your old iPhone behind some two-way glass and make your own mobile phone smart mirror, you can then display notifications and reminders as well.
Wireless Music Hub
If you’ve got Apply TV or an Apple Device playing music through your home entertainment system, you can use another iPhone and the iTunes remote app to control the music, playlists, and even access your library and add and remove songs to the current playlists. Pair this with a home automation app as mentioned earlier and you’ve got a really powerful smart universal remote.
Turn It Into A Handheld Gaming Console
You can buy a few different gaming grips and control adaptors for iPhones which turn them into functional handheld gaming consoles. Rather than using your new iPhone, which would require you to add and remove the grips all the time and rapidly degrades your battery life, use your old iPhone as a permanent handheld gaming console.
What have you used your old iPhone or mobile phone for? Let us know in the comments section below.
In this tutorial, we’re going to be looking at how to correctly set the current limit on an A4988 stepper motor driver. These stepper motor drivers have become increasingly popular for CNC, 3D printing, robotics, and Arduino projects because they’re really cheap and easy to use, requiring just two pins to control them.
One important thing to set up when using these drivers is the motor current limit. This is especially important when you’re using a higher input voltage than what the motor is rated for. Using a higher voltage generally enables you to get more torque and a faster step speed, but you’ll need to actively limit the amount of current flowing through the motor coils so that you don’t burn your motor out.
There are two methods to do this, the one is to use a multimeter to physically measure the current flowing through one of the coils and the second method, which is the one we’re going to look at, is to calculate and then adjust the reference voltage on the driver, which doesn’t require the motor to be hooked up or powered.
Here’s a step by step video on how to set up your A4988 stepper motor driver’s motor current limit.
What You Need To Set The Current Limit On Your Stepper Driver
How To Set The Current Limit On Your A4988 Stepper Motor Driver
In each motor driver pack, you’ll get a small heatsink which should be stuck onto the driver chip and you’ll need to use a small screwdriver to adjust this pot to set the current limit.
We’re going to be setting the motor current limit on a breadboard, as we need to bridge the sleep and reset pins and then supply power to the board’s logic circuit through the ground and VDD pins. The power can be supplied from the 5V supply on your Arduino.
Let’s start by hooking up our driver.
Now we need to calculate the reference voltage that we’re going to be setting.
This is done by using the following formula:
Vref = Imot x 8 x Rsen
The reference voltage is equal to the maximum motor current, multiplied by 8, and then by the current sensing resistance.
The maximum motor current can be found on the motor datasheet, ours is 0.9A. The current sensing resistance can be found on your driver’s datasheet but is most commonly 0.068 ohms for newer drivers.
Using this formula, we calculate that our reference voltage should be set to 0.49 volts.
The easiest way to set the voltage is to clip the negative multimeter lead to your Arduino’s ground pin using one alligator lead.
And then connect the positive lead to the metal part of a small screwdriver using another alligator lead.
You can now simultaneously make changes to the reference voltage and read the voltage on your multimeter, making it easy to adjust.
Set your multimeter to the DC voltage measurement setting and then place the head of the screwdriver onto the potentiometer. You should now get a reading for the reference voltage. Turning the screwdriver anticlockwise decreases the voltage and clockwise increases the voltage.
We set it to 0.49 volts, then remove and replace the screwdriver to recheck it, and you’re done. You can now finish off the rest of the connections to the Arduino or plug it into your 3D printer or stepper motor driver shield.
How do you usually set up your A4988 stepper motor driver’s motor current limit? Let me know in the comments section.
At the beginning of the year, you probably planned to have a blast this summer and travel to an interesting destination. However, the travel situation is very uncertain and all experts recommend we stay safely at home. But just because you can’t go anywhere, it doesn’t mean you can’t enjoy your beautiful backyard! In order to make it even more entertaining, here are some of the hottest gadgets and outdoor tech you can incorporate in your outdoor space.
Alarm and Surveillance
Safety at home should always be your number one priority, so make sure to equip your house with quality surveillance and alarm system. With one of these, you can relax in your backyard knowing you and your property are safe. Also, thanks to new technology, you can check who’s at the door with your smartphone or alert the police quickly and efficiently in case you have an intruder.
Propane Fire Pit
Traditional fire pits are nice, but they are not exactly practical, so most people never use them. Well, a modern propane model can be fired up in seconds and all you have to do is enjoy its warmth and ambient glow. And propane is also suitable for roasting marshmallows and preparing various other things, so you can have delicious desserts every night of the week—there’s no better way to cheer everyone up during these uncertain times.
Infrared Heaters
Sure, summers are hot (and they are getting hotter and hotter every year) but if you love to enjoy your backyard deep into the night, you might get chilly. Don’t let the cold chase you inside! You can install practical infrared heaters on your ceiling and enjoy a nice warming glow. Unlike gas heaters and propane-powered poles, these infrared heaters light up on command, are efficient and space-saving.
Outdoor TV System
If you’re planning to staycation, you’ll need plenty of entertainment in your backyard to keep away the boredom. In that case, look into some outdoor TVs that will not only fit perfectly on your wall and provide you with hours of fun, but they will also look pretty nifty at your patio. If you find it hard to keep up with the best TV tech, you can check out the latest outdoor entertainment options from TVs to soundbars. Best models come with practical mounts for your wall, but you can also find TV covers that will ensure your tech has a long life.
Mosquito-Repelling Lanterns
Everyone who lives in a mosquito-populated area knows that it’s impossible to enjoy any outdoor space when these little buggers are buzzing around. As soon as the sun goes down, mosquitos are ready to bite and play with your nerves. But, with some tech on your side, you can be ready to chase them away from your yard. Natural mosquito-repelling lanterns release a mist that repels insects while providing you with a nice soft glow.
Outdoor Spa
If you have a pool in your backyard, you’re indeed the lucky ones. However, if an in-ground pool is a little too much for your wallet, you can opt for a nice outdoor spa. New models are perfect for relaxation, massage, and fun splashy time with your kids. And the best part is that these can also be used in the winter if you’re looking for that Aspen-inspired vacation.
Robotic Mower
In order to feel pleasant and luxurious during your staycation, you need to keep your backyard neat, which includes mowing the lawn. Luckily, thanks to technology, you don’t have to lift a finger to have manicured grass. Robotic mowers work just like Roombas—they automatically mow your lawn without any supervision. These robo-mowers produce zero-emission and provide your lawn with tiny clippings great for the soil and plants.
Charging Station Umbrella
You and your family members probably can’t stand being separated from your devices and why should you? No matter if you want to surf the internet, play music or enjoy some games, you can just plug your device (phone, tablet, or gaming console) into your charging station umbrella and continue using your gadgets in pleasant shade. The charging station is solar-powered so you can save money and the environment.
Who says you have to travel in order to have an amazing summer? With these outdoor tech innovations, you can turn your backyard into an oasis of fun and relaxation and you’ll wait out Corona like a true champion!
I found an iPhone conversion kit online for $35 to convert an old iPhone 6 to a 2020 model iPhone SE lookalike. The front of both iPhones look virtually identical, so this kit changes the back of the iPhone to a glossy black finish (white is also available) like the glass back on the 2020 iPhone SE. It also changes the shrouding around the camera lens to be a bit bigger like the newer model iPhones.
This upgrade doesn’t change any of the iPhone’s functionality, so you don’t get any performance benefit, you still won’t have wireless charging and you will still have the headphone jack.
The kit didn’t come with any instructions and there were a couple of things to look out for in doing the conversion, but I managed to get all of the components swapped over to the new body without and issues and it looks pretty good once it’s done. I’m not sure how long this body will last though as it is mostly plastic, not aluminium like the original and I’m not convinced that the glossy back is actually glass.
Here’s my video of the swap over:
I now have an iPhone 6 which looks like a 2020 model iPhone SE, and it only cost $35.
If this is something you are interested in doing, here are some tips to help you out with the conversion:
Make sure that you keep your screws really well organised. There are a number of different size and length screws, even on the same components. Make sure that you know which one goes where or you’ll have an almost impossible task in putting it back together again.
Be extra careful when removing the ribbon cables which are stuck to the iPhone body, it is really easy to tear them if you use too much force. I found that using a plastic spudger to gently pry them up worked well.
Remember to move the metal contacts across to your new buttons if yours don’t come with them. This is easy to miss and you’ll then land up with buttons that don’t work. It’s also a mission to add them afterwards, you’ll basically need to disassemble the whole phone again.
If your iPhone is old, this is a good time to replace the battery as you’ll be removing the old one anyway.
If you enjoy tinkering with electronics and building your own Arduino and Raspberry Pi based projects then you’ve likely run into the question of how to power your project if you want it to be mobile and not plugged into an outlet somewhere. Batteries are the obvious answer, but standard AAs don’t last very long and lithium-ion battery packs can be a hassle to wire up, charge and keep balanced.
My favourite solution is to use 18650 lithium-ion cells in a 3 cell 3D printed holder. These batteries offer a relatively high storage capacity and are affordable and widely available. They can also be easily taken out of the battery holder and safely charged in a plug-in wall charger.
Having 3.7 cells means that for most applications, you’ll want to use 3 cells to get 11.1V, as 12V is commonly recommended for DC motor and stepper motor drivers, and they’ll usually handle 4 to 8A. Your Arduino will be fine running at 11.1V and you can also get an inexpensive DC to DC converter to step the voltage down and regulate the supply for your Raspberry Pi.
Be careful when using batteries for your Raspberry Pi projects, especially for things like unattended solar-powered weather stations as repeated low voltage related shutdowns without any protection can damage your Pi or corrupt the memory card.
They’re 3D printed and offer cell configurations in 1 to 4 cells. It’s recommended that you print them using ABS filament to give the plastic springs some flexibility. The contacts can be made by twisting and soldering a short length of uninsulated wire or using some copper strips. Each holder also has a number of holes for mounting screws to secure it to your project or housing.
It’s also quite easy to add solar charging to these batteries, the perfect solution for long term weather station or data logging projects. There are a number of small charge controllers available for these batteries, so you’ll just need to integrate one into your charging circuit.
If you’re interested in batteries, did you know that you can recondition your old lead-acid batteries rather than replacing them?
What do you use to power your mobile Arduino and Raspberry Pi projects? Let me know in the comments section below.
Exposed brick is rapidly becoming a popular home and business design trend and it’s easy to see why. In the right quantity and setting, it looks fantastic and it requires little to no maintenance. Fortunately, you don’t have to renovate a 19th century home or apartment to get the look either, there are loads of modern panels, veneers and even stick-ons which can be used to create the perfect feature wall.
Here are some of our favourite ways to incorporate exposed brick into your next home renovation project.
A statement wall in a hallway or room is one of the easiest and cheapest ways to incorporate exposed brick into your home. The colours in the brick generally bring enough colour into a room to work well with whites, greys and beiges.
A splashback which doubles up as a feature wall in your kitchen is easy to keep clean and compliments your neutral countertops. Make sure that you get it properly sealed so that it’s easy to clean any cooking splashes and spills.
If you’ve already got an archway built into your home as a room or hallway divider, adding some brick veneers in the correct places make for an amazing feature.
In this project, I’m going to be showing you how to turn one of these popular DIY arc reactor kits into a useful Arc Reactor CPU performance monitor for your computer. It plugs into one of your computers USB ports and displays your CPU performance on the OLED display and the arc reactor pulses according to your CPU usage, increasing the pulse frequency with an increased CPU load.
I started out by assembling an Arc Reactor kit, which has a built-in USB powered LED light and that got me thinking of a way to turn it into something useful for my desk. I initially thought about using an Arduino to make the LED pulse as some sort of readout or indication. This lead me to my computers CPU performance and I then decided to add the OLED display for a more accurate readout as well.
The arc reactor LED and OLED display are powered by an Arduino Uno in the base, which receives updates on the computers CPU usage every two and a half seconds and adjusts the pulse duration accordingly.
On the computer’s side, a python script reads the CPU performance data from a Hardware Monitoring application and posts this data to the Arduino through a serial communication port.
The device doesn’t need any external power, it is powered by the USB port as well.
Here’s a video of the build and the Arc Reactor in use, read on for the full step by step instructions as well as the code and print file downloads.
You’ll also need to 3D print the components for the stand. If you don’t have a 3D printer and you enjoy DIY projects and building things, you should really consider getting one. They’ve become a lot more affordable and really expand your workshop capabilities.
How To Build Your Own Arc Reactor CPU Performance Monitor
I’ve split the build process up into a couple of steps to make it easier to follow. We’ll start by assembling the Arc Reactor (with is done according to the enclosed instructions), then solder the electronics, then assemble the base and finally upload the sketch and run the Python script.
Assemble The Arc Reactor
Theses Arc Reactor kits have been around for a couple of years and most of them are reasonably good quality, so you shouldn’t have any trouble following the enclosed instructions and assembling your reactor. There isn’t anything you need to modify or change during the build, you can even use one which is preassembled if you’ve got one you’ve already built.
Depending on your kit, it should take around half an hour to an hour to assemble. Some kits do require you to wind your own coils or trim off a lot of excess plastic which can be time-consuming.
Solder The Electronic Components
Before we assemble the base components, we need to make up the electrical circuit. The circuit for this project is quite simple and consists of an I2C connection between the Arduino Uno and the OLED display and then an NPN transistor connected to pin 5 of the Arduino to drive the Arc Reactor. The LED array on the Arc Reactor draws about 500 milliamps, which is too much to drive directly off of the Arduino. I added a 510Ω current limiting resistor onto the base leg of the transistor as well. I soldered this resistor directly onto the transistor and covered it with heat shrink tubing.
I connected the components using some coloured ribbon cable and header pins to plug into the Arduino and covered the exposed wiring on the transistor and plug with some heat shrink tubing.
Important Note – There seem to be two variants of these OLED displays available online and they look very similar. One version has the GND pin first and the other the VCC pin first. They do not have any reverse polarity protection, so if you connect them the wrong way around they instantly “pop” and have to be thrown out. Make sure that you check this before soldering the pin connector.
Print & Assemble The Arc Reactor Stand
I designed four components which stack together with some hex head screws to make up the stand. There is a base compartment to house the Arduino. A cover to go over the base and connect to the display housing and then a post on top of the display housing to support the arc reactor.
I 3D printed the components using black PLA with a 15% infill. You could print the base out of a different colour as well, it would probably look great in silver or grey too. I usually try to hide the screws underneath the housing, but in this design I wanted the screws to be visible to add a bit of detail to the base.
I’ve used a single M5 x 8mm hex head screw to secure the reactor post to the display housing. Make sure that the top surface of the post is angled to point the Arc Reactor slightly upwards, ie the highest point is in the front.
Then glued the OLED display into the housing using a glue gun.
I then glued the Arduino Uno into the base, with the USB port lined up with the cutout.
I then plugged the connector into the OLED display and attached the Arduino cover plate using four M3 x 8mm screws.
The cover then goes onto the base with four M4 x 8mm screws. I used M4 screws so that the heads are a bit larger and more visible on the base. You can switch these out for small M3 screws if you’d like, you’ll just need to modify the holes in the Arduino case to be slightly smaller.
I attached the arc reactor to the base using the glue gun again. There isn’t really a nice flat surface on the bottom of the arc reactor, so you need to build up the glue around the supports until it’s held securely in place.
Lastly, glue the arc reactor plug into the back of the stand. This is just a dummy plug but it looks better if it’s actually plugged into something. If you’d like to neaten up the wiring even further, you could remove the existing plug on the LED and solder this plug’s leads onto the LED instead and then buy a real socket to plug the arc reactor into.
Remember to also connect the power lead to the LED.
And that’s the Arc Reactor CPU Performance Monitor’s hardware complete, now we just have to program it.
Programming The Arc Reactor CPU Performance Monitor
There are three things you need to set up to get your CPU data to be sent to your Arduino, a source of the data on your computer, a script to read the source on your computer and send the data through a serial communication port to your Arduino and the code on the Arduino to read the data, recompile it and then update the display and reactor LED.
We’ll start off with the Arduino’s code.
Programming The Arduino Uno
The Arduino’s code is fairly simple thanks to the OLED displays libraries. Most of the code is actually dedicated to turning the data received through the serial communication port back into usable data.
Let’s have a look at the code:
//Michael Klements
//The DIY Life
//Arc Reactor CPU Monitor
//25 May 2020
#include <SPI.h> //Include the libraries for the display
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#define SCREEN_WIDTH 128 //OLED display width, in pixels
#define SCREEN_HEIGHT 32 //OLED display height, in pixels
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, -1); //Create the display object
int pinReactor = 5; //Pin to reactor
int brightness = 25; //How bright the reactor LED is at minimum. Its distracting if it turns off entirely.
int fadeAmount = 1; //How many increments to fade the reactor LED by in each loop cycle
char receivedChars[5]; //Variables to track the incoming Serial data
boolean newData = false;
int cpuLoad = 0; //Variable for the CPU load
void setup()
{
Serial.begin(9600); //Begin Serial communication with the PC
if(!display.begin(SSD1306_SWITCHCAPVCC, 0x3C)) // Address 0x3C for 128x32 display
{
Serial.println(F("SSD1306 allocation failed"));
for(;;); //Don't proceed if it can't communicate with the display
}
display.clearDisplay(); //Clear the display
display.setTextSize(1); //Set the display text size
display.setTextColor(SSD1306_WHITE); //Draw white text
updateDisplay(); //Update the displayed CPU load, 0% initially
}
void loop()
{
analogWrite(pinReactor, brightness); //Set the reactor LED brightness
brightness = brightness + fadeAmount; //Increment the brightness by the fade amount
if (brightness <= 25 || brightness >= 255) //Reverse the direction of the fade increment once fully bright or dim
{
fadeAmount = -fadeAmount;
}
if (Serial.available()) //If an updated CPU load is received
{
delay(10);
static byte ndx = 0; //Index to keep track of received char position
char endMarker = '%'; //Symbol indicating that the full CPU load value has been recieved
char rc; //Temporary variable to store the received char
cpuLoad = 0; //Reset CPU load variable to 0
while (Serial.available() > 0 && newData == false) //While data is being recieved
{
rc = Serial.read(); //Save data to rc
if (rc != endMarker) //Check that the end of the data symbol hasn't been received
{
receivedChars[ndx] = rc; //Save char received to receivedChars array
int temp = (int)rc - 48; //Convert ASCII char to int
if(temp >= 0) //Check that the converted char was not a space (ASCII 32)
{
if(ndx == 0) //Update CPU load based on 100s, 10s or units position
cpuLoad = cpuLoad + temp*100;
else if(ndx == 1)
cpuLoad = cpuLoad + temp*10;
else
cpuLoad = cpuLoad + temp;
}
ndx++; //Increment the index
}
else
{
receivedChars[ndx] = '\0'; //Terminate the string
ndx = 0; //Reset the index
newData = true; //Terminate the loop
}
}
if (newData == true) //Reset new data
{
newData = false;
}
updateDisplay(); //Update the displayed CPU load
}
int delayDuration = map(cpuLoad, 0, 100, 10000, 500); //Maps CPU Load to a delay duration, higher load is a shorter fade time
delayMicroseconds(delayDuration); //Wait the calculated delay duration
}
void updateDisplay () //Update the displayed text
{
display.clearDisplay();
display.setCursor(40,5);
display.println(F("CPU Load"));
display.setCursor(55,15);
display.print(cpuLoad);
display.print(F("%"));
display.display();
}
We start off by importing the libraries necessary to control the OLED display, then set up the display parameters and create a display object.
We then define the Arc reactor LED control pin and set parameters for the initial brightness and the fade amount or difference in light intensity for each cycle. I created the initial brightness variable as a non-zero value so that the LED doesn’t turn off entirely between cycles, I found this “flashing” to be too distracting on my desk.
We then create a character array to receive the serial communication data and create a variable to store the CPU load.
In the setup function, we start the Serial communication, then establish a connection with the display and update it to display the initial CPU load, which will be zero. If the Arduino is not able to communicate with the display, the code will hang here and won’t continue into the loop. This is good for troubleshooting and makes sure that your Arduino is able to communicate with the OLED display
In the loop function, we start by updating the arc reactors brightness and then increment the brightness variable by the fade amount for the next loop cycle. We then have a check to see if the brightness has reached a maximum or minimum and if so, reverse the fade direction.
We then check if any Serial communication data is available. If there is data available then it is read into the character array until the % sign is received, indicating that the data is complete.
Data is transferred to the Arduino letter by letter in ASCII format, not as an integer. So each digit is received individually and the Arduino needs to know when the number is complete and then convert it into an integer. The rest of the code in this section does just that, converting each digit received into either hundreds, tens or units and then adding them together to form a complete integer which the Arduino can then quantify.
We then update the display to reflect the new CPU load and then map the CPU load to a delay duration between cycles, which corresponds to a faster or slower arc reactor pulse. The higher the CPU load, the faster the arc reactor will pulse.
Lastly, we have a function to update the display which just clears the previous display and displays the new CPU load.
While you’ve got your Arduino IDE open, also make a note of which com port is assigned to your Arduino Uno, as you’ll need to update this in the python script.
Getting Your CPU Load Data
In order to send the CPU load to your Arduino, we first need to be able to access it. One of the easiest ways to do this is using a freeware application called Open Hardware Monitor.
The Open Hardware Monitor app runs in the background on your PC and minimises to the system tray. It collects information on a number of different hardware items on your computer and makes it available to be read using a Python script.
You’ll need to make a note of your processor name displayed in the monitor as you’ll need to update this in the python script in order to access your CPU load.
You’ll also need to set the Open Hardware Monitor to run on startup so that you don’t need to open it every time you restart your PC. To do this, go to options and make sure that “Start Minimized”, “Minimize To Tray” and “Run on Windows Startup” are all checked. Then minimise the app.
Posting The Data To Your Arduino Using A Python Script
Lastly, we have a python script which transmits the CPU load through the serial com port to your Arduino. The script reads the data posted by the Hardware monitor app, finds the CPU load and then posts the value to the Arduino.
I didn’t write this code. I’ve modified the code from Leonidas Tsekouras’s Arduino PC Monitor example in which he sends a range of data to be displayed on an external LCD display.
Here is the code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
import os
import time
from urllib.error import URLError, HTTPError
from urllib.request import Request, urlopen
import serial
import serial.tools.list_ports
serial_debug = False
def space_pad(number, length):
"""
Return a number as a string, padded with spaces to make it the given length
:param number: the number to pad with spaces (can be int or float)
:param length: the specified length
:returns: the number padded with spaces as a string
"""
number_length = len(str(number))
spaces_to_add = length - number_length
return (' ' * spaces_to_add) + str(number)
def get_json_contents(json_url):
"""
Return the contents of a (remote) JSON file
:param json_url: the url (as a string) of the remote JSON file
:returns: the data of the JSON file
"""
data = None
req = Request(json_url)
try:
response = urlopen(req).read()
except HTTPError as e:
print('HTTPError ' + str(e.code))
except URLError as e:
print('URLError ' + str(e.reason))
else:
try:
data = json.loads(response.decode('utf-8'))
except ValueError:
print('Invalid JSON contents')
return data
def find_in_data(ohw_data, name):
"""
Search in the OpenHardwareMonitor data for a specific node, recursively
:param ohw_data: OpenHardwareMonitor data object
:param name: Name of node to search for
:returns: The found node, or -1 if no node was found
"""
if ohw_data == -1:
raise Exception('Couldn\'t find value ' + name + '!')
if ohw_data['Text'] == name:
# The node we are looking for is this one
return ohw_data
elif len(ohw_data['Children']) > 0:
# Look at the node's children
for child in ohw_data['Children']:
if child['Text'] == name:
# This child is the one we're looking for
return child
else:
# Look at this children's children
result = find_in_data(child, name)
if result != -1:
# Node with specified name was found
return result
# When this point is reached, nothing was found in any children
return -1
def get_hardware_info():
"""
Get hardware info from OpenHardwareMonitor's web server and format it
"""
global serial_debug
# Init arrays
my_info = {}
# Get data
if serial_debug:
# Read data from response.json file (for debugging)
data_json = get_local_json_contents('response.json')
else:
# Get actual OHW data (Modify to your Open Hardware Monitor's IP Address)
ohw_json_url = 'http://192.168.20.10:8085/data.json'
data_json = get_json_contents(ohw_json_url)
# Get info for CPU (Modify to your CPU name shown in Open Hardware Monitor)
cpu_data = find_in_data(data_json, 'Intel Core i5-7200U')
cpu_load = find_in_data(cpu_data, 'CPU Total')
# Get CPU total load, and remove ".0 %" from the end
cpu_load_value = cpu_load['Value'][:-4]
my_info['cpu_load'] = cpu_load_value
return my_info
def main():
global serial_debug
# Connect to the specified serial port (Modify to your Arduino's COM port)
serial_port = 'COM3'
if serial_port == 'TEST':
serial_debug = True
else:
ser = serial.Serial(serial_port)
while True:
# Get current info
my_info = get_hardware_info()
# Prepare CPU string
cpu = space_pad(int(my_info['cpu_load']), 3) + '%'
# Send the strings via serial to the Arduino
if serial_debug:
print(arduino_str)
else:
ser.write(cpu.encode())
# Wait until refreshing Arduino again
time.sleep(2.5)
if __name__ == '__main__':
main()
You’ll need to update the IP address that your Open Hardware Monitor is posting the data too. This can be found in the Open Hardware Monitor app by going to Options -> Remote Web Server -> Port.
You’ll also need to change your processor name and check that the Arduino’s com port is correct.
Both the python script and then hardware monitor can be set to automatically startup with your computer and run in the background, so you don’t have to keep running them every time you turn your computer off. The python script can be automatically started using the windows “Start a Program” utility.
Using The Arc Reactor CPU Monitor
Upload the code your Arduino and make sure that the Open Hardware Monitor app is running on your computer and then run the Python script to start posting the data to your Arduino. You should then start seeing updates to your CPU performance on the OLED display and the reactor pulsing accordingly.
On start-up, with no data being transmitted, the OLED display should still display CPU Load 0% and the reactor should be pulsing slowly.
If you open up a benchmarking application to increase the CPU load to 100%, you will see it pulse really quickly.
You can make your own adjustments to the pulse durations and brightness levels in the code. I found it too distracting to have the pulse turn off completely each cycle, so I limited the minimum brightness and also set the low CPU usage pulse duration to be quite long. You can edit these by making changes to the mapped delay, to the brightness variable and to the fadeAmount variable.
Let me know if you’re going to be building your own arc reactor CPU performance monitor or what you’ve done with an arc reactor you’ve built.
These tables look like they’re just floating in the air, but they’re actually a clever demonstration of the principle of tensegrity. The principle of tensegrity originated in the nineteen fifties and is still used in the design of modern buildings and structures. The worlds largest tensegrity structure is currently the Kurilpa Bridge in Brisbane, Australia. In this guide, I’ll be showing you how to build your own tensegrity tables step by step.
Have a look at my video summary of the build and the final product, otherwise, read on for the step by step instructions.
At first glance, it appears that the top surface is being supported by the three outside pieces of fishing line, which doesn’t make sense since we know that fishing line or string can’t support compressive loads. But taking a closer look, you will see that the line doing all of the work is actually the one in the centre.
The piece of fishing line in the centre of the structure is in tension and is supporting the load of the surface of the table and whatever is placed onto it. The three pieces of line on the outside are simply holding the top surface in place so that it remains directly overhead the centre line and doesn’t fall over.
If any of these four lines are cut, the table will collapse under its own weight.
To better understand tensegrity tables and how they work, let’s try building our own ones.
These tables were cut on a laser cutter, but you can still cut out the outlines of the components and build your own using MDF, acrylic or plywood if you don’t have access to a laser cutter, or make use of an online laser cutting service.
I designed the basic components in Inkscape, to be laser cut from 3mm MDF. You could also cut them from plywood or acrylic and you can cut the outlines out by hand if you don’t have access to a laser cutter.
The file above includes the Inkscape svg files as well as dxf files and an A4 printable pdf template, so you should be able to find an application to open and print or cut them out.
I’ve added a few engraving marks as guides for the holes to be drilled for the fishing line as well.
I designed two versions of these tables, one which is supported by a strand of fishing line in the centre and one which is supported by two agents. The flat sections are the same, I’ve just adjusted the height of the vertical section to accommodate the magnets in the centre instead of the fishing line. The magnets add an interesting dynamic to the table, as there is now effectively no physical component holding the table up, it’s purely supported by the invisible magnetic force between the two magnets.
Cut your components from your chosen material. You’ll need two table ends and two vertical supports for each table.
Once you’ve cut out your components, you need to drill the holes through them for the fishing line or thread. I drilled these using a 1mm drill bit on engraved markings. You can adjust the drill bit size to suit the diameter of your fishing line or thread.
You’ll then need to glue the vertical pieces in place using PVA wood glue and wait for the glue to dry. There is a slot designed into the table ends to position and align the vertical support.
Once that’s done, you can add your fishing line or thread. Fishing line is a bit easier to use because it doesn’t fray and it’s more rigid, so its easier to thread through the holes. Cut four lengths a lot longer than you need, you can then trim them when you’re done. I found that lengths of around 200mm (8″) worked well.
Glue one end of each line into the bottom side of the table first. You can either tie a knot at the end of the lines or simply glue them into place with some super glue. I found it easier to position them accurately and glue them into place rather than trying to get the knot tied in the correct place. A single drop of super glue on each side was sufficient to hold the line in place and dried quite quickly.
Then glue the tension line in the middle into place, leaving around a 50-60mm (2″) gap between the two centre pieces. Glue or tie both ends of the tension line into place.
Then fed the three outer lines through their holes. The last step takes a bit of patience to get right. You need to glue or tie the three outer lines into place so that there is a little bit of tension on the centre line but also keep the top and bottom surfaces as close to parallel as possible. So all three lines need to be as close to the same length as possible. It helps to use a ruler to get this part right. Depending on the length of your centre strand, you’re looking for these lines to be around 130mm (5″) long. Also, use a small amount of glue to temporarily hold them in place until you’re sure that they’re correct so that you can undo a joint if you need to.
Once you’re happy with your table, trim off the excess fishing line and make sure that the glued joints are secure and dried.
If you’re using magnets, glue the outside three lines into place at the correct and even length, around 130mm (5″) and then add the magnets to the middle afterwards, with opposite poles facing each other so that they’re attracted to each other.
The magnetic table looks cool, but can’t really hold much weight. You could get more by positioning the magnets closer together as the magnetic force of attraction between two magnets is proportional to the square of the distance between them. There is a bit of a tradeoff here though because if they’re too close together then you can see the gap between them well and then it just looks like the magnets are rigidly holding up the table.
I tested the fishing line table to see if it could hold up my phone. It held up just under 200 grams but the outside lines did start flexing, so it probably couldn’t take too much more than this.
These tensegrity tables are surprisingly rigid, you can even pick them up and hold them sideways.
The magnetic one will also hold itself up sideways but it collapses if you put too much weight on it. You can just pull the magnets back up towards each other to reset the table.
Enjoy making your own tensegrity tables! Let me know how it goes for you and what your designs look like in the comments section below.
Community Builds
Michael Marletto built a larger version of the table from wood and suspended the surfaces using chains. It really came out well and can probably take quite a lot more load than the smaller MDF ones: