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

Laser Projected Christmas Lights

 

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

[Read more...]

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.

[Read more...]

A Lego Game Controller; Just for the Hack of It

ExwDPUV

[StrangeMeadowlark] decided one day to create this badass Arduino-based gaming controller. Not for any particular reason, other than, why the heck not?!

It looks like a tiny Lego spaceship that has flown in from a nearby planet, zooming directly into the hands of an eager Earthling gamer. With buttons of silver, this device can play Portal 1 and 2, Garry’s Mod, Minecraft, and VisualBoy Advance. Although more work is still needed, the controller does the job; especially when playing Pokemon. It feels like a Gameboy interface, with a customizable outer frame.

Sticky, blue-tack holds a few wires in place. And, most of the materials are items that were found around the house. Like the gamepad buttons on top; they are ordinary tactile switches that can be extracted from simple electronics. And the Legos, which provide an easy way to build out the body console, rather than having to track down a 3D printer and learning AutoCAD.

[Read more...]

Teaching the Word Clock Some New Tricks

wordclock2014

[Joakim] has built a clock that spells out the time in words. Wait a second – word clock, what is this, 2009? Word clocks are one of those projects that have become timeless. When we see a build that stands out, we make sure to write it up. [Joakim's] clock is special for a number of reasons. The time is spelled out in Norwegian, and since the clock is a birthday gift for [Daniel], [Joakim] added the his full name to the clock’s repertoire.

One of the hard parts of word clock design is controlling light spill. [Joakim] used a simple 3D printed frame to box each LED in. This keeps the spill under control and makes everything easier to read. The RGB LED’s [Joakim] used are also a bit different from the norm. Rather than the WS2812 Neopixel, [Joakim] used LPD8806 LED strips. On the controller side [Joakim] may have gone a bit overboard in his choice of an Arduino Yun, but he does put the ATmega328 and Embedded Linux machine to good use.

The real magic happens at boot. [Daniel's] name lights up in red, with various letters going green as each step completes. A green ‘D’ indicates an IP address was obtained from the router’s DHCP server. ‘N’ switches to green when four NTP servers have been contacted, and the Linux processor is reasonably sure it has the correct time. The last letter to change will be the ‘E’, which reports ambient light.

[Joakim] added a web interface to trigger his new features, such as a rainbow color palette, or the ability to show minutes by changing the color of the letters K,L,O,K. The final result is a slick package, which definitely brings a 2009 era design up to 2014 standards!

A Better Google Glass For $60 (This One Folds)

glassFor [Tony]‘s entry for The Hackaday Prize, he’s doing something we’ve all seen before – a head mounted display, connected to a Bluetooth module, displaying information from a smartphone. What we haven’t seen before is a cheap version of this tech, and a version of Google Glass that folds – you know, like every other pair of glasses on the planet – edges this project over from ‘interesting’ to ‘nearly practical’.

For the display, [Tony] is using a 0.96″ OLED connected to an Arduino Nano. This screen is directed into the wearer’s eye with a series of optics that, along with every other part of the frame, was 3D printed on a Solidoodle 2. The frame itself not only folds along the temples, but also along the bridge, making this HMD surprisingly compact when folded up.

Everything displayed on this head mounted display is controlled by  either an Android phone or a Bluetooth connection to a desktop. Using relatively simple display means [Tony] is limited to text and extremely simple graphics, but this is more than enough for some very interesting applications; reading SMS messages and checking email is easy, and doesn’t overpower the ‘duino.


SpaceWrencherThe project featured in this post is an entry in The Hackaday Prize. Build something awesome and win a trip to space or hundreds of other prizes.

The RC White House Robot

IMG_20140726_124812_164

This remote controlled, Arduino-based robot was created by a young student named [Quin] who likes to teach electronics classes at hackerspaces. It is an adaptation of this awesome, fast, fully autonomous mini Roomba that has since driven its way into the Presidential building during the 1st ever White House Maker Faire.

The quick, little device uses a robot chassis kit with an XBee wireless module so that the controller and the robot can be connected together. An NFC Shield was hacked and split in half so that the wires could be soldered in place.

[Quin]‘s goal was to develop a fun game that records the number of times the robot drives over NFC tags laid across a flat surface. Points are shown in the form of blinking lights that illuminate when the device goes over the sensors, keeping track of the score.

The controller container was made with an open source 3D printer called a Bukobot. The enclosure holds an Arduino and another XBee shield along with a joystick and a neopixel ring, giving it a nice polished look complete with a circle of beautiful, flashing LED’s.

[Read more...]

Follow

Get every new post delivered to your Inbox.

Join 91,245 other followers