Measure time like an egyptian with an Arduino hourglass

via Arduino Blog

clessidra

Todo is the italian design consultancy and creative agency taking care of Arduino and Genuino brand identity and interviewed in this previous blogpost.

Last year, among other projects, they worked on an unconventional communication campaign to narrate the re-opening of the well-known Turin’s Egyptian Museum, displaying a collection of over 30,000 ancient pieces.

The campaign’s goal was to hold people’s attention over six months before the official opening of the Museum and be able to speak to a broad national and international audience.

TODO created an open air installation composed by an almost-4-meter-tall hourglass (with a hidden mechanism running on Arduino) that had to work day and night, for six months and over the winter. According to Wikipedia, this hourglass could be the 4th biggest of its kind in the world!

The main challenge was that they had to make sure that the very last grain inside the hourglass would fall on the day of the Museum’s inauguration.

The installation was created thanks to many collaborators among which Gabriele Gambotto who developed the electronic part based on the Arduino Yún on which they added a custom shield ( See pic below), connected to various sensors and a precision scale. The sand-like material passed through a valve and a long screw conveyor controlled by a mot

todoshield

Take a look at the video of the ‘Hourglass Countdown’ and to see it in action:

In an indoor area of the museum an interactive display case was the other face of the campaign revealed to the audience:

A series of replicas of ancient Egyptian finds were covered in sand, and users could interact with the system by choosing the spot they wished to unveil, blowing into a microphone, and having their breath converted by a small robot arm, which placed itself in the exact spot, blew away the sand and revealed part of the find.

The experience came to life in two different contexts. Locally, a roadshow with several stops made the display case accessible all around the city. Online, through the campaign’s website, you could blow away the sand from anywhere in the world, seeing the live streaming video of the robot moving and unveiling the find.

 

 

IMG_3237 IMG_4808 IMG_8454 IMG_9329

The installation was running on a ROS system, Arduino Mega, using blow sensors and controller, and an iPad to allow interaction with the visitors of the museum.


Check the video to see the amazing expression of people discovering ancient objects below the sand:

I2C Hacks: How to Splice Clocks into Chip-Selects

via Hackaday » hardware

There comes a time when you need to wire up three, four, or more identical i2c devices to a common microcontroller. Maybe you’re thinking about driving a whopping 32 seven-segment displays with four of those MAX7219CNG 8-way digit drivers, or maybe you have a robot full of joints–each of which needs a BNO055 inertial sensor for angle estimation. (See above.) Crikey! In both of those cases, you’re best bet might be a schnazzy I²C device that can do most of the work for you. The problem? With a single I²C bus, there’s no standard way defined in the protocol for connecting two or more devices with the same address. Shoot! It would’ve been handy to wire up three BNO055 IMUs or four MAX7219CNGs and call it a day. Luckily, there’s a workaround.

We’ve seen some clever tricks in the past for solving this problem. [Marv G‘s] method involves toggling between a device’s default and alternate address with an external pin. This method, while clever, assumes that the device (a) has an alternate I²C address and (b) features an external pin for toggling that address.

I’ll introduce two additional methods for getting the conversation started between your micro’ and your suite of identical sensors. The first is “a neat trick,” but somewhat impractical for widespread use. The second is far more  production-worthy–something you could gloat over and show off to your boss! Without further ado, let’s get started with Method 1.

Lastly, if you’d like to follow along, feel free to check out the source code on Github.

The Test Setup:

cube_details

In both methods, I’m using the same sensor setup to check that each circuit behaves correctly. I happened to have a bunch of extra BMA180s on the bench, so I rolled out an example based on these chips. Back in the day, the BMA180 was a pretty common three-axis digital accelerometer. It has an I²C interface with two optional addresses. For the purpose of this example, I’m fixing them all with the same address.  I’ve mounted three of these guys on mutually perpendicular axes of my acrylic “test cube,” and I’m reading each chip’s Z-axis. In this configuration I can easily pick out the gravity vector from the corresponding sensor as the data goes flying by my serial port window. If I can uniquely address each sensor and read the data, I’ve got a working circuit.

Method 1: Splicing Clocks into Chip-Selects

This method tips its hat towards SPI in that it behaves in an oddly similar fashion. If you’re feeling rusty on SPI, here’s a quick recap.

A Quick SPI Refreshment:

SPI, like I²C, is another protocol that shares both its clock and data lines with multiple slave devices. The difference, though, lies in the addressing scheme to talk to these devices that share the same bus. With SPI, while clock and data lines are shared, devices are addressed with separate chip-select (CS) lines.

SPI_three_slaves
Image Source: Wikipedia

The master microcontroller dedicates a unique output pin to each device (~SS1, ~SS2, and ~SS3 in this illustration). When the master micro’ wants to talk to a device, it asserts that device’s chip-select input pin by pulling it to logic LOW, and the conversation begins over the data bus. With the chip select LOW, the corresponding slave listens to the data on the bus. Meanwhile, all other devices ignore the conversation between the master and it’s chosen slave by keeping their bus pins in a high impedance state.

Giving I²C Its Own Chip-Selects:

With I²C, Clock (SCL) and Data (SDA) lines are still shared between all I2C slave devices, but the addressing scheme happens by sending a message heard by all devices on the bus. To single out one device on the shared bus, the master first passes down the address of the slave device it wants to talk to, after which that slave replies with an ACKnowledge, and all other slaves ignore the data that follows until both data transmission is complete and the bus is “released.”

i2c_normal_operation

Because we have the problem of multiple devices with shared addresses, in theory, all of these devices would reply when the master passes down their shared address, and there’s no way for the master to single out a single device. In reality, this behavior is undefined on the I²C protocol.

i2c_bad_operation

Yikes! Anything goes when we wander away from defined behavior, so we try to avoid these things in practice.

The solution?

According to the I²C spec, It just so happens that an I²C slave device will ignore changes on the data line (SDA) provided that the clock line (SCL) is held high. In this method, I’ll “split” the SCL line into multiple SCL lines such that each shared I²C device gets its own SCL. By selectively rerouting the clock to each I²C device one-at-a-time, I’ve essentially turned the SCL line into a “chip select.”

To chop up that clock line, I’ll need a demultiplexer. A demultiplexer (or decoder) takes a logical input and reroutes it to one of several outputs based on the binary select lines.

demux i2c_demultiplexing_demo

I’ve dropped in the 74AC11138 eight-way demultiplexer for this task. It’s fast, capable of switching at megahertz rates, and its outputs default to logic HIGH. That second note is handy since idle SCL lines also default to logic HIGH.

The setup is shown in a simplified schematic above. In it, I’m using a Teensy 3.0 posing as the I²C bus master. To the right of the Teensy is the collection of identical chips, BMA180 accelerometers in this case. In the middle is the 74AC11138 eight-way demultiplexer.

Cons of this Method:

There’s a minor drawback with this technique, though, in that it doesn’t support I²C’s clock-stretching feature. Taking a step back, this method assumes that the SCL line is inherently unidirectional, controlled by only the I²C bus master. In other words, we’re making the assumption that data on the SCL line is only sent from master to slave and never the other way around. If your I²C slave devices implement clock-stretching, however, this assumption breaks down.

What is Clock Stretching?

Clock stretching is a method defined by the I²C protocol where the chip needs to “buy itself more time” and holds the SCL line low, hence, signalling to the master that it’s not ready for the upcoming data. In this scenario, the slave actively controls the SCL line, and it happens to be the only case where data moves up the SCL line from slave to master. In a setup with our demultiplexer between the master and our set of identical slaves, these slaves won’t be able to send back the clock-stretching signal to the master to indicate that they aren’t ready for data, if they happen to implement clock stretching. That said, clock stretching is a pretty rare feature among I²C-compatible devices, so this method is likely to work among a number of chips out now.

More Next Week

That’s all for Method 1. Thanks for tuning in, and check back next week for a slightly-more-professional method of tackling this same problem.


Filed under: Featured, hardware

Hey, who is this guy?

via SparkFun Electronics Blog Posts

An brief introduction to SparkFun’s new Director of Software Development and IT (SWIT).

Hi, you recently read a blog post from me about the health and status of data.sparkfun.com. Some people were asking, “Hey, who is that guy?” I think that’s a fair question. I never really got a chance to introduce myself before I went and started talking about Data.

Back in January, Frencil, the long standing Director of IT here at SparkFun, decided to step down. Frencil was leaving under very good terms and decided that he would also help Nate find a new Director of IT for SparkFun. I applied for the position in February. As you can imagine, a position like this took a while to fill, but he was involved in almost every stage of the hiring process. I remember talking to him during the phone screen and then again during my in person interview. Since I’ve gotten to join the SparkFun team, he has been an excellent emissary of the brand, helping me feel very comfortable at SparkFun even when he is no longer an employee.

Frencil is a special guy, SparkFun was lucky to have someone like him when they did and I wish him all the best moving forward.

alt text

Here I am.

As I have taken over I’ve made a few changes, most prominently the department name. In honor of all of the cool software work we do here at SparkFun, I asked that the department be renamed from IT to Software Development and IT, or SWIT. I have a great crew here helping me fly this ship and we are currently growing.

My technical background has mostly been leading development and DevOps teams, and I feel that the position here at SparkFun is fully situated to take advantage of these skills. My DevOps background specifically is what drove the post about Data. We had a problem, I wanted it fixed and then I wanted not only a chance to explain ourselves, but a chance to highlight how we were going to improve moving forward.

So, now that I’m here, I plan to be your conduit for many SparkFun-related information sharing activities. When we have something cool to show you, I’ll make sure you see it. If we mess up, I’ll be the one owning up to it. We believe in an open sharing of resources and ideas, and this transparency is our promise to you, our customers.

So, a little about me. I’m new to Colorado, having just moved here from Maryland (the DC Metro area to be more specific). I’ve never lived outside of the East Coast and I’m really enjoying both Colorado and SparkFun.

I’m a pretty big fan of science fiction and I’ll try and include as many references as feels right in most of my writing. This was an aspect of SparkFun culture that was not lost on me when I came for my first interview. All of the conference rooms are named after spaceships, the main conference room being the Millennium Falcon. Come on a tour and see how many spaceship rooms you can see!

On top of that, I’m a pretty big sports fan, having spent the last 11 years rooting for the Nationals. They came to town a little after I graduated college. Once I had a real job and was starting to really earn some money, I figured the best use of this was baseball season tickets. I’ve been hooked ever since.

Double M with a prized Nationals Give away

I have also found a very happy place with the intersection of Sports and science fiction/fantasy. It was at a baseball game that I first realized I was in costume at a major event, which helped ease my concerns about going to conventions as a cosplayer, an activity I have enjoyed for many years now.

I’ve also come up with interesting technology management theories that can be explained using the rosters of either the X-Men or basketball teams. When you consider any team, you have to look at your resource balance based on internal dynamics. The X-Men need a power balance, different mutants provide different and complementary skills. Yes, 10 Wolverines would be cool, but do you want to manage that? The same is true in basketball. Simply stacking the deck with the best players doesn’t provide long term success. Getting the best players doesn’t always get you everything you need. You also need role players that know how to complement each other and that can make everyone better. In both examples the goal is to build a team that is more than the sum of its parts. Interested in hearing more? I’m sure we can discuss that during a tour as well.

Technology management is a passion of mine. I’m glad that I was able to find a company that cares about its employees and the future. I’m excited to be here at SparkFun and I’m excited about our future together.

comments | comment feed

LM2596 DC-DC converter module testing

via Dangerous Prototypes

LM2596Module

Kerry D. Wong writes:

In the video below, I tested this DC-DC converter board under various operating conditions and measured its efficiencies. To conclude, these switching regulator boards are well suited for low to medium current draw digital circuitry but for higher current applications a heat sink is needed and even so I would not recommend running it at the maximum 3A load especially if the input voltage is high.

Check out the video after the break.


DIY csCNC – 2 (Linistepper driver and testing with Bus Pirate)

via Dangerous Prototypes

diy-linistepper-4

Oakkar7 has a nice build log on his DIY csCNC, he writes:

Since I started building DIY CNC, I checked the free, opensource motor controller. There are several alternatives. I chose linisteppr controller.
– Simple and cheap (my first priority :) ) and I can source required parts locally
–  microstepping, open design (Especially, it’s PIC16F628A based. I’m PIC guy and a lot 16F628A in my stock)
Build log is fast, simple and straight. I used a simple perfboard for faster development.

After building the driver, I tested it with my buspirate using PWM function for generating stepping pulse. I started with 1kHz and increased to 4 kHz.

Project details at Oakkar7 blog.

Attend a Picademy@Google in Birmingham

via Raspberry Pi

This year we’ve seen an explosion of Raspberry Pi Certified Educators thanks to the number of free teacher training events called ‘Picademy’ that we’ve been able to facilitate. Aside from our own in-house training, there have been five regional Picademies, three of which have taken place in Google’s Digital Garage in Leeds. Thanks to the generosity of Google.org, we are able to offer even more continuing professional development opportunities to educators, this time in Birmingham!

digital-garage-birmingham

Picademy will be awesome at the new Google Digital Garage Birmingham!

Picademy@Google is for classroom teachers of any subject at primary, secondary or post-16 level. The courses and workshops in Leeds are run by renowned community member Les Pounder, who gives much of his time to helping adults and children create weird and wonderful projects. You may have seen some of his Picademy work on Twitter recently.

Picademy@Google Birmingham will be every bit as good! Highly regarded community member, Minecraft wizard, and creator of stuff about code Martin O’Hanlon will be leading teachers across a diamond block path to Raspberry Pi enlightenment. Here he is doing his best Steve impression:

IMG_5082

Martin was at the venue for the launch and said:

The opening of the Google Digital Garage at the Library of Birmingham was a great event attended by Eileen Naughton, MD of Google UK and Ireland, and Sajid Javid, Secretary of State for Business, Innovation and Skills.

The venue is incredible and it’s really exciting to be able to use this amazing space to bring Picademy to Birmingham – opening up the opportunity to teachers across the West Midlands to get the benefit of the Raspberry Pi Foundation’s free CPD course.

All our training events in Birmingham will take place at the latest Google Digital Garage inside Birmingham Library, and are completely free to attend. If you are interested in take part and becoming a Raspberry Pi Certified Educator, please complete this form. The following dates are available:

  • 27th – 28th August
  • 1st – 2nd October
  • 2nd – 3rd November
  • 7th – 8th December

The post Attend a Picademy@Google in Birmingham appeared first on Raspberry Pi.