Thursday 25 August 2011

Calunium: Construction

Prepare the strip board
Marking the stripboard
Click on the image for an annotated version.
Mark the locations of the cuts to be made. I found this easiest by printing just the strip board layer from Fritzing onto transparency (use the correct type for your printer). I highlighted the cuts and turned the transparency upside down to give me the view of the copper side of the strip board. I then overlaid the transparency onto the strip board and marked the board. There are 70 cuts to make with a spot-face cutter and 4 with a scalpel. Make sure you cut through all of the track, but avoid damaging the copper of the adjacent tracks. Use a multimeter to check that all of the cuts have been made properly; it is much easier to test and debug an empty board than a populated one. I thought I was careful but found two cuts which had not been made completely.

Add the link wires
Insert the link wires

Begin populating the board with the link wires. Most of the link wires can be safely made with uninsulated wire if you are careful and keep the wire taught and straight. Wires which run closer than 0.1" spacing should be insulated - see the photographs on Flickr. Don't fit any wires to the underside of the board at this time. I colour-coded the wires in the Fritzing layout:

Red+Vcc (digital and analogue)
GreenGround (0V)
BlueMiscellaneous, can be uninsulated
WhiteConnect on underside (or under IC socket if possible)
BrownInsulate due to length

Add the remaining components
Add the remaining components, except for 1N4001 diode, starting with the lowest ones first. Some of the decoupling capacitors are fitted inside the IC socket; keep the leads short so that they do not stop the microprocessor from being inserted. Align the IC socket so that the notch indicates pin 1 end. Ensure that the metal can of the crystal does not touch any of the surrounding wires. Add the ISP header and solder the wires to the underside of the board.

Finally add the headers. Remember that the D8-D13 header is an offset header. I found it easiest to use an ethernet shield to hold the headers at the correct spacing.

Test the board
Before inserting the microprocessor test all of the connections. Then add the FTDI cable/breakout board and power the board from USB. The red LED should light indicating that power is applied. Then check that +5V power is applied to the correct locations of the IC (pins 10 and 30). Check that the GND connections are good (pins 11 and 31). Now add the reverse protection diode; if the polarity of the power supply is reversed the diode will conduct and trip out the polyfuse.

Insert the microprocessor, taking care to get the correct orientation. There's several possible options, see this feature comparison to select the most appropriate one. If you are intending to upload sketches via USB you will need to add a bootloader to the microprocessor. (To be covered in a later post).

Use the blink sketch to test the board. If everything is ok it should just work (it did for me).

Further photos are available on Flickr. The Fritzing files are on GitHub.

Bill of materials
QuantityItemOrder code
1ATmega164P, ATmega324P, ATmega644P or ATmega1284P
1MCP1702 LDO 3V regulator
12N7000 FET
1red LED (3 or 5mm)
1green LED (3 or 5mm)
11N4001 diode
1RXEF025 500mA polyfuseOnecall 1175860
Sparkfun COM-08357
116MHz crystal, 18pF load capacitance, HC49 case
222pF ceramic capacitor
6100nF ceramic capacitor
1100µF electrolytic capacitor, 16V
21kΩ resistor, 0.25W
110kΩ resistor, 0.25W
1SPST switchOnecall 1813689
Sparkfun COM-00097
140 pin 0.6" IC socketOnecall 4285669
Sparkfun PRT-07944
14 pin stackable headerProtopic PP4PSHF
16 pin stackable headerSparkfun PRT-09280
38 pin stackable headerSparkfun PRT-09279
18 pin offset stackable headerSparkfun PRT-09374
23 pin 0.1" header (male)
12×3 pin 0.1" header (male)
1Break-away headers, straightSparkfun PRT-00116
1Break-away headers, longSparkfun PRT-10158
1Break-away headers, right-angleSparkfun PRT-00553
42 pin jumperSparkfun PRT-09044
1stripboard, 38 strips, 30 holes long
wire, 22AWG
Most of the components I bought from Onecall (CPC/Farnell); some I already had. The Sparkfun components I bought from Proto-pic.

Comparison of Calunium with Arduino

Feature comparison
Comparison of the standard Arduino microcontrollers with those which can be used with Calunium.

(8 bit)
ATmega328P322161As used by Uno
ATmega256025684144As used by Mega2560
ATmega164P1610.562Compatible with Calunium
ATmega324P322162Compatible with Calunium
ATmega644644261Compatible with Calunium
ATmega644P644262Compatible with Calunium
ATmega1284P12816482Compatible with Calunium

The ATmega2560 actually has 15 but only 14 are made available on the Arduino Mega2560 headers.

Comparison of PWM output pins

Digital pinArduino UnoArduino Mega2560Calunium
When using ATmega1284P microprocessor.

Tuesday 16 August 2011

Introducing the Calunium - An Arduino clone based on the ATmega644P/ATmega1284P

Calunium 644P
Calunium built on stripboard. This version uses the ATmega644P, but the ATmega1284P can also be used. Click on the image for an annotated version.

Aims of the project
  • Create an Arduino clone with more than 32K program memory.
  • Produce a design which uses only through-hole components.
  • Shield-compatible - with pin functionality as close as possible to the original Arduino. 

Sanguino and other related designs
How does this differ from the Sanguino and other related designs (Bobuino, Mosquino etc)? The Sanguino can't accept Arduino shields. Although it is possible to program it with the Arduino IDE the pin mapping is functionally very different to the Arduino; for example the first UART is connected to D8-D9, not D0-D1, and the SPI pins are connected to D5-D7, not D11-D13. The Bobuino looks to be a very nice design but I ruled it out as it uses surface mount components, and the ISP header is not in the standard location (as required for the Ethernet shield). The headers on the Mosquino aren't shield compatible.

Sign-Advancetech appear to make a board which appears very close to what I want - I'd probably get one if I could easily buy it in the UK.

Fritzing design files and software

Calunium stripboard design
Click on image for annotated version.

The Fritzing design files can be found on GitHub, Modifications to the Arduino IDE to support Calunium are under development but will be added soon.

Creative Commons Licence
Calunium by Steve Marple is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.

About the name
As Arduino is an Italian project, this project takes its name from the Roman name for Lancaster, Calunium, where the design of this clone originates.

Building the Calunium
Future blog posts will show the construction of the Calunium. I also have a design for a shield-compatible strip board Arduino but I haven't had time to put it together yet.

Pin mapping
D23-PD7 (OC2A/PCINT31)

Monday 8 August 2011

Test magnetometer results

Test magnetometer
Magnetometer electronics in their temporary housing.

On Friday I deployed my magnetometer to the same site used by SAMNET for the Lancaster magnetometer. I knew that several coronal mass ejections (CMEs) were due to impact the Earth's magnetosphere. The predictions were correct, on Saturday AuroraWatch UK issued an amber alert. Below is a comparison of the data from my test magnetometer and the SAMNET magnetometer.

Test magnetometer (top-panel) and the D component from SAMNET's Lancaster magnetometer (bottom panel).
Sensor temperature for the same period.
The results are encouraging even though at present the test magnetometer isn't calibrated, and the orientation is only approximately aligned with the magnetic east component ("D"). The baseline differences can be ignored as SAMNET does not make full-field measurements, just variations from a fixed baseline. I haven't measured it yet but the test sensor has a large temperature coefficient; if the FGM-1 behaves in the same way as the FGM-3 then I expect it to be around 25nT/°C. The graph shows the temperature over the same period varied from 16.5°C to 30°C.

Clearly some kind of temperature stabilisation is going to be needed. One option is to bury the sensor. Another is active temperature control, but care will be needed to ensure that DC currents for the heater do not affect the magnetic field being measured!