Friday 28 December 2012

Calunium: version 2

Calunium v2
Calunium version 2. Click on the image for an annotated version.

Features

  • ATmega1284P microcontroller with 128 KBytes flash memory, 16 KBytes SRAM and 4 KBytes EEPROM, SPI and I2C buses and 2 UARTS.
  • Shield-compatible with Arduino Uno revision 3, with extra I/O laid out to be compatible with Arduino Mega pins. Pin mapping is chosen for maximum compatibility with Uno.
  • Jumper-selectable 3.3 V or 5 V operation; selected voltage is available at the IOREF pin to enable shields to operate at the correct voltage.
  • I2C (SDA/SCL) mapped to dedicated SDA/SCL pins and the standard location used by the Arduino Mega but jumpers can be used to replace A4/A5 with SDA/SCL signals for compatibility with older Arduino shields.
  • Second UART (D1, D2) signals also mapped to corresponding location on Arduino Mega (TX1, RX1).
  • ISP header in standard location, allowing the Arduino ethernet/SD shield to be used.
  • D13 LED connected via FET to avoid loading D13.
  • Real-time clock (e.g, DS1307, DS1338, MCP7941x). Output square wave can be routed to D6 (INT2) or D15 (TOSC1, for input to timer/counter 2). Battery backup from CR2032 battery.
  • Micro-SD socket for additional data storage. Uses SPI bus (D11, D12, D13), chip select is D22. If card is fitted then 3.3 V operation is required.
  • Hope RFM12B radio module for communication. Uses SPI bus (D11, D12, D13), chip select is D14 and interrupt request is D6 (INT2, can be disconnected by removing a jumper). Requires 3.3 V operation; Calunium can be powered from 5 V provided that the RFM12B is not used.
  • Power from USB or FTDI connector.
  • Switches, connectors and USB socket located outside of the standard Arduino shield footprint so they do not interfere with shields and are accessible when shields are fitted.
  • Auxiliary power connector; connect your own voltage regulator or boost converter. 5 V from USB (FTDI and/or USB connector) and 3 V from RTC battery also available on the connector. For easy prototyping add your own power adaptor.
  • Auto-reset can be disabled by removing jumper.
  • Pads to fit LM61 temperature sensor.
  • Usable PCB-mounting holes.
  • JTAG header for debugging/programming.

Bootloader

Either the Optiboot or xboot bootloaders can be used. My preference is for xboot as explained in a previous blog post.

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.

Open source

Hardware
The Eagle PCB design files for Calunium are available on Github and are licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License.

Software
Files to allow Calunium to be used with the Arduino 1.0 IDE are available on  Github and are licensed under the Gnu General Public License v2.

Peripherals pin mapping

PeripheralPinFunction
LED13
Temperature sensorA6
A7
Power
Output
Real-time clock*D6/D15Square-wave output/alarm
microSD card22Card select
RFM12B radio module6
14
Interrupt request
Select
* Also uses I2C bus (20, 21).
** Also uses SPI bus (11, 12, 13).

Microcontroller pin mapping

PinArduino Uno (Atmega328P)Calunium (Atmega1284P)Arduino Mega2560 (ATmega2560)
D0PD0 (PCINT16/RXD)PD0 (PCINT24/RXD0/T3)PE0 (RXD0/PCINT8)
D1PD1 (PCINT17/TXD)PD1 (PCINT25/TXD0)PE1 (TXD0)
D2PD2 (PCINT18/INT0)PD2 (PCINT26/RXD1/INT0)PE4 (OC3B/INT4)
D3PD3 (PCINT19/OC2B/INT1)PD3 (PCINT27/TXD1/INT1)PE5 (OC3C/INT5)
D4PD4 (PCINT20/XCK/T0)PB0 (PCINT8/XCK0/T0)PG5 (OC0B)
D5PD5 (PCINT21/OC0B/T1)PB1 (PCINT9/CLKO/T1)PE3 (OC3A)
D6PD6 (PCINT22/OC0A/AIN0)PB2 (PCINT10/INT2/AIN0)PH3 (OC4A)
D7PD7 (PCINT23/AIN1)PB3 (PCINT11/OC0A/AIN1)PH4 (OC4B)
D8PB0 (PCINT0/CLKO/ICP1)PD6 (PCINT30/OC2B/ICP)PH5 (OC4C)
D9PB1 (OC1A/PCINT1)PD5 (PCINT29/OC1A)PH6 (OC2B)
D10PB2 (SS/OC1B/PCINT2)PB4 (PCINT12/OC0B/SS)PB4 (OC2A/PCINT4)
D11PB3 (MOSI/OC2A/PCINT3)PB5 (PCINT13/ICP3/MOSI)PB5 (OC1A/PCINT5)
D12PB4 (MISO/PCINT4)PB6 (PCINT14/OC3A/MISO)PB6 (OC1B/PCINT6)
D13PB5 (SCK/PCINT5)PB7 (PCINT15/OC3B/SCK)PB7 (OC0A/PCINT7)
D14-PC7 (TOSC2/PCINT23)PJ1 (TXD3/PCINT10)
D15-PC6 (TOSC1/PCINT22)PJ0 (RXD3/PCINT9)
D16-PC5 (TDI/PCINT21)PH1 (TXD2)
D17-PC4 (TDO/PCINT20)PH0 (RXD2)
D18-PC3 (TMS/PCINT19)PD3 (TXD1/INT3)
D19-PC2 (TCK/PCINT18)PD2 (RXD1/INT2)
D20-PC1 (SDA/PCINT17)PD1 (SDA/INT1)
D21-PC0 (SCL/PCINT16)PD0 (SCL/INT0)
D22-PD4 (PCINT28/XCK1/OC1B)
D23-PD7 (OC2A/PCINT31)
A0PC0 (ADC0/PCINT8)PA7 (ADC1/PCINT7)PF0 (ADC0)
A1PC1 (ADC1/PCINT9)PA6 (ADC0/PCINT6)PF1 (ADC1)
A2PC2 (ADC2/PCINT10)PA5 (ADC2/PCINT5)PF2 (ADC2)
A3PC3 (ADC3/PCINT11)PA4 (ADC3/PCINT4)PF3 (ADC3)
A4PC4 (ADC4/PCINT12)PA3 (ADC4/PCINT3)PF4 (ADC4/TCK)
A5PC5 (ADC5/PCINT13)PA2 (ADC5/PCINT2)PF5 (ADC5/TMS)
A6PC6 (ADC6/PCINT14)PA1 (ADC6/PCINT1)PF6 (ADC6/TDO)
A7PC7 (ADC7/PCINT15)PA0 (ADC7/PCINT0)PF7 (ADC7/TDI)

Bill of materials

A bill of materials for Calunium v2 is available from Google docs.

Changes from Calunium v1

Summary of changes from Calunium v1.

Arduino 1.0 headers included
The revised Arduino headers have been included. This adds dedicated I2C connections and an IOREF pin whose purpose is to indicate the I/O voltage level.

Jumper-selectable 3.3 V or 5 V operation
The microcontroller supply voltage is easily selected by a single jumper setting.

Improved reset circuit
A reversed-biased diode has been added in parallel with the reset pull-up resistor to prevent overshoot of the reset signal which can cause erroneous behaviour.

Option to use surface-mount real-time clock
I've not been able to find a suitable alternative to the DS1307 which can operate at 3.3 V and which is available in a dual inline package. The alternatives are only available in SOIC8 or smaller packages. To support 3.3 V operation a combined DIP/SOIC8 footprint has been used.

Ceramic resonator option instead of crystal
The crystal footprint has been revised to allow a 3-pin ceramic oscillator to be fitted as an alternative to a crystal. Omit the 22 pF loading capacitors when using a ceramic oscillator.

Improved analogue power supply circuitry
Analogue power supply follows the advice given in the data sheet.

Temperature sensor now powered from logic output
The optional LM61 (or similar) temperature sensor is now powered from D7. This change has been made for low power operation; I had been fitting an LM61 to other shields instead of using one on Calunium so that it can be powered off when not needed.

V-USB removed
I've had no success with the V-USB interface so the necessary circuitry has been removed. If you have had any success please let me know how to make it work! The USB connector remains as a convenient 5 V power connector.

3 comments:

  1. I built Version 2 with 644P at 5v power supply. Works well with preliminary sketches using I2C (RTC and LCD) and OneWire (DS18B20). Ethernet and web server fails. Sketch reports no ip address via DHCP or manual bind. Have you had any success with Arduino Ethernet shield (W5100) version 3 and IDE 1.03? If so, what changes need to be made to libraries? Excellent project. Thank you.

    ReplyDelete
  2. The fault is in the SD and Ethernet libraries because the pin-mapping they use is hard-coded (for Sanguino); they really should use pins_arduino.h.

    You can find the changes I made to make it work on my Arduino Github repository. Take a look at
    https://github.com/stevemarple/Arduino/blob/master/libraries/SD/utility/Sd2PinMap.h
    and
    https://github.com/stevemarple/Arduino/blob/master/libraries/Ethernet/utility/w5100.h.

    ReplyDelete
    Replies
    1. Thank you. Downloaded SD and Ethernet libraries. RTC set from NTP now working.

      Delete

Note: only a member of this blog may post a comment.