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

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.

Continue reading “A Lego Game Controller; Just For The Hack Of It”

Infinity Mirror Clock: There’s A Time Joke There Somewhere

Infinity Mirror Clock

We don’t think we’ve seen an Infinity Mirror Clock before, but we love this new twist on an old favorite. Different colors distinguish between seconds, minutes and hours, and an additional IR sensor detects when someone is directly in front of the clock and switches the LEDs off, allowing it to be used as a normal mirror. This build is the work of [Dushyant Ahuja], who is no stranger to hacking together clocks out of LEDs. You can tell how much progress he’s made with the mirror clock by taking a glance at his first project, which is an impressive creation held together by jumbles of wire and some glue.

[Dushyant] has stepped up his game for his new clock, attaching an LED strip along the inside of a circular frame to fashion the infinity mirror effect. The lights receive a signal from an attached homemade Arduino board, which is also connected to a real-time clock (RTC) module to keep time and to a Bluetooth module, which allows [Dushyant] to program the clock wirelessly rather than having to drag out some cords if the clock ever needs an adjustment.

Stick around after the jump for a quick demonstration video. The lights are dazzling to watch; [Dushyant] inserted a stainless steel plate at the center of the circle to reflect the outer rim of LEDs. After a quick rainbow effect, it looks like the mirror enters clock mode. See if you can figure out what time it is. For a more step-by-step overview of this project, swing by his Instructables page.

Continue reading “Infinity Mirror Clock: There’s A Time Joke There Somewhere”

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!

The Smart Humidor

humidor

If you’re a cigar aficionado, you know storing cigars at the proper temperature and humidity is something you just need to do. Centuries of design have gone into the simple humidor, and now, I guess, it’s time to put some electronics alongside your cigars.

The design of [dzzie]’s smart humidor consists of an Arduino, WiFi shield, LCD + button shield, and most importantly, a DHT22 temperature and humidity sensor. In a bit of thoughtfulness, only the DHT22 is mounted inside the humidor; everything else is in an enclosure mounted outside the humidor, including a few buttons for clearing alerts and logging when water is added.

The smart humidor reads the DHT22 sensor every 20 minutes and uploads the data to a web server where useful graphs are rendered. The control box will send out an alert email to [dzzie] if the temperature or humidity is out of the desired range.

Electric Go-Cart Has Arduino Brains

arduino powered go cart

Oh how times have changed. Back in the 30’s the VW Beetle was designed to be cheap, simple and easy for the typical owner to maintain themselves. Nowadays, every aspect of modern cars are controlled by some sort of computer. At least our go-carts are spared from this non-tinkerable electronic nightmare…. well, that’s not completely true anymore. History is repeating itself as [InverseCube] has built an electronic go-cart fully controlled by an Arduino. Did I forget to mention that [InverseCube] is only 15 years old?

The project starts of with an old gas-powered go-cart frame. Once the gas engine was removed and the frame cleaned up and painted, a Hobbywing Xerun 150A brushless electronic speed controller (ESC) and a Savox BSM5065 450Kv motor were mounted in the frame which are responsible for moving the ‘cart down the road. A quantity of three 5-cell lithium polymer batteries wired in parallel provide about 20 volts to the motor which results in a top speed around 30mph. Zipping around at a moderate 15mph will yield about 30 minutes of driving before needing to be recharged. There is a potentiometer mounted to the steering wheel for controlling the go-cart’s speed. The value of the potentiometer is read by an Arduino which in turn sends the appropriate PWM signal to the ESC.

Continue reading “Electric Go-Cart Has Arduino Brains”

Monster 100W LED Flashlight Produces A Whopping 8500lm!

100W LED Flashlight

[Yannick] got a hold of a 100W LED diode recently, and like any self-respecting hacker, he just had to turn it into a ridiculously over powered flash light.

The tricky thing about these diodes is that they need a high amount of DC voltage, anywhere from 32-48V typically. [Yannick’s] using a 12V sealed lead acid battery coupled with a 600W constant current boost converter which ups it to 32V at around 3.2A. He also managed to find a giant aluminum heat-sink to keep the diode from getting too hot. A 120mm fan helps to keep the heat sink nice and cool, which allows the light to be run constantly without fear of burning it out. But just in case he also has an Arduino monitoring the temperatures — oh and it provides PWM control to adjust the brightness of the light!

To focus the flashlight he bought a proper lens and reflector which can be mounted directly to the diode. At full power the LED puts out around 8500lm, which is brighter than almost all consumer projectors available — or even the high beams of a car!

Continue reading “Monster 100W LED Flashlight Produces A Whopping 8500lm!”