Posts with «arduino» label

Arduino SPI Library Gains Transaction Support

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


Filed under: Arduino Hacks
Hack a Day 01 Aug 21:01

20 Arduino ZERO Dev. Edition available for beta-testing – Join us!

Last May at Maker Faire Bay Area Massimo Banzi introduced our new board to the open source community:

The Arduino Zero, developed in collaboration with Atmel, is a simple and powerful 32-bit extension of the platform established by Arduino UNO. The Zero board aims to provide creative individuals with the potential to realize truly innovative ideas for smart IoT devices, wearable technology, high-tech automation, crazy robotics, and projects not yet imagined. The board is powered by Atmel’s SAMD21 MCU, which features a 32-bit ARM Cortex® M0+ core.

After the great experience we’ve been having with the beta-testing of the the Arduino TRE, we are happy to announce that starting today a limited batch of 20 Arduino ZERO is available for people wanting to join us in the process of beta-testing it..

The ideal beta-tester has time and interest in working on some specific issues we hope to accomplish with the beta-testing: we set up a list of tasks including writing examples, testing libraries and external hardware, and making projects that can be completed in a variety of timeframes.

Ultimately our goal is to make the ZERO welcoming to non-technical customers and useful for tech-savvy customers at the same time, like all of our products. To that end, we’d like feedback from you, as beta testers, about where we could simplify for beginners and explain or document better.

If you want to take part and feel you can spend some time on it, fill this application form by the 17th of August.

By the 21st of August we are going to contact 20 people out of those filling the application. They will receive a coupon to get the Arduino ZERO Developer Edition for free on the Arduino Store.

We will also send them an invite to a Basecamp project where they can get started with the program and sign up for tasks and projects according to their interests, skill-set and time availability.
The beta-testing phase is going to last 1 month (ending around the 20th of September).

Feel like joining us? Fill the form now!

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.


Filed under: Holiday Hacks

Electricity Monitoring with a Light-to-Voltage Sensor, MQTT and some Duct Tape

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.

Now, with all this valuable information, other applications can be built on top of it. Interfacing with something like the Pinoccio microcontroller system can allow for devices to be turned off during peak-power times, helping to reduce the billing price at the end of the month.

Energy-intelligence platforms like this assist in conserving electricity while keeping the rate-payer consistently informed of their power usage habits. A real win, win. However, we still need to figure out how to (legally) extract the data from other types of meters.

One example is to harvest the information wirelessly with a special USB dongle to gather the data emitting from the Utility meter. But this only works for that brand of meter. Another solution is to read infrared flashes with an AVR, a resistor, a capacitor, and a phototransistor, which is similar to what [Jon] created above.

So, what kind of meter do you have? And, do you think there is a better way to extract the kWh data? Let us know in the comments, and let’s see what we can come up with.


Filed under: home hacks

How long can you store food for? Just measure its water activity!

BetaWolf is a scientist fascinated by physics, chemistry,  mathematics and especially the symmetry of phenomena in nature and the way humans describe them in the form of fundamental laws. He submitted to our blog a project focused on measuring water activity powered by Arduino Pro Mini :

Water activity? And why would I want to measure it? Food always contains a certain amount of ‘free’ or unbound water. The more unbound water is present, the easier it is for micro-organisms like fungi to grow. Hence, the shelf life of food products is shortened by the presence of unbound water. Water activity is a physical quantity that describes the amount of unbound water in a product. Therefore, by measuring the water activity, you can estimate the shelf life of food. Only problem is the incredible amount of money you have to pay for a commercial water activity meter. In this article I describe an easy and cheap water activity meter on the basis of a humidity sensor, an NTC, and an Arduino Pro Mini.

Check his blogpost for all the details about this project.

Arduino Blog 31 Jul 22:18
arduino  featured  food  

New on the Shed—the Light Blue Bean

We looked at Punch Through Design's Light Blue Bean before, but now the hardware is shipping. Get yours from the Maker Shed.

Read more on MAKE

New Project: Facebook Flagger—Notifications over Bluetooth LE using the Light Blue Bean

Building hardware is exciting because you get to interact with the "real world". In this project you will use the LightBlue Bean to receive notifications from Facebook and Twitter

Read more on MAKE

A Lego Game Controller; Just for the Hack of It

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

Communication between the PC and the Arduino inside is done by having the controller pretend to be a USB keyboard, allowing for in-game mapping of the keys. Key presses are sent to the Serial-to-USB chip in buffer specific to the firmware. Not to mention, it gives the option to browse Imgur if the urge arises.

For future iterations, Joysticks might be added. It will take some time to integrate them into the controller, but it will be worth the effort. Another implementation will be the utilization of gamepad firmware instead of emulating a keyboard, which doesn’t report analog values.

Other Lego projects similar to this include this two-axis panning time lapse rig, this custom electronic Lego microcontroller system called the LegoDuino, this obstacle avoiding LEGO rover with CD wheels, this Lego Drawing Machine, and this DIY Spectrophotometer.


Filed under: Arduino Hacks

Ode to the Gameboy: 10 Projects Based on the Iconic Portable Nintendo

When the Nintendo Gameboy was first released in 1989, it was a tremendous commercial success. Gameboy developed a following among gamers that is in many ways still alive to this day. Here are 10 awesome projects inspired by the venerable Gameboy. Some merge the latest maker electronics with late-80s Gameboy […]

Read more on MAKE

Why the NSA Can’t Listen to His Mixtape – Interview with David Huerta

David Huerta is a technologist who recently published a provocative work to make everyone think a little bit more about privacy and what governments should be allowed to do or not:

I work outside the Pokemon business model of catching every user’s data or abusing it for state surveillance. I work instead surrounded by priceless art and in giving it a voice inside and outside the thick, Faraday cage walls of the museum it lives in.

He created an encrypted mixtape and sent it to NSA. The device runs on Arduino and other open hardware and for David is a:

machinery that can be trusted not to spy on you because of the disclosure of its design, schematics and bill of materials to anyone who wishes to inspect, build, or build upon the device. The device contains a soundtrack for the modern surveillance state. It’s designed to be enjoyed only by people I have consented it to be listened to. A second copy of this device will also be sent to the NSA’s headquarters in Maryland, but without the private key needed to decrypt it; a reminder that the rules of mathematics are more powerful than the rules of even the most powerful states.

We got in touch with him and was happy to answer a couple of questions for the blog:

Z: What makes you more uncomfortable about NSA actions which made you react and build this device?

D: The NSA’s mass surveillance encompasses a lot of programs which run counter to what I feel is a fundamental right to privacy. In the US Constitution there’s an expression of that in its fourth amendment.
What the NSA is doing goes against the spirit of that much like petting a cat backwards; It’s the wrong direction to go towards and a cat/society will swipe its paw at the offender.

Z: Arduino community is always interested in understanding how things are made. Where we can find source code and technical specs to build one? It would be great if we all could share more practical knowledge on these topics.

D: The mixtape device is basically just an Arduino and Adafruit wave shield. The code to play each wave file on the SD card on a loop (when unencrypted) is right off their list of examples.
I made one slight modification, which is to turn on a purple LED to indicate when it’s working. Purple is not an easy LED color to source, but it’s the global Pirate Party color and I wanted to give them subtle props for working towards a free and secure internet on the policy side of things.

I will at some point publish a way to do the encryption part of this using a Beaglebone Black and CryptoCape to make it a fully open hardware proof-of-concept, but in this case the SD card encryption was done off-device. I also plan on going through a full tutorial based on that at this year’s Open Hardware Summit in Rome.

Z: You said: “The NSA can read my stupid Facebook updates but without my consent it will never be able to listen to my kick-ass mix tape, even if it’s sitting right in front of them.” – What makes you believe that your encryption is strong enough?

D: The truth is that everyone sucks at information security, including myself, so no one can really make the claim something they’ve built is “NSA-proof.” Generally though, the less hardware and software you have, the less complexity and thus, opportunity for attack vectors or human errors there are. The playlist was kept offline, is not on the Arduino sketch, or anywhere in the hardware except encrypted in the SD card. The only place the audio existed aside from in the various sources I collected it from was on the hard drive of the PC I used to compose the mix tape, which has since been removed and stored offsite and offline. The encryption was also ran by a different machine, and one that I generally keep on my person. This goes beyond mass surveillance capabilities and into TAO/FBI “partyvan” surveillance; I can’t imagine an intelligence analyst is going to go to their very serious boss to explain that they need to expense a vehicle to go after some guy’s mix tape in a city where they won’t even be able to find a parking spot close enough to run a tempest attack from.

ZDo you have the pictures of the inside showing the components and the circuits?

D: They’re not too exciting since its just the Arduino + Wave Shield, but I attached a photo of the unencrypted version (clear acrylic instead of red clear acrylic), which I’ll also be bringing with me to the Open Hardware Summit.

 

Looking forward to meet him at Open Hadware Summit!

Arduino Blog 30 Jul 07:50