Wednesday, November 21, 2012

Arduino and GertBoard

The Arduino compatible microcontroller on the GertBoard is a nice feature that allows you to run most Arduino programs or "sketches" as they are called. They are written in a simplified subset of the C/C++ programming language. The Arduino chip has on-board digital and analog input/output pins and is more suited to real-time control than the Raspberry Pi which is running Linux, because you have full control of the chip for running your code. Under Linux, many processes are typically running and can preempt your device control program. The Arduino programs reside in flash memory so they are non-volatile and they start up in a fraction of a second from power on. The main limitations of the Arduino are that it can only run small programs, a few kilobytes in size, and it doesn't have a full operating system with features like a complete file system.

The work is all done by an Atmel ATmega 328 chip running at 12MHz. A special version of the "avrdude" program is available which allows the chip to be programmed from the Raspberry Pi's SPI bus on the GPIO port. The Arduino IDE, which runs fine on the Raspberry Pi, can then compile and upload programs to the Atmega chip.

Raspberry Pi and GertBoard

It provides 14 digital and 6 analog input/output pins. I ran several Arduino sketches which exercised the analog and digital inputs and outputs as well as the serial port. Remember these are in addition to the input/output ports of the GertBoard itself.

The Atmega chip on the GertBoard should be compatible with many Arduino programs but it is not directly compatible with Arduino shields (add-on boards) because it has a different hardware form factor, and it runs at 3.3V levels rather than the 5V logic of standard Arduinos.

Now, with all these capabilities, I have to think of a good hardware project.

Sunday, November 18, 2012

Testing The GertBoard

I was in Berlin, Germany this week to attend the Qt Developer Days conference Europe where I gave a talk on Qt and Raspberry Pi. I'll be giving the same talk at Qt Developer Days North America in Santa Clara, California from December 5 to 7, 2012.

Now that I am back home the the GertBoard has been assembled and is confirmed to be working.

Assembled GertBoard

I ran the included programs that exercise the pushbuttons, LEDs, open collectot drivers, PWM motor controller, A/D converter, and D/A converter.

Setup For Testing Motor Control
 Next up is to try the Arduino compatible microcontroller. I hope to make some videos of some programs running and post them on YouTube.

Testing the GertBoard and Raspberry Pi on the Bench

Friday, November 9, 2012

GertBoard Assembled

Soldering of the GertBoard kit took an evening, taking my time and examining all parts and solder joints carefully. I found the SMT parts were quite easy to solder -- my only worry was that I would lose some of them!

Assembled GertBoard (less ICs)

I've now completed the assembly and just have to insert the ICs before being ready to give it the initial "smoke test". Unfortunately it will have to wait a week until I am back from the Qt Developer Days conference in Germany where, among other things, I will be giving a presentation on Qt and the Raspberry Pi.

Thursday, November 8, 2012

GertBoard Kit Arrived

After several months of waiting I finally received my GertBoard kit. The GertBoard is an input/output expansion board for the Raspberry Pi.

Parts Included In GertBoard Kit

PCB Before Installing Components
It is shipped as a kit, although this is likely to change soon. It requires a significant number of parts, including some surface mount parts, so it is somewhat challenging to assemble.

So far I have reviewed the assembly instructions and confirmed that I have all the parts. In preparation, I did some practice soldering of some surface mount parts on some bare PCB. That went well so I am ready to start assembly.

SMT Soldering Practice

I'll post more here on my progress.

RF Attenuator Kit

As we get into winter I'm starting to get back into some amateur radio projects. I recently built an RF attenuator kit  from Hendricks QRP Kits.

It's a nice simple attenuator that supports from 1 to 41 dB of attenuation with 50 ohm input and output impedance and can handle up to about 5 watts of power and is good to at least 30MHz. It's based on
a circuit in the ARRL Radio Amateur's Handbook.

Front View

Rear View
It only contains resistors and switches but comes with a nice silk-screened PCB and a metal case with decals for labelling the switches. It went together in an hour or so not counting the time spent waiting for the coats of Krylon clear coat finish to dry.

I plan to use it for a couple of applications. I have an RF signal generator built from a kit that has a fixed output. This will allow me to adjust the output level in 1 dB steps from 100% down to about .02% output level.

The other application, which it was designed primarily for, is to adjust the output level of a QRP transmitter so you can work at lower power levels with the flip of a few switches. The rear panel has a label which lists the percentage of output level and power output for 1W and 5W input) and various switch settings.

In may also come in handy when testing and calibrating ham radio and communications receivers.