Posts with «arduino» label

Want to Learn Ethernet? Write Your Own Darn AVR Bootloader!

There’s a school of thought that says that to fully understand something, you need to build it yourself. OK, we’re not sure it’s really a school of thought, but that describes a heck of a lot of projects around these parts.

[Tim] aka [mitxela] wrote kiloboot partly because he wanted an Ethernet-capable Trivial File Transfer Protocol (TFTP) bootloader for an ATMega-powered project, and partly because he wanted to understand the Internet. See, if you’re writing a bootloader, you’ve got a limited amount of space and no device drivers or libraries of any kind to fall back on, so you’re going to learn your topic of choice the hard way.

[Tim]’s writeup of the odyssey of cramming so much into 1,000 bytes of code is fantastic. While explaining the Internet takes significantly more space than the Ethernet-capable bootloader itself, we’d wager that you’ll enjoy the compressed overview of UDP, IP, TFTP, and AVR bootloader wizardry as much as we did. And yes, at the end of the day, you’ve also got an Internet-flashable Arduino, which is just what the doctor ordered if you’re building a simple wired IoT device and you get tired of running down to the basement to upload new firmware.

Oh, and in case you hadn’t noticed, cramming an Ethernet bootloader into 1 kB is amazing.

Speaking of bootloaders, if you’re building an I2C slave device out of an ATtiny85¸ you’ll want to check out this bootloader that runs on the tiny chip.

Burn Some Time with this Arduino Reddit Browser

If you’re like us, you probably spend more time browsing Reddit than you’d like to admit to your friends/family/boss/therapist. A seemingly endless supply of knowledge, wisdom, and memes; getting stuck on Reddit is not unlike looking something up on Wikipedia and somehow managing to spend the next couple hours just clicking through to new pages. But we’re willing to bet that none of us love browsing Reddit quite as much as [Saad] does.

He writes in to tell us about the handheld device he constructed which lets him view random posts from the popular /r/showerthoughts sub. Each press of the big red button delivers another slice of indispensable Internet wisdom, making it a perfect desk toy to fiddle with when you need a little extra push to get you through the day. Like one of those “Word a Day” calendars, but one that you’ll actually read.

For those curious as to how [Saad] is scraping Reddit with an Arduino, the short answer is that he isn’t. Posts are pulled from Reddit using an online tool created for the project by his wife (/r/relationshipgoals/), and dumped into a text file that can be placed on the device’s SD card. With 1500 of the all-time highest rated posts from /r/showerthoughts onboard, he should be good on content for awhile.

[Saad] has done an excellent job documenting the hardware side of this build, providing plenty of pictures as well as a list of the parts he used and a few tips to help make assembly easier. Overall it’s not that complex a project, but his documentation is a big help for those who might not live and breathe this kind of thing.

For the high-level summary: it uses an Arduino Pro Mini, a ILI9341 screen, and a 3.3 V regulator to step down 5 V USB instead of using batteries. A bit of perfboard, a 3D printed case, and a suitably irresistible big red button pulls the whole thing together.

We’ve seen a similar concept done in a picture frame a couple of years back, but if that’s not interactive enough you could always build yourself a Reddit “controller”.

Amazing Arduino-Based, 3D Printed Wire Bending Machine

Another cool design for a computer-controlled wire bending machine.

Read more on MAKE

The post Amazing Arduino-Based, 3D Printed Wire Bending Machine appeared first on Make: DIY Projects and Ideas for Makers.

Linear movement with Arduino and 3D printing

Arduino boards are great for controlling small servo motors, but what if you need something to provide linear travel? As spotted on Reddit, while the answer here is a little less straightforward, YouTuber Potent Printables has a great solution. It uses 3D-printed components, along with a dab of epoxy and fastener hardware to convert either a micro or standard continuous rotation servo into a rack-and-pinion mechanism.

The project can be seen in the video below with an Arduino Uno and motor shield, though any Arduino capable of PWM output should have no problem with this setup. Since the servos used here are meant for continuous rotation, travel distance is based only on timing. Depending on the application, you may want add a simple microswitch or other sensing mechanism for feedback.

This is a general purpose linear servo actuator (pusher style). Two sizes have been designed, for different space constraints and force outputs.

These use continuous rotation servos which helps keep the cost very low. Off the shelf actuators of this type can cost around $70 USD.

The “mini” version will fit in smaller spacers, but has a much lower force output. The “large” version has a higher force output, but is…larger in size than the “mini.”

Kinetic Sculpture Achieves Balance Through Machine Learning

We all know how important it is to achieve balance in life, or at least so the self-help industry tells us. How exactly to achieve balance is generally left as an exercise to the individual, however, with varying results. But what about our machines? Will there come a day when artificial intelligences and their robotic bodies become so stressed that they too will search for an elusive and ill-defined sense of balance?

We kid, but only a little; who knows what the future field of machine psychology will discover? Until then, this kinetic sculpture that achieves literal balance might hold lessons for human and machine alike. Dubbed In Medio Stat Virtus, or “In the middle stands virtue,” [Astrid Kraniger]’s kinetic sculpture explores how a simple system can find a stable equilibrium with machine learning. The task seems easy: keep a ball centered on a track suspended by two cables. The length of the cables is varied by stepper motors, while the position of the ball is detected by the difference in weight between the two cables using load cells scavenged from luggage scales. The motors raise and lower each side to even out the forces on each, eventually achieving balance.

The twist here is that rather than a simple PID loop or another control algorithm, [Astrid] chose to apply machine learning to the problem using the Q-Behave library. The system detects when the difference between the two weights is decreasing and “rewards” the algorithm so that it learns what is required of it. The result is a system that gently settles into equilibrium. Check out the video below; it’s strangely soothing.

We’ve seen self-balancing systems before, from ball-balancing Stewart platforms to Segway-like two-wheel balancers. One wonders if machine learning could be applied to these systems as well.

Dragon Ball Z head-mounted Scouter computer replica

Those familiar with the Dragon Ball Z franchise will recognize the head-mounted Scouter computer often seen adorning character faces. As part of his Goku costume, Marcin Poblocki made an impressive replica, featuring a see-through lens that shows the “strength” of the person he’s looking at, based on a distance measurement taken using a VL53L0X sensor. 

An Arduino Nano provides processing power for the headset, and light from a small OLED display is reflected on the lens for AR-style viewing.

It’s not exactly perfect copy but it’s actually working device. Inspired by Google virtual glasses I made virtual distance sensor.

I used Arduino Nano, OLED screen and laser distance sensor. Laser sensor takes readings (not calibrated yet) and displays number on OLED screen. Perspex mirror reflects the image (45 degrees) to the the lens (used from cheap Google Cardboard virtual glasses) and then it’s projected on clear Perspex screen.

So you will still see everything but in the clear Perspex you will also see distance to the object you looking at. On OLED screen I typed ‘Power’ instead distance because that’s what this device suppose to measure in DBZ.

Print files as well as code and the circuit diagram needed to hook this head-mounted device up are available on Thingiverse. For those that don’t have a DBZ costume in their immediate future, the concept could be expanded to a wide variety of other sci-fi and real world applications.

Constructing an hourglass lamp with Arduino

With the proliferation of all sorts of digital timers, the need for an hourglass to keep track of whatever activity you’re working on seems like a relic of the past. Still, the hourglass is an interesting form factor, so YouTuber Emiel Noorlander (aka The Practical Engineer) has decided to take it into the 21st century.

His device is about the size and shape of a rectangular picture frame, with the outline of an hourglass in wood attached to white polycarbonate. This diffuses programmable LEDs on the other side, controlled by Arduino Nano to simulate sand falling. The project is powered by a four AA battery pack, cleverly allowed to float in the internal structure, activating the on/off switch when positioned correctly.

In this week’s video I’m making an hourglass lamp with light effects that simulate the falling sand when you turn the lamp upside down.

Another cool feature I build into it is the on / off switch, this is hidden inside the lamp and turns on by putting the lamp on the right side. Turning it upside down then turns off the light.

The outside frame of the lamp is made of 40×6 mm metal strip that I cut to size and then welded as a frame. When this was done I went over to the bandsaw to cut the hourglass shape out of the wood. The semi-transparent panel where the light shines through is made from 3 mm opaque white polycarbonate sheet.

Salvaged Arduino powers animated House Party

What can you do with items that are destined for the dump? As seen here, if you’re Neil Mendoza, you transform furniture, an old TV, art, and even an Arduino Zero that somehow ended up in the trash into a musical installation.

His resulting “House Party” features decorations and control components that according to the project’s write-up are entirely salvaged. A MIDI interface, software written in openFrameworks, and a JSON file are used to coordinate sound and movements, which include spinning picture frames and flowers, tapping shoes, and a television that loops through a rather dreary weather report snippet. 

House Party is a musical installation that explores prized possessions in their native habitat. All the materials used to create this artwork, from the furniture to the computers, were scavenged from the discarded trash. The music is a mix of mechanical and synthesized sounds. The piece was created while an artist in residence at Recology SF.

The actuators in the installation are controlled by an Arduino Zero (also found in the trash) and each screen is connected to a computer running custom software written in openFrameworks (OF). Composition was done in Logic where a MIDI environment was set up to send MIDI data to the Arduino and an OF control program. The control program then sent the data to the other computers over ethernet as OSC. For the final installation, the control program read the data from a JSON file, triggered the screens and Arduino and played the synthesized parts of the music.

Be sure to see all the zany action in the video below!

Electrically assisted scooter senses forward kicks

Maker Bitluni wanted an electric scooter, but he lives in Germany, where electric vehicles of that type are illegal. Motor-assisted bicycles, however, are not. So he set to work making a sort of hybrid that is controlled not by a throttle directly, but provides assistance when the rider kicks the scooter forward.

The scooter uses an accelerometer to sense forward pushes, along with an Arduino Micro that regulates speed via PWM output. A brake assembly is also implemented as a secondary input, starting up the device and powering it down as needed. 

Bitluni’s build and testing process can be seen in the videos below, and Arduino code is available on GitHub.

Custom weather station enhances and modifies electronic music

While the environment is important for any musical performance, generally it’s not an active part of the show. Adrien Kaeser, though, has come up with a device called the “Weather Thingy that integrates weather directly into electronic music performances. It’s able to sense wind direction and speed, light intensity, and rain, translating this data into MIDI inputs.

The system, which was created at ECAL, consists of two parts: a compact weather station on top of a portable stand, as well as a small console with buttons and knobs to select and modify environmental effects on the music. 

Hardware for the project includes an Arduino Mega and Leonardo, a small TFT screen to display the element under control and its characteristics, an ESP32 module, a SparkFun ESP32 Thing Environment Sensor Shield, a SparkFun MIDI Shield, high speed optocouplers, rotary encoder knobs, and some buttons.

Be sure to see the demo in the video below, preferably with the sound on!