Arduino Nitrox Analyzer For The Submarine Hacker

For Hackaday readers who don’t spend their free time underwater, nitrox is a blend of nitrogen and oxygen that’s popular with scuba divers. Compared to atmospheric air, nitrox has a higher concentration of oxygen; which not only allows divers to spend more time underwater but also reduces the risk of decompression sickness. Of course when fiddling with the ratio of gases you breathe there’s a not inconsequential risk of dying, so nitrox diving requires special training and equipment to make sure the gas mixture is correct.

Divers can verify the ratio of oxygen to nitrogen in their nitrox tanks with a portable analyzer, though as you might expect, they aren’t exactly cheap. But if you’re confident in your own hacking skills, [Eunjae Im] might have the solution for divers looking to save some cash. He’s come up with an Arduino based nitrox analyzer that can be built for considerably less than the cost of a commercial unit.

Now before you get the torches lit up, we should be clear: ultimately the accuracy, and therefore safety, of this device depends on the quality of the oxygen sensor used. [Eunjae] isn’t suggesting you get a bottom of the barrel sensor for this build, and in fact links to a replacement sensor that’s intended for commercial nitrox analyzers as a way to verify the unit is up to the task. The downside is that the sensor alone runs $80. If you want to go with something cheaper, you do so at your own risk.

With a suitable sensor in hand, the project really boils down to building up an interface and enclosure for it. [Eunjae] is using an Arduino Nano, a 128×64 OLED screen, and a battery inside of a rugged waterproof case. He also added an ADS1115 16 Bit DAC between the oxygen sensor and the Arduino for fast and accurate readings over I2C. With the hardware assembled, calibrating the device is as simple as taking it outside and making sure you get an oxygen reading of 20.9% (the atmospheric normal).

While [Eunjae] is happy with his analyzer on the whole, he does see a few areas which could be improved in future revisions. The case is bulky and rather unattractive, something that could be addressed with a custom 3D printed case (though waterproofing it might be an issue). He also says the only reason he used a 9V alkaline battery was because he had it on hand, a small rechargeable battery pack would be a much more elegant solution.

We’ll go out on a limb and say that most Hackaday readers aren’t avid scuba divers. For better or for worse, we’re the sort of folks who stay in the shallow end of the pool. But when one of our ilk does dip below the waves, they really seem to go all out.

Continue reading “Arduino Nitrox Analyzer For The Submarine Hacker”

Gyro Controlled RGB Blinky Ball Will Light Up Your Life

[James Bruton], from the XRobots YouTube channel is known for his multipart robot and cosplay builds. Occasionally, though, he creates a one-off build. Recently, he created a video showing how to build a LED ball that changes color depending on its movement.

The project is built around a series of 3D printed “arms” around a hollow core, each loaded with a strip of APA102 RGB LEDs. An Arduino Mega reads orientation data from an MPU6050 and changes the color of the LEDs based on that input. Two buttons attached to the Mega modify the way that the LEDs change color. The Mega, MPU6050, battery and power circuitry are mounted in the middle of the ball. The DotStar strips are stuck to the outside of the curved arms and the wiring goes from one end of the DotStar strip, up through the middle column of the ball to the top of the next arm. This means more complicated wiring but allows for easier programming of the LEDs.

Unlike [James’] other projects, this one is a quickie, but it works as a great introduction to programming DotStar LEDs with an Arduino, as well as using an accelerometer and gyro chip. The code and the CAD is up on Github if you want to create your own. [James] has had a few of his projects on the site before; check out his Open Dog project, but there’s also another blinky ball project as well.

Continue reading “Gyro Controlled RGB Blinky Ball Will Light Up Your Life”

This Cup Holder Crystal Ball Tells Your MPG Future

Hybrid vehicles, which combine an eco-friendly electric motor with a gasoline engine for extended range, are becoming more and more common. They’re a transitional technology that delivers most of the advantages of pure electric vehicles, but without the “scary” elements of electric vehicle ownership which are still foreign to consumers such as installing a charger in their home. But one element which hybrids are still lacking is a good method for informing the driver whether they’re running on petroleum or lithium; a way to check at a glance how “green” their driving really is.

[Ben Kolin] and his daughter [Alyssa] have come up with a clever hack that allows retrofitting existing hybrid vehicles with an extremely easy to understand indicator of real-time vehicle efficiency. No confusing graphics or arcade-style bleeps and bloops, just a color-changing orb which lives in the cup holder. An evolved version which takes the form of a smaller “dome light” that sits on the top of the dashboard could be a compelling aftermarket accessory for the hybrid market.

The device, which they are calling the ecOrb, relies on an interesting quirk of hybrid vehicles. The OBD II interface, which is used for diagnostics on modern vehicles, apparently only shows the RPM for the gasoline engine in a hybrid. So if the car is in motion but the OBD port is reporting 0 RPM, the vehicle must be running under electric power.

With a Bluetooth OBD adapter plugged into the car, all [Ben] and [Alyssa] needed was an Arduino Nano clone with a HC-05 module to read the current propulsion mode in real-time. With some fairly simple conditional logic they’re able to control the color of an RGB LED based on what the vehicle is doing: green for driving on electric power, purple for gas power, and red for when the gas engine is at idle (the worst case scenario for a hybrid).

Check out our previous coverage of OBD hacking on the Cadillac ELR hybrid if you’re looking to learn more about what’s possible with this rapidly developing class of vehicle

Continue reading “This Cup Holder Crystal Ball Tells Your MPG Future”

Hands On With The Arduino FPGA

All of the tools you need to work with the FPGA Arduino — the Vidor — are now in the wild!

We reported earlier that a series of French blog posts finally showed how all the pieces fit together to program the FPGA on the Arduino MKR4000 Vidor board. Of course, I wasn’t content to just read the Google translation, I had to break out the board and try myself.

I created a very simple starter template, a tool in C to do the bitstream conversion, required, and bundled it all together in one place. Here’s how you can use my starter kit to do your own FPGA designs using the Vidor. I’m going to assume you know about FPGA basics and Verilog. If you don’t, why not check out the FPGA boot camps first?

The first thing you’ll want to do is grab my GitHub repo. You’ll also need the Arduino IDE (a recent copy) and Intel’s Quartus software. Inside, you’ll find three directories, two of which contain slightly modified copies of original Arduino files. But before you start digging in, let’s get the high-level overview of the process.

Continue reading “Hands On With The Arduino FPGA”

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”.

Easy Blinking LED Eyes For Halloween

There’s not much time left now. If you’re going to put something together to give the youngsters some night terrors in exchange for all that sweet candy, you better do it quick. This late to the game you might not have time to do anything too elaborate, but luckily we’ve come across a few quick Halloween hacks that can get you some pretty cool effects even if it’s only a few hours before the big night.

As a perfect example, these LED “blinking eyes” were created by [Will Moser]. Using nothing more exotic than some bare LEDs, an Arduino, and a cardboard box, these little gadgets can quickly and easily be deployed in your windows or bushes to produce an unsettling effect after the sun goes down. Thanks to the pseudorandom number generator in the Arduino code, the “eyes” even have a bit of variability to them, which helps sell the idea that your Halloween visitors are being watched by proper creatures of the night.

The hardware side of this project is very simple. [Will] takes a container such as a small cardboard box and cuts two holes in it to serve as the eyes. He notes that containers which are white or reflective on the inside work best. You’ll want to get a little artistic here and come up with a few different shaped sets of eyes, which is demonstrated in the video after the break. Inside each box goes a colored LED, wired back to the Arduino.

For the software, [Will] is using a floating analog pin as a source of random noise, and from there comes up with how often each LED will blink on and off, and for how long. Both the hardware and software sides of this project are perfect for beginners, so it might be a good way to get the Little Hackers involved in the festivities this year; if you’re the type of person who enjoys replicating small humans in addition to creeping them out.

LEDs seem to be the hacker’s decoration of choice come Halloween, from wearable LED eyes to remote controlled illuminated pumpkins.

Continue reading “Easy Blinking LED Eyes For Halloween”