Arduino SPI Library Gains Transaction Support

Transaction SPI Timing
Transaction SPI Timing

To prevent data corruption when using multiple SPI devices on the same bus, care must be taken to ensure that they are only accessed from within the main loop, or from the interrupt routine, never both. Data corruption can happen when one device is chip selected in the main loop, and then during that transfer an interrupt occurs, chip selecting another device. The original device now gets incorrect data.

For the last several weeks, [Paul] has been working on a new Arduino SPI library, to solve these types of conflicts. In the above scenario, the new library will generate a blocking SPI transaction, thus allowing the first main loop SPI transfer to complete, before attempting the second transfer. This is illustrated in the picture above, the blue trace rising edge is when the interrupt occurred, during the green trace chip select. The best part, it only affects SPI, your other interrupts will still happen on time. No servo jitter!

This is just one of the new library features, check out the link above for the rest. [Paul] sums it up best: “protects your SPI access from other interrupt-based libraries, and guarantees correct setting while you use the SPI bus”.

DEFCON Shenanigans: Hack The Hackaday Hat

We don’t want to call it a challenge because we fear the regulars at DEFCON can turn our piece of hardware into a smoking pile of slag, but we are planning to bring a bit of fun along with us. I’ll be wearing this classy headgear and I invite you to hack your way into the WiFi enabled Hackaday Hat.

I’ll be wearing the hat-of-many-scrolling-colors around all weekend for DEFCON 22, August 7-10th in Las Vegas. You may also find [Brian Benchoff] sporting the accessory at times. Either way, come up and say hello. We want to see any hardware you have to show us, and we’ll shower you with a bit of swag.

Don’t let it end there. Whip out your favorite pen-testing distro and hack into the hat’s access point. From there the router will serve up more information on how to hack into one of the shell accounts. Own an account and you can leave your alias for the scoreboard as well as push your own custom message to the hat’s 32×7 RGB LED marquee.

You can learn a bit more about the hat’s hardware on this project page. But as usual I’ve built this with a tight deadline and am still trying to populate all the details of the project.

Thumbnail that say The Hacklet

Hacklet #9 Bugs And Fire

9 This week on the Hacklet, we’re spending some time looking at bugs and fire! honeybeeFirst up we have [Noel] who is saving the bees with Bee-O-Neo-Tweet-O. Bees are incredibly important, both to Earth’s ecosystem and the food chain we humans need to survive. Unfortunately bees are also sensitive to some of the chemicals humans dump into the atmosphere. Sometimes it results in colored honey, but more often than not it’s detrimental to the bees.

Neonicotinoids are a class of insecticide that has been causing problems to hives near where they are used. [Noel] is banking on sensors created with bismuth electrodes to detect the chemical near the entrance to hives. The data can be collected by beekeepers all over the world and sent to a central server. He’s using an Arduino Yun as a WiFi connected base station. Each individual hive has an Adafriut Trinket and a 433MHz radio link to send data to the base. [Noel] is even hoping to detect individual bees by the sound of their wings beating.

hivemonitor

[Ken] is keeping his own bees, and wants to monitor more than just chemicals. His honeybee hive monitoring system keeps track of the temperature and weight (and thus the honey produced) by his hives. Rather than buy an expensive load cell setup, [Ken] modified a standard digital bathroom scale to suit his needs. The insects connect to the IOB (Internet of Bees) with a bit of help from the Apitronics platform and a BeagleBone Black. Ken even added a solar-powered weather station with the Apitronics system.

bug-killa[Mike] is taking a slightly different approach. He doesn’t want to save the bugs, he wants to kill the ones that bug him! [Mike] doesn’t want to get his hands dirty, so he’s created Lazy Killer 9000 for easy bug killing. Lazy Killer uses the business end of an electrified fly swatter to do its work. This project wouldn’t be complete without an Arduino, so [Mike] is adding one, as well as a WiFi shield. The entire system will have a friendly interface to turn the juice on. One of the best features of Lazy Killer is the internet connected kill count. [Mike] knows that there aren’t any bugs in the vacuum of space, so he’s entered Lazy Killer in The Hackaday Prize.

fire-charger

From bugs, we move on to Fire! [mr.jb.swe] needed a reliable portable power source. He found it in LiFePO4 batteries, but still needed a way to charge them. Toward that end he’s created The Multicharger, a watt meter and charger which can be powered from solar, wind, or thermometric power. A Powerpot X provides the fire and the power to charge the batteries. [mr.jb.swe’s] charger converts that into the standard constant current->constant voltage charging system needed by lithium chemistry batteries. The Multicharger isn’t a complete battery management system yet, but it’s well on its way.

Unitycandle candles have become a staple at wedding ceremonies.[Quinn] has taken things to the next level and beyond with this take on the classic unity candle. This candle throws fireballs 30 feet into the sky! We covered the candle back in June, but [Quinn] has been busy since then. With over 20 updates, [Quinn] has created one of the most well documented projects on Hackaday.io. Of course, being that this project is dealing with propane and monstrous fires, [Quinn] mentions you shouldn’t try unless you really know what you’re doing. Don’t set any brides on fire! That’s it for this week’s Hacklet! Tune in next week, same hack time, same hack channel, for more of the best of Hackaday.io!

Astronaut Or Astronot: Totally Giving Away A Power Supply

Hey! It’s time for another round of Astronaut or Astronot, where we try to give away a jumbo power supply to someone on hackaday.io if they have voted in the most recent community voting round.

Before I get around to telling you who won, we need to go over the criticism of the current voting scheme. There’s a lot of valid criticism out there about how the algorithm that presents projects to the voting page is broken. Yes, it weights projects so some are seen more often than others. And yes, it can be frustrating. However, the results of the voting have no bearing on The Hackaday Prize (the space thing), and the purpose of the entire community voting is to get people looking at the projects, give away t-shirts to the project creators and 3D printers, o-scopes, and power supplies to random people who have voted. We listened to your suggestions and we’re tweaking the algorithm that presents projects for the next round of voting. That starts Monday, we’re doing the drawing on Wednesday, and votes don’t carry over from round to round.

With that out of the way, it’s time to do the whole ‘pick a random person on hackaday.io and see if they voted’ thing. For this week’s lottery, I chose five random people on the site, hoping I wouldn’t go through all of them before giving away a nice bench power supply. The first person, [in3rtial], didn’t vote. You just lost out on a really cool prize there, man.

The second person randomly selected was [tyler]. He voted a total of six times this round. I voted fifty times, but we’re not picky. That means he wins a nice power supply. Everyone go congratulate him for living somewhere that’s cheap to ship a power supply to.

That’s it for this round of Astronaut or Astronot. We’ll have a new round of voting up on Monday. For a change of pace (and because we’re going to be at DEFCON at this time next week), we’re going to do the drawing on Wednesday nevermind, we’re totally doing the drawing from DEFCON. Oh, and if you haven’t, you might want to submit a project to The Hackaday Prize. There’s still time, and your odds of winning something are really, really good.

Laser Projected Christmas Lights

It’s August, and of course that means that it’s time for retail stores to put up their Christmas decorations! But seriously, if you’re going to do better than the neighbors you need to start now. [Joey] already has his early start on the decorations, with a house-sized light show using LED strips and a laser projector that he built last Christmas.

What started off as a thought that it would be nice to hang a wreath over the garage soon turned into a laser projector that shows holiday-themed animations on the front of the house. The project also includes a few RGB LED strips which can match the colors displayed by the projector. The LEDs are powered from a custom-built supply that is controlled by a laptop, and the program that runs on the computer averages the colors from the video signal going to the projector which lights up the LED strips to match the projected image. This creates an interesting effect similar to some projects that feature home theater ambient lighting.

The only major problem [Joey] came across was having to account for the lasers’ motion in the projected patterns, which was causing the computer to read false values. This and a few other laser-related quirks were taken care of with a bit of programming to make sure the system was functioning properly. After that it was a simple matter of attaching the projector to the roof and zip-tying the LED strips to the eaves of the house.

The projector is weatherproof, has survived one harsh winter already, and can be up and running for any holiday. With Halloween right around the corner, this could be a great way to spice up some trick-or-treating. Check out the video after the break to see this setup in action.

Continue reading “Laser Projected Christmas Lights”

Fischertechnik CNC Machine Looks Innocent Whilst Cutting Your Face

FischerTechnik + Arduino CNC Milling Machine

Hallo iedereen! All the way from the Netherlands comes this fairly unique CNC milling machine built by a handful of Mechanical Engineering students over at the Delft University of Technology. These guys only had one week to build the mill in order to fulfill a requirement of their Mechtronics class. Unfortunately, directly after showing the machine worked, it had to be disassembled.

If the frame looks a little toy-ish, it’s because it is. This particular system is called Fischertechnik and the main support beams are similar to that of aluminum extrusion (ex 80/20, Misumi) except that it is made from nylon. Notice the extremely long cutting bit and comparatively abnormal large Z axis travel capability. What this system lacks in rigidity is made up by being able to carve a very 3D shape with steep sides without the machine hitting the work piece. The loss of rigidity was totally acceptable since the team was only planning on cutting foam and the project’s purpose was to learn mechanics and automation.

Continue reading “Fischertechnik CNC Machine Looks Innocent Whilst Cutting Your Face”

Electricity Monitoring With A Light-to-Voltage Sensor, MQTT And Some Duct Tape

Bh6mcz_CUAAuI3V

When it comes down to energy management, having real-time data is key. But rarely is up-to-the-minute kilowatt hour information given out freely by a Utility company, which makes it extremely hard to adjust spending habits during the billing cycle. So when we heard about [Jon]’s project to translate light signals radiating out of his meter, we had to check it out.

From the looks of it, his hardware configuration is relatively simple. All it uses is a TSL261 Light-to-Voltage sensor connected to an Arduino with an Ethernet shield attached. The sensor is then taped above the meter’s flashing LED, which flickers whenever a pulse is sent out indicating every time a watt of electricity is used. His configuration is specific to the type of meter that was installed by his Utility, and there is no guarantee that all the meters deployed by that company are the same. But it is a good start towards a better energy monitoring solution.

And the entire process is documented on [Jon]’s website, allowing for more energy-curious people to see what it took to get it all hooked up. In it, he describes how to get started with MQTT, which is a machine-to-machine (M2M)/”Internet of Things” connectivity protocol, to produce a real-time graph, streaming data in from a live feed.

Continue reading “Electricity Monitoring With A Light-to-Voltage Sensor, MQTT And Some Duct Tape”