Pages

Thursday, 22 March 2012

Meet the Raspberry Pi fanciers at Quick2Wire

We've finally started updating the website over at Quick2Wire, and you'll find brief biographies of the team on the About Us page.

We've also picked up some new newsletter subscribers thanks to today's interview on the DesignSpark website.

Excellent coverage: we're working hard on our add-on kits for the Raspberry Pi, and DesignSpark is the community website for RS Components, one of the two companies who are selling the Pi.




Wednesday, 21 March 2012

Value USB to TTL cables from Tronisoft

Followers will know that I have a boxful of hand-built Arduino clones, some of which will soon be finding good homes with my colleagues at quick2wire.

The only snag is that the clones don't have on-board FTDI chips, so you need a USB to TTL converter - a cable or a breakout board.

The cables typically cost around £15, so I was delighted to find a version at around £9 including VAT from Tronisoft Limited. I ordered three which arrived today; the one I've tried works fine.

The only thing to watch out for is that the 6-way cable (which resembles the ones I'm used to) is out of stock, so I had to order cables with a 7-way connector. The seventh socket is connected to a shield, and it looks as if it can be left unconnected.

Do your own evaluation before you buy, but it seems like a bargain to me.

Monday, 19 March 2012

Arduino and EasyDriver turning a Stepper Motor

One of the great things about Arduino is that whatever you're trying to do, there is a good chance that someone has done it before and posed the code.

Mark Gilbey and I are currently working on my poor man's pick and place 'bot. We'll be moving the head around using some SparkFun steppers, and I liked the look of the EasyDriver Stepper Controller.

The EasyDriver website has an examples page which includes a wiring diagram and sample Arduino sketches. I tried it out and everything just worked.

The motor is turning in micro-steps of 1/800th of a revolution, at a speed of 5000 micro-steps per second.


Sunday, 18 March 2012

Pachube workshop Video - Arduinos at work

I shot a short video at last week's Pachube workshop. We learned how to use Arduino Ethernet boards and shields to provide real-time data to Pachube's free on-line service.

Thoroughly recommended.

Friday, 16 March 2012

Pachube, Arduino and the Internet of Things

If you're interested ion the Internet of Things you probably know about Pachube. They offer a free real-time data infrastructure that makes it easy for users to share data from just about any internet-enabled device.

Through the Pachube website you can monitor the temperature in Iceland, the humidity in London or the radiation in Japan. You can even set up triggers so that you get an SMS alert whenever a value exceeds a specified threshold.

Pachube are currently organising a series of  Data Making Workshops to help people get started with their service. I've just got back from one; it was great fun and really informative. About a dozen of us worked our way through Pachube's API, and then set up data  feeds from our ethernet-enabled Arduinos. (If you're curious about the light level in my study at home, you're welcome to take a look.)

It was a great practical introduction, and gave us lots of ideas for future projects.

Pachube will be organising more introductory and advanced workshops in London, Barcelona and New York. Details on their website. If you're based in London, you can enrol via this meetup.

The current API is great but there are some interesting beta interfaces available to the brave and curious. There's a web-socket implementation as well as an mqtt bridge. Because they are betas, both services are subject the the usual caveats: the API might change dramatically, and the service might be withdrawn. That said, these are services that are likely to be of long-term significance, and it's great to have a chance to try them out.

And now I'm off to write a Python wrapper for their API; it should be useful for the Beaglebone, Beagleboard and Raspberry Pi.

Practical Robotics - Python, Arduino, OpenCV and Squirrels

Who says that  this stuff has no practical use? Here's how to deal with those pesky squirrels.




Thursday, 15 March 2012

Arduino Ethernet board and IoT

I recently posted about tomorrow's to a data making workshop at Patchube London. I've been checking out the hardware and making sure that I can program it with my laptop and an FTDI cable.

The Arduino ethernet example sketches include a Web Server which displays the values of the Arduino's analog ports.

I rigged up a breadboard with a potentiometer and connected it to the Arduino Ethernet board.

Then I downloaded the sketch, and hey presto: here's a a web page displaying the pot setting.

With 6 years of history and 600,000 users, Arduino and its documentation have been tested and re-tested. Arduino examples just work. Relative newcomers like the Beaglebone are catching up, but the Arduino has set a high standard to aim for.

Wednesday, 14 March 2012

oomlout to the rescue!

On Friday I'm off to a  data making workshop at Patchube organised by the London Internet of Things meetup.

Late yesterday I spotted that I will need an Arduino Ethernet board, or an Arduino with an Ethernet shield. I have Arduinos like some people have mice, but no Ethernet Shield, and I'm away from home for the next couple of days. How could I get one in time?

I ordered a board from .:oomlout:. and it arrived this morning. Thanks, guys, for your usual lightning-fast service.

I love the new Arduino packaging.



A lesson from the mbed

Yesterday in a short post about I2C  I published a fragment of code for the mbed.

I wondered at the time why I was posting here rather than on the very helpful mbed site.

Here's why.

Take a look at the code, and think about the library it's using.

The mbed I2C library is about as simple as you could wish for, but it does everything you need. You can even specify the I2C data rate at run time.

On other platforms that small change is a big deal; Arduino requires you to recompile the Wire library, and the BeagleBone requires you to recompile  the kernel.

The mbed library for SPI is just as good as its I2C library: simple, intuitive and complete.

That's what we need on the BeagleBone and Raspberry Pi.

We've been waiting for userland SPI support on the BeagleBone for a while, and we seem to be getting a mixed message from the kernel developers:

  1. It's really hard to do SPI right, and it will take a while
  2. It's done already; all you have to do is find half-a-dozen emails scattered round various user groups, merge the information, patch the correct kernel version, recompile the kernel, flash a card, and repeat whenever there's a kernel update :(
That's not what we want. We want userland configuration that's as easy as it is on the mbed, and we need clever people to do it and push their work upstream.

There is some hope. Yesterday,  @waxpraxis tweeted that he'd added userland SPI to a custom kernel for the Beaglebone, and he plans to write up and release his patch. Now we just need that (and I2C support) for the Raspberry Pi!

And a Pi to run it on, of course.


Update: @waxpraxis has posted/uploaded his BeagleBone SPI-enabled image, and is working on the documentation. Thanks!




Tuesday, 13 March 2012

PCF8574, I2C and the mbed

A user on the mbed site asked for some help getting an I2C application to work with the mbed.

He's using a PCF8574 port expander which is driven from one of the mbed's I2C busses, which is on pins p9 and p10.

He wants to turn a LED on when a button is pushed. The button is connected to P4 on the port expander; the LED is attached to pin 5.

Here's the breadboarded circuit under manual test :)


And here's the code:


#include "mbed.h"
#include "PCF8574.h"



PCF8574 io(p9,p10,0x40);


int main() {
    while(1) {
        io.write(0x30);
        if ((io.read() & 0x20) == 0) {
            io.write(0x20);
        }
    }
}

Wednesday, 7 March 2012

BeagleBone driving LED Bar via I2C

I've just posted a video of the BeagleBone driving a bar LED via I2C. The Bone is programmed in Python, and I'll shortly be checking the (open source) code in at Quick2Wire's github repository.


Expect to see a Raspberry Pi performing the same trick as soon as we can get our hands on one!

I hit a couple of snags while getting this going. Fortunately the inexpensive OpenWorkbench Logic Sniffer makes it really easy to debug I2C and SPI applications.

I2C debugging with OLS: SCL is blue, SDA is green




Friday, 2 March 2012

Pick and Place on a budget - Part 2

More progress on our human-controlled Pick and Place machine.

I now have the threaded rod and stepper motors, and Mark Gilbey is coming here next week to discuss the mechanical design.

We plan to build a manually-controlled Pick and Place machine with 4 degrees of freedom, (X, Y, Z and rotation) which will vacuum up an SMT part, move it to the right position on the board, align it and then place it on the board. We'll use a joystick and pot to control it, while we watch what is going on through a USB microscope.

The USB microscope works with OpenCV, so we can leave the door open to an automated PnP robot. I  wonder what we should use as the processor board?

Thursday, 1 March 2012

A second helping of Raspberry Pi

If you want one of the next batch you can pre-order Raspberry PI at Farnell.

Orders are still limited to one per person at the moment; if you order more than one, the order will be amended.