Showing posts from 2014

C3Pi is innocent, Flora not so much, and more Shrrimps are on the way.

I took C3Pi to the Elephant and Castle Mini Maker Faire a few days ago, but had to leave early since he suddenly stopped working. At the time I blamed a loss of battery power, and thought that he'd wiped the file system on his SD card. Various holdups meant that I have only just been able to try to fix the problem which turns out to be rather simpler. C3Pi has two controllers on board: a Raspberry Pi model B+ does the thinking, and a Teensy 3.1 controls his motors. The Pi B+ uses a micro SD card but when I removed it the card was even more micro than usual: half the card had been broken off! I have no idea how this happened but poor old C3PI is off the hook. He's now back in action with a newly-flashed SD card and will soon be getting the first of a series of upgrades. I mentioned that I had only just been able to get around to investigating the problem. I spend several days after the Faire learning about wearable electronics. I'd been asked if I could help with a weara

Wearable electronics with Gemma and Flora

From Wembley to Southend Adafruit Gemma This evening I'm off to Createspace in Wembley to work on some wearable electronics. I'm helping with a wearable electronics workshop at this weekend's Southend Raspberry Jam , and I need to practice! I've been to several Raspberry Jams at Southend, and thoroughly enjoyed them. There's always a strong local presence as well as a group of regular visitors from further away. Great talks and workshops - whether you're an beginner at making things or an old hand, you'll find interesting and helpful people. Createspace Createspace is my nearest maker space. I've been to the London Hackspace, which is awesome, but it takes me a while to get there from home. Createspace has an impressive collection of facilities and is much easier for me to get to. They have open nights, and there's a regular meetup for electronic hackers. Gemma and Flora Tonight I'll be experimenting with Adafruit's Gemma and F

C3Pi - Fun and Frustration at the Elephant and Castle

C3Pi from above I went along this morning to the Elephant and Castle Mini Maker Faire to introduce C3Pi to some of my fellow makers. The event was extremely well organised and I had no problem finding my desk and setting up. Before long C3Pi was running through his paces - fairly limited at the moment, as he still has no sensors and is controlled by a very simple command line interface. That's about to change, thanks to Joe Walnes' brilliant websocketd - more details below. In spite of his limited repertoire C3Pi soon made new friends and performed admirably. It's always a little nerve-wracking when he runs on a desktop. He has been known to get over-excited and career off in unexpected directions, but this morning he behaved himself... Power problems ... until just before lunchtime, that is. I'm still not certain what happened, but I think C3Pi's batteries ran low. What I know is that the ssh session connecting my laptop to the Pi suddenly starte

Pegasus Autocode Revisited

Pegasus, courtesy Wikipedia Is this the longest-running debugging session of all time? Back in 1958 I wrote a little program in Pegasus Autocode. The Ferranti Pegasus was an early (and very successful) UK computer, and as an 11-year old I was lucky enough to borrow a manual and have my program run. The kind person who ran my program fixed a couple of problems for me, but I've never been quite sure what they were. Today I found out, and finally got to fix the program myself. PEGEM to the rescue I've known for a while about Chris Burton's wonderful PEGEM Pegasus Emulator. This is a DOS program which provides a pretty complete simulation of the Pegasus. You control the program via the switches on the operator's console. The drum is loaded with the Initial Orders (the Pegasus Operating System), and you can create your own five-track punched paper tapes which you use to program the computer and provide data. A missed excursion and a loose end tidied Yes

C3Pi: The Teensy and Motor Driver are talking

C3Pi Teensy 3.0 and Motor Driver At the end of the previous post I let myself get a bit carried away! C3Pi has always used a Solarbotics motor driver. In the past it's been controlled by an Arduino Pro Mini. While the software for the Teensy is very similar, I needed to make a couple of changes to the code and more significant changes to the pinout. Slow and steady So my rush to solder up some stripbaord was premature. I've breadboarded the circuit instead. I've now got the Teesny 3.0 controlling it, and the Teensy is controlled by serial input. Since I've already checked that the Pi can drive the Teensy's serial port, I'm ready to go. Tomorrow's plan Tomorrow I will prepare the stripboard, connect the motors and take C3PI for his first outing. Initially I will control C3Pi via ssh over wifi. Come back tomorrow to find out how the project is going. If you want to meet C3Pi in person, come along to this Saturday's Southend Raspberry J

C3PI: the Pi and Teensy are talking

The Pi and the Teensy are talking. The Teensy is running the fortune cookie sketch. I've been using pyserial on the Pi, and using interactive python. Here's a screenshot of an ssh session on the Pi: Next Step Next I'm going to solder up a mini-stripboard for the Teensy.

C3Pi - the Raspberry Pi meets Teensy 3.0

Teensy 3.0 Yesterday I started to set up the C3Pi's new brains - the Raspberry Pi model B+, with its lower power requirements, extra mounting holes and four USB ports. The USB ports are really useful; while I'm developing the new software, I need to connect a keyboards and mouse,  a wifi dongle and the Teensy 3.0 which will be used for motor control and other tasks. Teensies rule If you haven't come across the Teensies they are Arduino-compatible miniature boards developed by Paul Stoffregen . The early Teensies used ATmega chips, but the Teesny 3.0 and 3.1 use ARM processors. Paul has done an amazing job of extending the Arduino IDE and porting many of the libraries to work with the ARM chips. As a result the Teensy family are just as developer-friendly as the original Arduinos. The main attraction of the Teensy 3.0 is that it's faster, has more I/O, and much more RAM than the Arduino Pro. The fact that the Teensy runs at 3.3 volts is an added bonus, since i

C3Pi gets a wifi update

C3Pi B+ Pi, Quick2Wire board and downverter I'm busily working on C3Pi ready for his outing to the Raspberry Jam at Southend this Saturday. I'll be setting up my own mini-wifi network, but sometimes wifi doesn't work as it should. I need a way of configuring the Pi that doesn't rely on networking, just in case. When the Raspberry Pi model B+ first came out I built a  downverter - a cable which links the 40-pin header on the B+ to the old-style 26-way connectors. I linked it to a Quick2Wire interface board and plugged in an FTDI cable, which I connected to my laptop's serial port. Once I'd installed gkterm on the laptop I could log in to C3Pi using the serial console. So now I have a safety net! I don't think I'll need it, as I've also got the laptop, my phone and C3Pi chatting away happily on the private network, but it's good to know I've got options. I'm hoping to control C3Pi via a tablet or phone at the Jam, and for the

C3Pi gets a Raspberry Pi B+ and a face lift

C3Pi+ C3Pi , the tracked robot that I've been working on for several years , just got a new brain: a Raspberry Pi model B+. The old version used a Model B with an Arduino micro. This one will probably use a Teensy 3.0 as the Pi's companion. (Less) Power to the Raspberry Pi The main reason for upgrading the Pi is the reduced power consumption, but the extra mounting holes also appealed. I took the opportunity of replacing C3Pi's old stripboard top with a proper pololu board, and the result looks much neater. I've added the motor controller which also provides a regulated 5v supply. My next job is to make a small circuit board to hold the Teensy and provide connection points to the Pi and the controller. C3Pi at Southend - Saturday 12 August C3Pi will be making an appearance at Southend this Saturday. The Southend Raspberry Pi Jammers are holding a big summer meeting, and C3Pi will be one of the many attractions. Book your tickets here !

Shrimping It! and Arduino workshops

Workshops in London on September 13th I'm running two linked half-day workshops on 23th September in central London. The Shrimp The morning workshop  is called Making the Shrimp!  It's an extended version of the very successful session I ran at BCS SPA on 30th June. In it you'll learn how to make, test and program the Shrimp - a low-cost Arduino clone on a breadboard. Y ou get to keep the hardware ! The afternoon workshop  is called Life After Blink . It consists of five experiments using an Arduino or the Shrimp. If you decide to attend just the afternoon workshop you  will need to bring your own Arduino, or buy one  when you register for delivery on the day. The price below includes the experimenter's kit but not the Arduino. You'll need to bring your own laptop for both workshop - make sure it has an available USB port! Early bird prices are available until 16 August. If you book before that date you'll pay £37.50 for a hal

IoT Security (or lack of it) - why you should worry

The Internet of Things (IoT) is cool, and business has realised it's going to be big. But is it going to be secure enough? I'm normally a pretty laissez-faire sort of chap, but I am very concerned about the current attitude towards security on the Internet of Things. I posted recently on The Analogies project , and I'll be talking about this at an IoT meeting later this year. But this is a problem right now . Here's one example. I was recently approached by someone from an open-source IoT project to see if I'd like to get involved. I had a look on their website, and what they were doing looked great. Except... There was no mention of security . I asked, and got the reply that this was not a concern, as they assumed that the home network was secure . Don't assume the home network is secure Sadly many home networks are easily hackable. The recent excitement over OpenSSL means that most hobbyist web-servers using https have been vulnerable for a

Got a Raspberry PI B+ and need a downverter? Drop me a note.

If you want to use the Adafruit cobbler or  the Quick2Wire interface board with a Raspberry Pi model B+ you'll need a downverter. (That's a 40-way to 26-way adapter). Adafruit will be shipping their version 'soon', but if you're in the UK and can't wait, I've got enough connectors and cable to put together a few. For the next few days I will make one up and post it to you first class within the UK for £4.50 including postage and packing. (I'm not VAT registered so there is no VAT to pay). Drop me an email at .

Raspberry Pi Model B+ issue (and solution)

Raspberry Pi Model B+ I've hit a bit of a hardware compatibility problem with the new Raspberry Pi Model B+ When my new Raspberry Pi B+ arrived yesterday I started wondering about the software implications . I wanted to verify that the Quick2Wire, Adafruit and Raspi.GPIO libraries work as intended on the new boards, but instead I hit a problem with the new hardware layout . The new design has 40 GPIO pins, and the people at Pi Towers have arranged that the first 26 pins have the same function as they did before. But... Twenty-six onto forty won't go! I naively imagined that this would mean I could just plug in a 26-way connector onto the correct end of the 40-pin header. It doesn't work , at least with the cables I've tried. The female sockets are so wide that they won't sit down on the 40-way header. You'd have the same problem with the cables supplied with Adafruit's cobbler, as they use standard-width IDC connectors. And the PiFace won&

Raspberry Pi Model B+ version detection

First, the good news. Existing code that relies on my revision detector script will work with Raspberry Pi Model B+. I'd forgotten how hacky my version detection code was. It assumes that if a board isn't revision 1, it must be revision 2. Here's the contents of /proc/cpuinfo for the new boards >> So the current detector thinks that boards are rev 2, and existing code will work because the layout for the first 26 pins on the Raspberry Pi header has not changed. What the current code won't do is let you know that you've got an extra 14 pins to play with. Fixing this requires two sorts of change: one to the detector (which is easy) and one to whatever code is using it. I'll take a look later in the week at what work will be needed to get the Quick2Wire GPIO code to give access to the extra pins, but before that I will check that current I2C code works OK. That too will need a (trivial) change to work correctly with a version of the detector th

Raspberry Pi Model B+ first impressions

and a worry! Farnell element14 have just delivered my new Raspberry Pi Model B+, along with some 40-way connectors. The Pi is destined for C3Pi , my Pi+ Arduino tracked robot. The main benefits of the Raspberry Pi B+ for C3Pi are the extra USB sockets and the reduced power consumption. I can see all sorts of possibilities created by the 40-way extended GPIO header, but I don't expect to take advantage of those in C3Pi. Unboxing the Raspberry Pi model B+ Raspberry Pi Model B+ Here is the Pi model B+. It's familiar, yet subtly different from its predecessors. It has a neater look about it and the 2x20 rows of GPIO pins are clearly ready for some serious work. I have one big question, which I hope to answer shortly: what is the hardware revision of the new board? Will some Python libraries crash on the Model B+? The board revision matters more than you might think. Back in the days when I was running Quick2Wire I came up with a little Python script you cou

Great service from Tayda Electronics

Shrimping factory One great strength of the Open Source community is our willingness to share information. Whether it's a new technique, a new program or a new supplier, we're happy to tell others what we've discovered. Shrimping with Tayda Cefn Hoyle's Shrimping It! website offers excellent value for people who want to build the Shrimp low-cost Arduino clone. I got the supplies for the Spa Shrimping session from my usual UK suppliers, but it would have been cheaper to get them from Cefn. The Shrimping It! site also tells you about Tayda Electronics . That's the company from whom the Makers of Morecambe buy supplies. I decided to try Tayda and placed a small order a few days ago. Fast delivery The Tayda website is clean, fast-loading and easy to navigate. 28 pin ZIF Their prices are very competitive, but I was worried that my order would take a long while to arrive. Tayda are based in Bangkok and Colorado, and I live in the UK. I need not

The Intelligent Breadboard project gets under way

I've made a start on a project that I have had in mind for years - the Intelligent Breadboard, or TIB for short. TIB will look like a conventional breadboard, but its sockets will be connected to a set of port expanders. These in turn will be controlled by a microcontroller. You build your prototype on the breadboard in the usual way, and without applying power to your prototype, you'll instruct the microcontroller to check what is connected to what. If that matches what you expected, you'll apply power and check once again that the voltages are as expected. If you used Fritzing to design your breadboard layout, you'll be able to verify that the netlist from Fritzing matches the connections on the board. TIB will eliminate (or at least instantly detect) a lot of common breadboarding errors: missing connections, extra connections, wrong connections and loose connections. I expect it to speed up my prototyping significantly. Arduino + port expander The early

The Raspberry Pi meets MicroPython

One of the high spots of the Open Technology Workshop session at Cambridge was the chance to see and buy a MicroPython board (pyboard). I've shown it to a few people, and it's always enchanted them, but today I introduced it to its big brother, the Raspberry Pi . Connecting the Pi and the pyboard I connected them using one of Pimoroni's excellent SparkFun Cerberus USB Hub Cables . Py and piboard As soon as I powered up the pyboard its filesystem appeared on the Pi desktop. Next I  used screen to open a serial session running Python on the MicroPython board. The pyboard has an on-board filesystem, and can also use a micr0SD card, so you're not restricted to command-line programming. Python programs can access four LEDs, a button, the file system, some GPIO pins, the serial port, an I2C bus and SPI. Interactive Python on the pyboard In the screenshot below, I'm driving an interactive Python session on the pyboard from a screen window on the PI.

Arduino e-course is filling up fast!

There are just two places left on next week's course! After that, when you ask to enrol on the course you will be booked on the next free e-course which will start in late July/early August. SK Pang's component kit for the course The welcome email for next week's course will be going out tomorrow. It includes details of the components you need for the experiments in weeks three four and five. I've arranged for these to be available as a kit from SK Pang for just £9.90 + VAT and shipping. I'll post a link as soon as the kits are in the Shop. On the course you will learn how to use the serial port to communicate between your computer and the Arduino write a simple library that you and others can reuse in multiple projects control a family of LEDs to display ripple patterns and binary numbers communicate with the outside world by making sounds from inside your sketches respond to light levels using an LDR sensor

Shrimping feedback, please!

I'm planning on running some more Shrimping workshops later this year. We had a useful five minute retrospective after the Session at SPA, but I have a few extra questions I'd like to ask. If you attended the session and can give me five minutes of your time, the survey is here .

The Shrimping went swimmingly

SPA feedback Yesterday's evening session at BCS SPA went wonderfully well. The chart below shows feedback from the participants, with a scale that runs from Cr*p on the left hand side to Excellent on the right. One participant clearly felt let down, and I wish I knew what upset him. The the majority rated the session as excellent, and a couple wanted to give it 11/10 :) The participants were fantastic - lively, responsive and friendly. Just about everyone got their Arduino clones working; the one unresolved problem was almost certainly due to a hardware issue. I'm still glowing from one comment, which I found in my inbox this morning: ' I had so much fun this evening - it was like being a little child again!'. We used my new eBook  as the construction guide. If BT lets me access the Internet all day, (not a certainty, I fear)  I will make a few urgent corrections to the eBook later. If you've already bought a copy you will be notified by email when the

The Shrimping It! eBook is out - free for a few days.

I've just published the eBook I'll be using for today's session at SPA. It's called Build your own Arduino clone, and you can get it here . It's a complete set of instructions for building your own version of the Shrimp , as created by the Makers of Morecambe. For the next few days you can get the current version and all subsequent updates for free. You can pay more if you want to. In return, I hope you'll provide me with feedback - and a few tweets wouldn't do any harm. The minimum price will soon be going up to a massive $1.49, so don't wait. Get it today !

The homebrew ISP is burning bootloaders for Shrimps

Homebrew ZIF ISP This morning I finished off the homebrew In System Programmer (ISP) that I started yesterday. It's now happily burning bootloaders onto the chips I'll be handing out on Monday's SPA session . I'm relieved to find that the installed code includes a blink sketch. That means that the Shrimp-builders will see that their new creations are working as soon as they power them on. I need to prepare 20 chips for the session, plus a couple of spares just in case. At this rate I'll be done by teatime.

Programming Shrimps - the best laid plans...

I'm working on the preparations for my Monday evening Shrimping session at BCS SPA 2014 , and as always things are taking a little longer than planned. Phenoptix AVR ISP I got an AVR ISP shield from Phenoptix a while back and verified that it would program the chips I need for Monday. It has standard IC sockets, which means that you need to be a bit careful when removing the chips after you've burned the bootloader. If you don't do a straight pull you can bend the legs of the chip and the damage can make the chip unusable. I decided a few days ago that I'd use a Zero Insertion Force (ZIF) socket for the programming. These allow you to drop a chip in, close the gripper of the ZIF, program the chip and then release it. You can then remove the chip easily without any risk of damage. ZIF Socket It's a ZIF socket, Jim, but not as we know it I got a couple of sockets which were surprisingly hard to find in the UK. When they arrived I discovered that they

Slipping deadlines

I've a list of about five blog posts that I'd like to finish and publish, but they will have to wait a while. I need to get everything tidied away for next week's diversion at BCS SPA, and there's still quite a bit to do. So - apologies to everyone who demonstrated in the afternoon at the OpenLabTools day, and everyone I met at Southend's Raspberry Jam. I'd hoped to cover your events by now, but don't worry: your time will come :)

IoT Security Analogies wanted, please

Lunchtime at Covent Garden I've just got back from a delightful lunch near Covent Garden with an old friend, Ron Condon. Way back in the early 80s, I was running a software house and Ron was editor of a rising upstart newspaper called datalink . The industry hadn't yet been infested by PR roaches, and I was able to build up a great relationship with one of Ron's reporters. We gave datalink lots of good stories and they gave us lots of good press coverage. Many years have gone by. Ron and I have both retired, and we have both found things to do that keep us busier than ever. Ron now edits contributions to The Analogies Project, which finds and shares analogies that help non-specialists understand issues in IT security. I'm getting more and more worried about the in -security of the Internet of Things. My post-lunch homework is to come up with an analogy which can help the person in the street understand why IoT security matters so much, and why it cannot sa

3 Simple steps to test your new Arduino Clone:

is your brainchild going to work? You've built your latest (or maybe your first) Arduino clone. It might be breadboarded , on stripboard , or a PCB . You've visually checked the connections, over and over, and maybe done some quick continuity checks with a multimeter. Everything looks fine. But will it actually work? Follow these steps to check it out. Use blink - The Secret Sauce Here's my secret sauce for building testable clones: Use a chip that has both a bootloader and the standard blink sketch pre-loaded . Use a 5V LED for testing. Let's look at those in a bit more detail. Use a chip that has both a bootloader and the standard blink sketch pre-loaded When you test your clone with a pre-prepared chip, you're starting with a known good core component. If the blighter doesn't blink you know you've made a mistake in the wiring. For more detail on why this is a goo idea on courses, see here . A 5v LED is the tester's friend Many make

Shrimping It! - why start with a blink sketch on the chip?

Today I tweeted for advice about the best way to put a bootloader and a blink sketch on the chips I'll be using for the BCS SPA conference next week. (There's still time to book !) Shrimping It! One respondent asked how people could learn to program if the chips already had a blink sketch on them. That's a good question which deserves a full answer, hence this post. But first, some background. I'm semi-retired but over the years I've taught courses about aspects of IT to a lot of adults. I've learned a couple of things that have worked well for me and my students: I make sure everyone starts and finishes with a win , and  I introduce one new idea at a time This approach starts students off by giving them something that's easy to copy and is more or less guaranteed to work.  Then I guide students as they experiment with changes and enhancements until they have mastered all the skills they need. So for the Shrimping lab, students will d

Bill of Materials for Shrimping It!

The Shrimp Farm As you may know I am running a diversion on Shrimping It! at BCS SPA next week . People attending the diversion will be given the kits, and will get to keep the Shrimp they build. I'm writing build instructions in an e-book on LeanPub . I'll be publishing it Real Soon Now(tm), before it's finished, with an initial minimum price of £0. That means that you can get the e-book free and will get all subsequent updates without paying anything more. If you do, please provide feedback and let me know of any mistakes. SPA Shrimp Kit Once the book has been debugged I'll raise the minimum price to 99p, but early customers will still get updates free of charge. The book is detailed enough that I hope you can build your own Shrimp following the instructions. If you want to build a SPA-style Shrimp on you own, you can get just about everything you need from ShrimpingIt ! To my surprise and delight, buying from them will cost less than I paid for

Open Technology Workshop at Cambridge

Engineering Labs I spend a delightful and stimulating day last Friday at the Cambridge Open Technology Workshop. I was joined by a friend who runs a lab at UCL. I've been trying for a while to persuade him that his teams should build more of their lab equipment. He's always resisted this; the powers that be tell him that researchers should do research, rather than build equipment. Alexandre Kabla Alexandre Kabla's introduction gave a possible solution; why not get undergraduates to work on equipment as part of their project work? There was a splendid example of this approach on display in the afternoon. Morning talks In the morning we listened and learned from a series of 15-minute presentations. At the end of the morning sessions we heard lightning introductions to the afternoon's demonstrations. Alex Bradbury The first morning talk,  The Raspberry Pi as a building block for Creative Engineering , was delivered by Alex Bradbury. This was a great introduc

Teachers change lives

School Chapel I lunched in Westminster today with old friends. Three of us have known each other for more than 60 years; the fourth taught us Chemistry over 50 years ago. Another old friend had organised the meeting to celebrate and thank the teacher who inspired us, but sadly could not join us today. Of my three schoolmates two are now eminent scientists; the third switched from Chemistry after graduation and has reached the top of his chosen profession. So here's to all those who teach or have taught. You change lives, and you will always be remembered.

The LPC810 - an 8-pin DIP ARM processor

LPC810 If you're interested in Electronics you will know that ARM-based chips are found at the heart of many fantastic consumer products: mobile phones, tablets, and of course the Raspberry Pi. ARM technology has been hackable for a while. I first met the mbed a couple of years back. It's useful, and fun, but what I want now is an ARM board that I've designed and built myself. Sadly, my ageing eyes and fingers make SMD soldering a challenge. What I need is an ARM processor in DIP format. And here it is! nxp actually make two DIP ARM chips. This one is the LP810 - a 32-bit processor in an amazing DIP8 package. Adafruit have a super tutorial on how to breadboard and program it - just what I want. That promises to be fun, and opens up all sorts of possibilities: imagine stripboard-based projects with a 50MHz 32-bit processor at their heart. The LCP801 should keep me busy for a while, but I've just ordered its big brother, the LPC1114. That offers 50 MHz

Making the Shrimp - the eBook is on its way

I've been working hard on the notes for the Shrimping It workshop I'll be running as a diversion at BCS SPA next week. A Shrimp The diversion is running on Monday 30th at 19:15.  That's slightly later than the time I originally posted. The notes should be useful to anyone who wants a detailed guide to building a Shrimp, and I've decided to open source them under a CC Share-Alike Non-Commercial License. The notes are currently a work in progress, but I'll be editing and completing them on-line over the next few days. I will publish them as an eBook on LeanPub with a minimum price of £0.00. This means that you can 'buy' the book for free and get future updates as they become available. The eBook is not quite ready for publishing yet, but there's a sample available up on GitHub . When you click on the link you'll be offered a chance to view the whole file; that will download a copy of the pdf for you to view at your leisure. I'll remo

Low volume PCB FAB shops

I mentioned a few days ago that I'd started to use Fritzing for PCB layout as well as breadboarding, and promised to share my experience of PCB Fabrication Companies for Fritzed designs. Here we go. I needed three iterations for the lobstar board, and I got each one made by a different manufacturer. Three versions of the lobstar FritzingFAB I sent the first iteration (on the left in the picture) to FritzingFAB , the service organised by Fritzing. As you might hope, it's really easy to do from the Fritzing user interface. I was a little over-confident and decided to order two copies of the board. Fritzing charge a set-up fee, and they also charge for postage, so the cost per board is significantly lower if you order multiple boards. Two copies of the board cost £18.90 (including VAT and Postage), and my boards arrived 11 days after I placed the order. The board has black silkscreen on white solder-mask and the solder pads have a lead-free HASL finish. Ragworm I s