Tag Archives: Raspberry Pi

Superman freefalls from space

It’s a bird… It’s a plane… It’s Superman! While we may have seen record-breaking freefalls from daredevils Felix Baumgartner and most recently, Alan Eustace, none may compare to the latest project from a group of RS DesignSpark engineers which was brought to our attention during Electronica 2014.

53a02e03b9e84696aa3f357e0ab30621

Earlier this summer, Mattel launched an Extreme Toys Travel Campaign that took their action figures to exotic and extreme locations all around the globe. Inspired by the latest attempts of falling from the edge of space, the toy company asked RS if they would be able to replicate these jumps with one of its new Superman action figures.

RS teamed up with Rlab, a peer run community hackspace, card modeller Jude Pullen, and high altitude balloonist Dave Akerman, to send Superman to space and back in a custom-built capsule. After a couple of planning sessions, the team comprised of Makers, hackers and engineers went right to work. In early September, the group then got together for a long weekend at RLab to bring it all together and prepare for launch.

54589160dd4843ce8da90d8e0ab5c436journey

The team attached the specially-designed capsule to a weather balloon filled with hydrogen gas, which transported the toy Superman approximately 24 miles into the sky to the edge of space. Once the optimal altitude was achieved, Superman “jumped” from the capsule, safely falling back down to Earth’s surface. During the flight, mission data, HD video and pictures were captured, while both Superman and the capsule itself were tracked throughout the flight using a low power radio link and GPS.

Prior to launch, the group designed a chassis in RS Components’ DesignSpark mechanical tool to house the electronics, which was then 3D-printed using a SAM3X8E Cortex-M3 powered RepRap Pro Ormerod.

photo 1

The capsule featured a Raspberry Pi to capture mission data, as well as a customized Atmel ATxmega128A4U based tracking unit to locate and retrieve Superman. In total, the team had utilized five trackers located on the heroic Superman and his accompanying capsule. Not only did the trackers send GPS positions in real-time, but took and transmitted snapshots back down to the land-dwellers as well.

photo 2

Additionally, the RS DesignSpark innovators selected radio modules (were on the 433 mhz band) and receivers tuned to the frequencies of the trackers on Superman and his capsule. Once the Mattel toy jumped out using a “low-tech ejection mechanism,” the team hopped into their cars and continued to follow along with its signal.

5458917701304a3a8d925b8f0ab544b9jump

So did he make it? Yes, indeed! It took the embedded Superman just under an hour (50 minutes) to reach the ground — where it coincidentally landed at the end of Hope Lane. (For those who may not know, Superman’s “S” isn’t a letter, but rather the Kryptonian symbol for hope.)

Perhaps you have an extra action figure (or even a Barbie) lying around and interested in creating your own high-altitude tracker. If so, fly on over to RS DesignSpark’s step-by-step breakdown here.

Simplicity is key with the DUO Light

Maker Jack Eisenmann has developed a lightweight, single board computer that can connect to an SD card, a composite video monitor and a keyboard, and provide a low-level computer programming experience.

22c9bf68ac1d8db8abec6d4f7516effe_large

Eisenmann’s vision of the DUO Light was to serve as an alternative to the Atmel based Arduino Uno, as his design features an additional RAM chip. The DUO Light still utilizes an ATmega328 at its core, which connects to a variety of peripheral devices, including a composite video monitor and SD card, PS/2 keyboard, and general purpose I/O ports; however, unlike the Uno, the board sports a 64 KB serial SRAM, which is also attached to the ATmega328.

Combining the best of both worlds, the Arduino Uno-Raspberry Pi hybrid even costs less than each of the two boards. Eisenmann provides much of the coding for the DUO Light on his website and notes that, “Each DUO Light is preinstalled with an interpreter for DUO Light bytecode (DLBC), a proprietary binary language.” The DLBC programs are loaded from files on the SD card and executed in SRAM. DLBC features over 90 opcodes and a robust argument system.

8378d17e2c6fcac0e5cdeceacedc8f75_large-1

In his already successful Kickstarter campaign, Eisenmann states he created the DUO Light as a low cost platform for hobbyists to create fun and useful software. “The DUO Light is ideal for anyone who wants a low power computer with video output and keyboard input,” the Maker writes.

Eisenmann hopes that after achieving his Kickstarter goal, he will now be able to fund a large-scale shipment of his device to customers. For more information on DUO Light, check out the project’s official site here.

Resurrecting a Macintosh Plus from the dustbin

Stuart Cording, an Atmel aficionado over in Europe, tipped me off to this blog where a fellow got his old Mac Plus up and running. Jeff Keacher had the typical hardware problem, a power supply capacitor blew on him after a short while. What was amazing is he also got it to connect to the World Wide Web.

Mac-Plus_surfing-Internet

Jeff Keacher got this 27-year-old Macintosh computer up and running and then got it to browse the web.

My buddy Alan Martin over at honored competitor Texas Instruments has a saying “It’s always a cap”. With old radios and such it is the large can electrolytic that dry out. They stop filtering the wall voltage so you then hear a bad hum in the output. Eventually they “punch through” and blow up. For test equipment, Alan often comments on how great it was that Tektronix used all those “lemon drop” tantalum capacitors, since they all fail and make it easy to buy really good test equipment really cheap. Then you just replace all the tantalum and electrolytic capacitors. Like the old Macintosh, you can always find a suitable replacement at Digi-Key, or one of the other distributors. I have described how Eric Schlaepfer over at Google manages to put a new capacitor in the original can, so the gizmo still has that classic vintage took to it.

X-Y-capacitor-failure

This is the X-rated capacitor that failed in the Mac Plus.

The cap in the Mac was an X-cap, a film capacitor that is rated for long life and designed to be across line voltage, the 120AC in your house. It is a little disturbing that it failed, film caps don’t dry out like electrolytic. I know some of my pals use a Variac to slowly bring up the line voltage the first time they power up old equipment. I hear that doing that is less stressful to the capacitors and you can see things smoking at a lower voltage so you might not do as much damage.

Variac_General-Radio-Company_V10MT10-B13-N2

My analog aficionado pals bring up old equipment with a variac like this. That way you are applying voltage to the input capacitors with a slow ramp-up.

Now there was quite a hardware and software challenge to get the Mac Plus on the web. I think it was a bit of a cheat to use a Raspberry pi. Heck the pi will run Linux and has a video system. Why not just toss the Mac Plus in the garbage and connect a monitor the Raspberry pi? Well, sure, anybody can do that. So the author solved the hardware problem letting a Raspberry Pi be the middle-ware between the Mac and the Web. But there was still plenty of fun putting in a TCP/IP stack and a browser and all the other fun coding they had to do to get a web page to render. Bravo, now I think I will listen to that Merle Haggard song about Fords and Chevys lasting ten years like they should.

How to connect an Arduino to a real-time network in two steps

Arduino is a microcontroller and development environment that can be used, just like Raspberry Pi, to read information from its sensors and control other devices.

Programming on the Arduino is extremely simple, which has led to its widespread use in interactive environments. As with the Raspberry Pi, it’s a great (and low cost) starting point for experimenting with the world of embedded wearables and the Internet of Things.

This blog walks you through the steps to connect an Arduino to the PubNub Data Stream Network. This enables you to connect with a high volume of other devices at a global scale and start sending and receiving data between a wide variety of devices, including other Arduino and Raspberry Pi devices.

PubNub acts as your communication layer for signaling and data transfer between embedded devices. Some of the advantages of using the PubNub Data Stream Network over a custom, open source solution is reliability and speed. PubNub takes care of the backend infrastructure that you’d have to set up otherwise to create a signaling network between Arduino and other connected devices. You can find the Arduino PubNub extensions here. For additional resources, check out the PubNub Arduino documentation page. Arduino

Basics of Connecting the Arduino to The PubNub Data Stream Network

Really, all it takes is two steps to get your Arduino up and running. Follow these steps to get connected:

STEP 1: Connect the Arduino to a monitor, keyboard, mouse and ethernet cable. You’ll also have to sign up for a PubNub account to get your unique keys. PubNub is entirely free in the sandbox tier, which gives you more than enough bandwidth to test and play with your Arduino.

STEP 2: Open a new window and paste the following code.

#include 
#include 
#include "string.h"
#include "iotconnector.h"
 
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
 
char pubkey[] = "demo";char subkey[] = "demo";char channel[] = "iotchannel";char uuid[] = "Arduino";
 
iotbridge arduino;
 
void initialize(){
    Serial.begin(9600);
    Serial.println("Serial set up");
 
    while (!Ethernet.begin(mac)) {
        Serial.println("Ethernet setup error");
        delay(1000);
    }
    Serial.println("Ethernet set up");
}
 
void do_something(String value){
    Serial.println("in the callback");
    Serial.println(value);
   }
void setup()
{
    initialize();
    arduino.init( pubkey, subkey, uuid);
}
 
void loop()
{
    String returnmessage;
    Ethernet.maintain();

    //Publish
    arduino.send(channel,""Hey There"");
 
    //Subscribe
    returnmessage = arduino.connect(channel);

    //callback function of sorts, to work with the received message
    do_something(returnmessage);
    Serial.println();
}

The above code lets you set the following :

  • publish key using “pubkey”
  • subscribe key using “subkey”
  • UUID using “uuid”
  • channel you wish to subscribe and publish to using “channel”

For all of you who are familiar with Arduino, you will notice that this is in fact only a few additional lines of code in loop(). The remaining code sets up the Ethernet connection to the Arduino. The keys lines of code are just three lines:

  • arduino.init() that lets you initialize variables
  • arduino.send() that lets you send a message over the specified channel
  • arduino.connect() that lets you subscribe to a channel to receive messages

We create an instance of the iotbridge called “arduino” and we can use the SEND and CONNECT methods belonging to that class. SEND: This invokes the publish() API to send any message over a desired channel.

bool iotbridge::send(const char *channel, const char *message){
  EthernetClient *client;
  client = PubNub.publish(channel,message);
  return client;
}

CONNECT: This invokes the subscribe() API to listen for messages from other embedded devices connected to the same channel. NOTE: The call back function receive is invoked when subscribe runs. Connect() will block on subscribe, waiting for a message to be sent to the device. You can write your own simple task scheduler and bounce between tasks according to their timing requirements.

String iotbridge::connect(const char *channel){
  PubSubClient *pclient = PubNub.subscribe(channel);

You can customize the channels you publish/subscribe to, the UUID you assume and also the messages you send by just changing the above fields. And that’s it! You can now talk Arduino to any other device or application subscribing/publishing to the same channel.

Arduino Uno vs BeagleBone vs Raspberry Pi

Left to right: Arduino Uno, BeagleBone, Raspberry Pi

Left to right: Arduino Uno, BeagleBone, Raspberry Pi

We like to build stuff here at Digital Diner. There is always some sort of project going on. These days, most of our projects include some sort of digital component – a microprocessor. If you haven’t gotten bitten by the Maker bug yet, we strongly encourage it. It can be incredibly rewarding. If you have even a minimal understanding of programming, there are websites, platforms and tools to help you develop your skills to the point where you actually create a hardware device with buttons, knobs and servos – a real physical world gadget. Software is fun, but when you can make your project physical it is even better.

There are so many great platforms for creating digitally enabled devices that its gotten hard to figure out which one to use. For example, we are currently building a hydroponic garden project and had to choose a controller to run the pumps, read the sensors etc. We were surprised at the number of choices that were available to us. It can be a little confusing for the beginner. To help, we’ve taken three of the popular models and compared them so that you can choose the right tool for your next project. Spoiler: we recommend all three.

The three models (all of which we use here at Digital Diner) are the Arduino, Raspberry Pi and BeagleBone. We chose these three because they are all readily available, affordable, about the same size (just larger than 2″ x 3″) and can all be used for creating wonderful digital gadgets. Before we get to the comparison, here is a brief introduction to each one.

Arduino with Atmel

Arduino with Atmel

The Arduino Uno is a staple for the maker community.  Arduinos come in various sizes and flavors, but we chose the Arduino Uno as an example of the prototypical Arduino.  It has an easy to use development environment, an avid user base and is designed to be easy to interface all sorts of hardware to.

Rasberry-Pi

Rasberry-Pi

The Raspberry Pi is the newcomer to the game.  It isn’t really an embedded computer.  It is actually a very inexpensive full-on desktop computer.  It is barebones, but at $35 for a real computer, its worthy of note, and it is a great platform for lots of Maker projects.

BeagleBone

BeagleBone

The BeagleBone is the perhaps the least known of these platforms, but an incredibly capable board worthy of consideration for many projects.  It is a powerful Linux computer that fits inside an Altoid’s mint container.

underside of Rasberry-Pi

underside of Rasberry-Pi

Raspberry Pi

The underside of the Raspberry Pi.

All three boards features that make them valuable to the hobbyist.  Below is a chart I put together outlining the features of the three for comparison.  If you aren’t familiar with what all these mean, that is fine.  However, there are a few differences that make each of these gadgets shine in their own types of applications.

Comparing the Three Platforms

Comparing the Three Platforms

Comparing the three platforms.

First, the Arduino and Raspberry Pi and very inexpensive at under $40. The BeagleBone comes in at nearly the cost of three Arduino Unos. Also worthy of note is that the clock speed on the Arduino is about 40 times slower than the other two and it has 128,000 (!) times less RAM. Already, you can see the differences starting to come out. The Arduino and Raspberry Pi are inexpensive and the Raspberry Pi and BeagleBone are much more powerful. Seems like the Raspberry Pi is looking really good at this point, however, it’s never that simple. First, its price isn’t quite as good as it seems because to run the Raspberry Pi you need to supply your own SD Card which will run you another $5-10 in cost.

Also, despite the clock speed similarities, in our tests the BeagleBone ran about twice as fast as the Raspberry Pi. And perhaps most counterintuitive, the Arduino was right in the mix as far as performance goes as well, at least for a beginner. The reason for this is that the Raspberry Pi and BeagleBone both run the Linux operating system. This fancy software makes these systems into tiny computers which are capable of running multiple programs at the same time and being programmed in many different languages. The Arduino is very simple in design. It can run one program at a time and it programmed in low level C++.

An interesting feature of the BeagleBone and the Raspberry Pi is that they run off of a flash memory card (SD Card in the case of Raspberry Pi and MicroSD Card in the case of BeagleBone). What this means is that you can give these boards a brain transplant just by swapping the memory card. You can have multiple configurations and setups on different cards and when you swap cards, you’ll be right where you left off with that particular project. Since both of these boards are fairly sophisticated, it even means that you can easily change operating systems just by creating different cards to swap in.

Choosing a Platform

So why would you choose one platform over the other?

For the beginner, we recommend the Arduino. It has the largest community of users, the most tutorials and sample projects and is simplest to interface to external hardware. There are more ways to learn about Arduino for beginners than you can shake a soldering iron at.

The boards are designed to easily interface with a wide variety of sensors and effectors without and external circuitry, so you don’t need to know much about electronics at all to get started. If you haven’t played with these before, get one (they’re inexpensive) and try it. It can be a really great experience.

Raspberry Pi

A credit-card sized computer that plugs right into your TV. It has many of the capabilities of a traditional PC and can be used for word-processing, spreadsheet, and games.

Rasberry-Pi-Atmel

Raspberry Pi
A credit-card sized computer that plugs right into your TV. It has many of the capabilities of a traditional PC and can be used for word-processing, spreadsheet, and games.

BeagleBone  It's the low cost, high-expansion hardware-hacker focused BeagleBoard for people that love embedded Linux systems. Basically a bare bones BeagleBoard, it can run all by itself or act as a USB or Ethernet connected expansion for your current BeagleBoard or BeagleBoard-xM

BeagleBone
It’s the low cost, high-expansion hardware-hacker focused BeagleBoard for people that love embedded Linux systems. Basically a bare bones BeagleBoard, it can run all by itself or act as a USB or Ethernet connected expansion for your current BeagleBoard or BeagleBoard-xM

Arduino Uno  An amazing tool for physical computing — it's an open source microcontroller board, plus a free software development environment.

Arduino Uno
An amazing tool for physical computing — it’s an open source microcontroller board, plus a free software development environment.

For applications minimizing size we recommend the Arduino. All three devices are similar in size, although the Raspberry Pi SD Memory card sticks out a bit making it slightly larger overall.  There are so many different flavors of Arduinos it is ridiculous.  Basically, what makes an Arduino an Arduino is a particular microprocessor and a little bit of software.  It uses a very small, inexpensive, embedded system on a chip microprocessor from a company named Atmel.  For advanced projects that need to be really small, you can buy these chips for a dollar or two and put the Arduino bootloader (a program that makes the Arduino give the Arduino its basic functions) on the chip and viola, you have an Arduino.  We have done this for a few projects and it can make for a very tiny little gadget when you don’t even have a circuit board.

A variety of different Arduino sizes and form factors

A variety of different Arduino sizes and form factors

The BeagleBone beside its big brother the BeagleBoard

The BeagleBone beside its big brother the BeagleBoard

The BeagleBoard has a larger and more powerful big brother, the BeagleBoard, so if you may need to scale up, the BeagleBone is a good choice.

The Arduino Uno, BeagleBone and Raspberry Pi Note the Ethernet ports on the BeagleBone and Raspberry Pi

The Arduino Uno, BeagleBone and Raspberry Pi
Note the Ethernet ports on the BeagleBone and Raspberry Pi

For applications that connect to the internet we recommend the BeagleBone or Raspberry Pi. Both these devices are real linux computers. They both include Ethernet interfaces and USB, so you can connect them to the network relatively painlessly. Via USB, you can connect them to wireless modules that let then connect to the internet without wires. Also, the Linux operating system has many components built-in that provide rather advanced networking capabilities.

A very small USB WiFi adapter plugs right in to the BeagleBone or Raspberry Pi, and the Linux operating system can support these types of devices

A very small USB WiFi adapter plugs right in to the BeagleBone or Raspberry Pi, and the Linux operating system can support these types of devices

The Arduino supports plug-in peripherals called “shields” that include the ability to connect to Ethernet, but the access to the networking functions is fairly limited. Plus by the time you buy the Ethernet shield you might as well just get one of the more advanced boards.

For applications that interface to external sensors we recommend the Arduino and the BeagleBone. The Arduino makes it the easiest of any of the boards to interface to external sensors. There are different versions of the board that operate at different voltages (3.3v vs 5v) to make it easier to connect to external devices. The BeagleBone only operates with 3.3v devices and will require a resistor or other external circuitry to interface to some devices. Both the Arduino and BeagleBone have analog to digital interfaces that let you easily connect components that output varying voltages. The BeagleBone has slightly higher resolution analog to digital converters which can be useful for more demanding applications.

With that said, it is important note that many things that you would want to connect to, including little sensors, have digital interfaces called I2C or SPI. All three boards support these types of devices and can talk to them fairly easily.

For battery powered applications, we recommend the Arduino.  The Arduino uses the least power of the bunch, although, in terms of computer power per watt, the BeagleBone is the clear winner.  However, the Arduino has an edge here since it can work with a wide range of input voltages.  This allows it to run from a variety of different types of batteries and keep working as the battery loses juice. The Arduino uses the least power of the bunch, although, in terms of computer power per watt, the BeagleBone is the clear winner.  However, the Arduino has an edge here since it can work with a wide range of input voltages.  This allows it to run from a variety of different types of batteries and keep working as the battery loses juice.

For applications that use a graphical user interface, we recommend the Raspberry Pi.  The Raspberry Pi is really in a category by itself because it has an HDMI output.   That means you can plug in a mouse and keyboard and connect it directly to your TV.  At that point you have a fully functional computer with graphical user interface.  This makes the Raspberry Pi ideal for use as a low cost web browsing device of for creating kiosk-type projects where you may have a display that people interact with.  In fact, just for fun, we installed the Arduino development tools on the Raspberry Pi and we were able to write a small program and download it to an Arduino from the Raspberry Pi.  It’s not a very fast computer, but it really is a computer.

Summary

The Arduino is a flexible platform with great ability to interface to most anything. It is a great platform to learn first and perfect for many smaller projects. The Raspberry Pi is good for projects that require a display or network connectivity. It has incredible price/performance capabilities.

The BeagleBone is a great combination of some of the interfacing flexibility of the Arduino with the fast processor and full Linux environment of the Raspberry Pi (more so in fact). So, for example, to monitor our hydroponic garden, we will likely use the BeagleBone since it has good input/output features and can easily connect to the network, so we can have it run a web server to make its readings available to us.

All three of these are staples of our projects here at Digital Diner. Of course, there are other platforms out there, for example, we monitor our tomato garden using Sun SPOTs, but these three will cover most people’s needs until you get fairly advanced.

Thanks to Make and Roger Meike for allowing us to repost his comparison article here on the Atmel site. Regarding original source, the Monday Jolt is a new column about microcontrollers and electronics that appears in MAKE every Monday morning. This post was written by Roger Meike and appeared on the Digital Diner on October 24, 2012. It is reposted here on the MAKE site with permission.  

Smartphones Powering the Internet of Things

Good piece today from Peter Yared, CTO of CBS Interactive, in Venture Beat. Yared’s key point is that smartphones are controlling a greater amount of devices inside–and outside–of the home. He writes, “It is likely that every room of a home will have a 4” or 7” smart device mounted as a control panel for lights, music, and more. Soon, “flipping a light switch” will sound as archaic as “dialing a telephone”.”

Part of what’s making this possible, says Yared, is the underlying technology. From embedded controllers–and we’d count Atmel maXTouch touchscreen controllers in this mix–to easy-to-use, low-cost platforms like Arduino, based on Atmel megaAVR microcontrollers, and Raspberry Pi, these technologies are making it easier and faster to create feature-rich smartphones as well as other touch-based and web-enabled devices. With these robust technologies and a lot of engineering ingenuity, consumers can now bring into their homes unique, smartphone-controlled products, from door locks to home theater systems. The same transformation is happening with today’s vehicles, where manufacturers now have the technology to bring the smartphone experience to drivers.

And this is why so many are calling this the era of The Internet of Things. Before long, according to The Internet of Things proponents, web-enabled devices and products will outnumber people on our planet. More and more of these “machines” will be able to take in data, apply smart analytics and algorithms, and take action, without our intervention.

Have you brought the smartphone experience into your car or home? What types of web-enabled products are most prominent in your life today?