What do you do when faced with measuring and cutting a bunch of cables? If you’re Edward Carlson, you “simply” build a machine to do it for you!
While it may not save time on this run, at least on the next occasion that he needs a few cables cut, he can just program his device to snip everything to size!
His setup uses an Arduino Mega with an LCD/button shield to tell the machine how long to snip each wire, then employs a stepper motor to move the cable between two rollers to the correct length. When in position, a high-torque servo actuates a (normally) manual pair of clippers to cut it to size.
Be sure to check out the project explanation in the video seen here, or skip to around 5:30 to see it in action!
Instead, an Arduino Nano powers a novel mechanical gear assembly via two motors, which causes the two hands to physically switch positions between the second arm being mounted on the base and on the tip of the first arm. This strange representation of time changes form every fifteen minutes.
The Edgytokei which literally means edge clock is inspired from the Japanese nunchucks. Just like the nunchucks the clock is just a pair of two arms displaying time by balancing themselves on the edge. The clock consists of two arms and the base on which the arms are anchored. Both the arms are of equal length as the role of the arms changes with different hours of the day.
The fulcrum of the clock flips from the center to the left or right of the clock every quarter hour so that the clock can stand on the edge to represent the time between quarter past and quarter to hour. This flipping of the arms keeps the clock dancing on the edge throughout the day. The base which contains the electronics of the clock provides a anchor for the clock and prevents the arms from falling over.
The display was prototyped on a huge breadboard assembly, along with an Arduino Mega, then finished using a custom PCB and Arduino Nano.
3D-printed parts are used to form the housing, in addition to a variety of electronics. These include an actual GPS unit, along with a custom three-segment LED assemblies to display “+” and “-” as needed.
Be sure to check it out in the video seen here, showing off its interface, as well as an MP3 unit that plays back a 1962 JFK speech about going to the moon.
In a project, repetitive tasks that break the flow of development work are incredibly tiresome and even simple automation can make a world of difference. [Simon Merrett] ran into exactly this while testing different stepper motors in a strain-wave gear project. The system that drives the motor accepts G-Code, but he got fed up with the overhead needed just to make a stepper rotate for a bit on demand. His solution? A grbl man-in-the-middle jog pendant that consists of not much more than a rotary encoder and an Arduino Nano. The unit dutifully passes through any commands received from a host controller, but if the encoder knob is turned it sends custom G-Code allowing [Simon] to dial in a bit acceleration-controlled motor rotation on demand. A brief demo video is below, which gives an idea of how much easier it is to focus on the nuts-and-bolts end of hardware when some simple motor movement is just a knob twist away.
[Simon]’s jog pendant moves a single motor which is exactly what he needs to ease development of his 3D printed strain-wave gear using a timing belt, but it could be programmed with any G-Code at all. Speaking of DIY jog pendants for CNC machines, don’t forget this wireless one made from an Atari 2600 joystick that jogs a plasma cutter in X and Y, and zeroes it with a push of the button.
What do you do, when you need a random number in your programming? The chances are that you reach for your environment’s function to do the job, usually something like rand() or similar. This returns the required number, and you go happily on your way.
A shift register configured as a pseudo-random number generator. [by KCAuXy4p CC0 1.0]Except of course the reality isn’t quite that simple, and as many of you will know it all comes down to the level of randomness that you require. The simplest way to generate a random number in software is through a pseudo-random number generator, or PRNG. If you prefer to think in hardware terms, the most elementary PRNG is a shift register with a feedback loop from two of its cells through an XOR gate. While it provides a steady stream of bits it suffers from the fatal flaw that the stream is an endlessly repeating sequence rather than truly random. A PRNG is random enough to provide a level of chance in a computer game, but that predictability would make it entirely unsuitable to be used in cryptographic security for a financial transaction.
There is a handy way to deal with the PRNG predictability problem, and it lies in ensuring that its random number generation starts at a random point. Imagine the shift register in the previous paragraph being initialised with a random number rather than a string of zeros. This random point is referred to as the seed, and if a PRNG algorithm can be started with a seed derived from a truly unpredictable source, then its output becomes no longer predictable.
Selecting Unpredictable Seeds
Computer systems that use a PRNG will therefore often have some form of seed() function alongside their rand() function. Sometimes this will take a number as an argument allowing the user to provide their own random number, at other times they will take a random number from some source of their own. The Sinclair 8-bit home computers for example took their seed from a count of the number of TV frames since switch-on.
The not-very-random result of a thousand analogRead() calls.
The Arduino Uno has a random() function that returns a random number from a PRNG, and as you might expect it also has a randomSeed() function to ensure that the PRNG is seeded with something that will underpin its randomness. All well and good, you might think, but sadly the Atmel processor on which it depends has no hardware entropy source from which to derive that seed. The user is left to search for a random number of their own, and sadly as we were alerted by a Twitter conversation between @scanlime and @cybergibbons, this is the point at which matters start to go awry. The documentation for randomSeed() suggests reading the random noise on an unused pin via analogRead(), and using that figure does not return anything like the required level of entropy. A very quick test using the Arduino Graph example yields a stream of readings from a pin, and aggregating several thousand of them into a spreadsheet shows an extremely narrow distribution. Clearly a better source is called for.
Noisy Hardware or a Jittery Clock
As a slightly old-school electronic engineer, my thoughts turn straight to a piece of hardware. Source a nice and noisy germanium diode, give it a couple of op-amps to amplify and filter the noise before feeding it to that Arduino pin. Maybe you were thinking about radioactive decay and Geiger counters at that point, or even bouncing balls. Unfortunately though, even if they scratch the urge to make an interesting piece of engineering, these pieces of hardware run the risk of becoming overcomplex and perhaps a bit messy.
The significantly more random result of a thousand Arduino Entropy Library calls.
The best of the suggestions in the Twitter thread brings us to the Arduino Entropy Library, which uses jitter in the microcontroller clock to generate truly random numbers that can be used as seeds. Lifting code from the library’s random number example gave us a continuous stream of numbers, and taking a thousand of them for the same spreadsheet treatment shows a much more even distribution. The library performs as it should, though it should be noted that it’s not a particularly fast way to generate a random number.
So should you ever need a truly random number in your Arduino sketch rather than one that appears random enough for some purposes, you now know that you can safely disregard the documentation for a random seed and use the entropy library instead. Of course this comes at the expense of adding an extra library to the overhead of your sketch, but if space is at a premium you still have the option of some form of hardware noise generator. Meanwhile perhaps it is time for the Arduino folks to re-appraise their documentation.
If you’re tired of classic tower building games like Jenga or stacking cards and would like a new challenge, “mr_fid” has come up with a game where you balance blocks on a tree assembly. The nicely crafted device then moves around to throw the blocks off using three servos and push rods.
Everything is controlled by an Arduino Nano that randomly selects the intensity of the movement and which color of block to be stacked, displayed on a circular arrangement of programmable LEDs.
Once a block has been added, a button in the middle of the LEDs is pushed and tree movement starts, potentially destabilizing the player’s work.
Nice Arduino project. Featuring an Arduino Nano controlling 3 servos to move the tree. Firstly the “Roll” button is pressed to give you a colour and amplitude once the correct bit has been placed on the tree the “Shake” button is pressed and the tree moves around. Any bits which fall off are given to the person whos go it was! the idea of the game is to get rid of all your bits first. If when you press the “Roll” button you don’t have the correct colour OR the strength is to high then if you wish you can miss your go.
You can check the game out in the first video below, or see the second video for information on how to avoid jittery servos in this type of setup.
After a longish hiatus, we were pleased to see a new video from [Afroman], one of the most accessible and well-spoken teachers the internet has to offer. If you’re new to electronics, see the previous sentence and resolve to check out his excellent videos. The new one is all about servos, and it culminates in a simple build that provides a foundation for exploring robotics.
[Afroman] leaves no gear unturned in his tour de servo, which is embedded after the break. He explains the differences between open vs. closed loop motor systems, discusses the different sizes and types of servos available, and walks through the horns and pigtails of using them in projects. Finally, he puts this knowledge to use by building a laser turret based on a pan-tilt platform.
The Arduino-driven turret uses two micro servos controlled with pots to move by degrees in X/Y space. Interestingly, [Afroman] doesn’t program the board in the Arduino IDE using wiring. Instead, he uses an open-source microcontroller language/IDE called XOD that lets you code by building a smart sort of schematic from drag-and-drop components and logic nodes. Draw the connections, assign your I/O pin numbers, and XOD will compile the code and upload it directly to the board.
XOD seems like a good tool for beginners to do rapid prototyping. On the other hand, a look into the generated code reveals a whole lot of wrappers that obfuscate the bits of code that actually do stuff. There doesn’t seem to be a way to shed them, either, so once you design something in XOD, you’re kind of stuck using it to iterate. That said, the generated code is well documented, and someone who knows what they’re looking at could find, for instance, the I/O pin assigned to the blink sketch LED.
While ’80s-style boomboxes have their own unique character, per hacker “Dancorp’s” excellent mod, it’s clear that they could be improved dramatically with programmable LEDs.
This build uses a capacitive filtering arrangement to feed line out signals from the boombox into an Arduino Uno, which then controls three LED strips.
Two of these strips are arranged around the speaker cones, emitting beautiful LED effects to go along with the music playing, while the third can be used to light up the built-in VU meters.
A schematic along with Arduino code are available on Dancorp’s write-up. It looks like a fairly accessible project, especially given the extra space available in electronics from that era.
Up until the present day, if you need butter, you simply ask another human to “pass the butter,” leading to minor inconvenience and awkwardness. Engineering students in Brussels have come up with a novel solution: a robot that brings the butter to you!
The robot, inspired by Rick and Morty’s Butter Bot, is powered by an Arduino Uno and summoned to hungry humans via an infrared remote control.
When the signal detected by onboard IR sensors, the robot moves over using continuous-rotation modded servos, then flips its cap-like lid to reveal the butter inside.