Pages

Friday, 30 April 2010

Why are CAD tools so hard to use?

Years ago, when IBM was introducing thousands of its employees to the brave new world of object-oriented software, I found myself co-teaching an OO Analysis and Design course to a group of IBMers.

My co-instructor and I were both independent contractors, but we were supported by an old friend who worked for IBM.

After a particularly frustrating practical one of the students asked "Why are we using Rational Rose to draw our designs? It sucks."

The IBMer replied: "All modelling tools suck. It's just that Rose sucks less."

I've just had a similar experience trying to get started with Schematic Editors. I wanted to draw a schematic for the Veroduino - the low-cost, compact Arduino clone that I built a few days ago.

I'd read that TinyCAD was very intuitive. I got going fairly quickly, but could not find a library with all the parts that I wanted. I tried to add a new library of my own; that process turned out to be so intuitive (not) that it crashed the software.

I took a look at Kicad, but a fair bit of work is required to install under Ubuntu, and the software seems to be the work of a single developer.

Eagle was the next port of call. Eagle has become a de facto standard in hobbyist electronics; lots of open-source hardware designs are available in Eagle format, lots of PCB fab shops accept Eagle files, and there is a free version available for non-commercial use. My friend Geoff Drake has had good results with it.

I know I'm going to have to grips with Eagle at some stage, and I've signed up for an Introduction to Eagle for Advanced Arduino Users run by Tinker London next month. I thought I'd have a dry run, so I tried following SparkFun's Eagle Schematics Tutorial on my own.

I worked through the tutorial without problems, but then tried to create my Veroduino Schematic. After an hour I gave up. There were just too many surprises.

Either I am doing things wrong, or the software is very counter-intuitive. I suspect that all Schematic software sucks, but that Eagle sucks less. I hope the course gets me going, but meanwhile I have a dilemma: how can I produce reasonable schematics for the boards I am working on right now?

I've ended up writing a little DSL in Python for producing schematics. It's been fun, and the results look great. I've nearly finished the Veroduino schematic; your should finally get to see it tomorrow

Monday, 26 April 2010

Arduino on a budget - part 5


Introducing the Veroduino


The Veroduino is inspired by the Paperduino, Adafruit's Boarduino and Oomlout's Breadboard Arduino Compatible Kit. I built it on a length of Vero's 01-0171 stripboard. It's a narrow board with a central gap in the conductive strips. It's perfect for DIL components. I used Oomlout's Arduino Compatible Component Bundle and a set of stackable headers.

The Veroduino Mk 1 has room for a 5v regulated power supply but for now I am using the FTDI USB TTL serial cable from Oomlout to program the board and to provide power. Veroduino Mk 1 almost fits on the stripboard but the Crystal overhangs the edge by about a millimeter. Mk2 will use a ceramic resonator and should be both cheaper and smaller.

The cost of the Veroduino is under £15 inc VAT. You will also need a serial cable (£15.50 inc VAT). Oneof these can be used to program as many Veroduino boards as you want. You can develop and download software to the Veroduino using the Arduino development environment.

Over the next couple of days I will write up the design and publish details here.

Back in business

It took a couple of days to sort out the hardware problems that hit me last week.

It seems that the CPU in my workstation has fried itself. I think I know why, and I'm hoping that a new CPU will fix the problem.

At one point it looked as if two servers had also failed, but it turned out to be a problem with my aged UPS. I had to do a bit of re-cabling but both servers are ok.

I removed the hard drive from the workstation and mounted it in one of the servers. All the data was there, which was a relief. The drive was reasonably well backed up but I would have lost a day's work - annoying rather than catastrophic. As it is I've lost nothing.

I am using my Toshiba laptop as a temporary replacement. Its major disadvantages are that it's a Windows 7 machine and has no parallel port.

I got back to Arduino development on Thursday; on Friday the USB to TTL cable arrived from Oomlout, and I now have my Veroduino working. I'll write about that soon. Meanwhile, I'd like to give due credit to the UK suppliers I've been using for components.

Bitsbox supply a good range of useful components, and provide a fast mail-order service. They charge a flat rate of £1.50 for postage and packing within the UK, which is great value. I've placed several orders with them; everything has turned up in the next day's post.

.:Oomlout:. (link to UK company) specialise in Arduino and Arduino-related bits. Their excellent ARDX starter kit is a great way to learn about Arduino fast.

Oomlout are committed to open source; all their board layouts, manuals, guides and programs are downloadable and published under a creative commons license.

I've only dealt with the UK subsidiary. Oomlout's parent company is based in Vancouver and supplies the North American market. Oomlout offer great technology, good value and fast service. My Veroduino is based on their Arduino-compatible component bundle.

I still use my local Maplin shop for common components that I need right away. Maplin also offer a mail-order service, but their postage and packing charges are quite high. If I need to order specialised components I normally buy from Farnell who offer keen prices and a very broad product range. Farnell now own CADSoft, developers of the widely-used Eagle PCB layout package.

Tuesday, 20 April 2010

Arduino on a budget - part 4

Normal service will be resumed as soon as possible!

Yesterday my worksation died, and one of my servers failed. I'm currently a bit preoccupied, trying to find the root causes of the failures and restoring data busily.

I hope to be able to get back to some Arduino work later today.

Sunday, 18 April 2010

Arduino on a budget - part 3


The best-made plans...

I'd hoped to build version two of Veroduino (my Arduino clone on a strip-board), using a narrower piece of strip-board than my first attempt. Alas, the new version was too narrow; if you use a crystal for the controller's oscillator you need to connect it to a couple of capacitors, and I couldn't find a workable layout in the limited space available.

I decided to use a SimmStick. SimmSticks have fallen out of fashion as the USB has taken over, but they still work well and I had a suitable board from Dontronics.

The SimmStick can take a 28 or 40-pin Atmel AVR micro-controller; it took an hour or so to polulate the board and check it out. I already had a motherboard which provides power and RS232 comms if required. I modified the motherboard by adding a 30-pin PCB header. That gave me access to all the lines of the SimmBus; these include the SDA and SCL signals needed for I2C, as well as Ground and the 5v supply needed by my I2C boards.

I now have a non-Arduino compatible board, using legacy technology, but it's good enough for me to carry on testing my I2C peripherals until my Arduino Component Kit arrives from Oomlout.

I can use the avr gcc toolchain to compile my test code, an avrisp programmer to connect it to my workstation's parallel port, and the open source avrdude program to upload my software to the board and verify it.

The board already drives my LED test board; tomorrow I plan to write code to drive my I2C LCD.

Saturday, 17 April 2010

Arduino on a budget - part 2

I've made good progress with Veroduino - the Arduino clone I'm building on Veroboard™*.

I like to build up complex circuits from pluggable components. They are easier to test, easier to replace, and can often be used in more than one project.

I started by building a pluggable power supply on a small piece of strip-board; it contains a 5v regulator, and includes a bridge rectifier to provide polarity protection.

Next I started on the board that carries the micro-controller. I abandoned my first prototype; the strip-board turned out to be too wide, covering the breadboard pads that connect to the pins of the micro-controller. I didn't feel too bad about that; the reason that I prototype is to discover design flaws early.

I also verified that my mechanical design plugged into the board correctly. It's tempting to use PCB header pins, but they don't play well with this design. They work really well with a two-sided PCB, because the header can be soldered from the top. I don't know any way to do that reliably with strip-board. Luckily Vero make push-through pins for their strip-board, and the two-ended pins work perfectly.

For the final version I'm going to buy an Arduino-compatible component bundle from .:Oomlout:. along with a set of long-pin headers. At £9 that's affordable, and does not cost much more than the micro-controller on its own.

Today is Saturday, so the package will probably arrive on Tuesday. Meanwhile I'll work on version two of the prototype, making do with a Mega8 chip. That will be fine for driving my I2C-based test equipment.

*Veroboard is a trademarked name for a brand of strip-board that is widely used in the UK.

Friday, 16 April 2010

Arduino on a budget - part 1

Readers will know that I'm a fan of the Arduino, as is my daughter Alex. We currently share an Arduino board. I'm in the middle of a lengthy project, and I don't want to delay her access to the board.

The obvious solution is to get a second Arduino. An Arduino Duemilanove board costs about £25 in the UK , and I'd prefer not to spend that much.

Luckily the Arduino is open source, so lots of companies have developed their own versions.

One popular alternative is the Boarduino from Adafruit, shown above. It's an Arduino clone with a much smaller footprint. You can't use standard Arduino Shields, but you can plug it into a breadboard - hence the name.

If you're based in the UK .:Oomlout:. currently offer the Boarduino for £13.50. I'd willingly spend that much, but a quick web search turned up two even cheaper possibilities; the Paperduino and the Stripboard Arduino.

The Paperduino is a cool idea, but I'm looking for something a bit more robust, and the ability to plug an Arduino clone into a breadboard is attractive. I thought I had all the components for the Stripboard Arduino already, so I started building. It turns out that I have plenty of Atmel™ Mega8s, 16s, and 32s, but not a single 328 - not even a 168.

So I am modifying the design slightly to use an Atmel Mega8; I'll also add a bridge rectifier for polarity protection. It's all too easy to use the wrong polarity wall wart; without some form of protection you can easily destroy the Atmel micro-controller that forms the heart of the Arduino.

Introduction to Electronics for Hobbyists

I just came across an excellent intro to Electronics. It's a great starting point for beginners in Electronics and a useful reference for veterans.

The sections give a good overview of commonly used components. The page on resistors includes a very nice guide to colour codes.

There are several pages on construction, including a soldering guide. It's generally good, though the reference to lead-based solder is a little outdated.

The kits are commercially available from RSH Electronics. If the kits are as good as the website, they are worth a look!

(Image from Wikimedia creative commons)

Thursday, 15 April 2010

Basics of I2C™


The I2C bus allows you to connect several peripherals to one or more master controllers.

In this diagram the controller is an Arduino; it is connected to a port extender and an LCD display.

One commonly used port extender can drive up to 8 i/o lines; you might use four lines to control LEDs, and four lines to read push-buttons. It's a simple IC chip which costs about £1. All you do is connect it to ground, to a 5 volt power source and to the two data lines that form the I2C bus. The Arduino has a Wire library which allows you to turn the output lines on or off, and to read the state of the input lines.

A commercial I2C LCD display is a bit more expensive (about £30). I built my own using a cheap serial LCD module (about £7) wired up to a port extender. I drive it using a modified Arduino library which someone else wrote for a slightly different port extender chip.

The Arduino supports the original version of the I2C protocol which allows me to connect up to 127 different devices to a single controller. That means that I have plenty of spare capacity. Over the next few days I plan to add a controllable voltage source, a programmable voltmeter and a simple logic analyzer, at a cost of about £30.

The Arduino can easily communicate with a PC over a USB cable. I'm planning to hack a simple Python app which plots voltage values in real time - a minimalist oscilloscope.

Arduino rocks!



I've fallen in love with the Arduino.

This amazing piece of hardware brings micro controllers to the masses. It was designed for non-geeks who want to do physical computing, but it's turned out to be just as popular with geeks.

The Arduino provides a fun, inexpensive, easy-to-use platform for electonics and robotics. Best of all, it's open source - part of a radical extension of the open-source concept from the software world to the world of hardware.

I'm currently working on a family of low-cost electronic test equipment, driven by an arduino and connected by an I2C™ bus. I'll be using an attached PC for graphical display.

I'll blog about progress here. I will open-source and publish the hardware and software designs, and may even offer parts kits if there's enough interest.

(Image from Wikipedia - placed in the public domain by its author).