Saturday, 9 February 2013

Calunium: version 2.1

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

This upgrade to Calunium v2 provides several minor improvements. There is the option to fit a Microchip MCP220 UART-USB converter instead of the FTDI connector. For development purposes the MCP2200 is much more convenient than an external FTDI cable or adaptor; operation at both 3.3V and 5V is supported. For low-power battery operation the MCP2200 uses too much power so the FTDI connector option has been retained.

I find I operate Calunium almost exclusively at 3.3V. I've not been able to find any real-time clocks in a dual-in-line package that operate at 3.3V and feature battery-backup. Suitable clocks are supplied in a SOIC or smaller package. I have therefore removed the DIP footprint option for the real-time clock. The space saved has allowed me to add optional load capacitors for the crystal so that a MicroChip MCP7941x real-time clock can be used. This clock has several benefits over the popular DS1307 (or its 3.3V equivalent, the DS1338). It is cheaper, it can compensate for crystal frequency errors, it has EEPROM storage, two alarms and it also has a unique identifier. This change goes against one of the original aims of Calunium, to use through-hole components to keep it accessible to the widest possible audience. However, considering the other interesting on-board peripherals (micro-SD socket, RFM12B and MCP2200) require surface-mount soldering skills I thought this a reasonable compromise to make. The original through-hole only designs are still available for those who really do not want to use any surface-mount components.

The final improvement is that the SPI clock signal is now routed with a ground plane between it and the real-time clock crystal.

For the full list of features please see the original Calunium v2 blog post.

Calunium v2 and v2.1 PCBs
Calunium v2 (top) and v2.1 (bottom) PCBs.
Click on the image for an annotated version.

25 comments:

  1. Steve, what clock speed are you using for the 3.3v version of the board (I think I noticed a board marked 12Mhz?) If you run the board at a clock other than 16Mhz or 8Mhz do you have to make changes in the arduino environment?

    ReplyDelete
    Replies
    1. I run the boards at 8MHz or 12MHz since anything higher is outside the specification for 3.3V operation. You must ensure that the boards.txt entry that you select has the correct frequency otherwise the baud rate settings and delays for your sketch will be incorrect. If you use a bootloader then you must ensure that it is compiled for the correct clock frequency otherwise its baud rate calculation will also be wrong. The Calunium repository contains the correct files for 8, 12 and 16MHz operation using the xboot bootloader.

      Delete
    2. What's your experience been with regard to lead time for boards?

      Delete
    3. The last order with Iteadstudio took 22 days. It should have been less but they mistakenly shipped the boards by airmail instead of DHL; still waiting for the refund.

      Delete
  2. Steve,
    I'm tempted to build one at 3.3v. It would be perfect for a project that is currently split between two Arduino's due to lack of pins.

    I'm thinking of replacing the RFM12 module with one of these.

    http://www.circuitsathome.com/products-page/breakout-boards/usb-host-shield-for-arduino-pro-mini

    How would you handle it? Would you order 10 of the 2.1 boards and hot-wire in the USB module or take a leap of faith and modify the 2.1 design to take the USB module before ordering boards?

    ReplyDelete
    Replies
    1. For a one-off I think I'd use a prototype shield. You can use the Mega version if you want access to the extra pins that Calunium makes available. For more than a few I'd probably get some boards made, either a modified Calunium or a shield. I'm not familiar with the MAX3421 so I'd probably check it out on solderless breadboard first. Now that I have some experience with surface-mount parts I might be tempted to add the MAX3421 to the PCB directly. If there was room I'd probably keep the option of using the breakout board by leaving the MAX3421 footprint unpopulated.

      Delete
  3. Steve,
    I successfully built v2.1 and I have a quick question. Do you know if it is possible to change the interrupt pins?

    ReplyDelete
    Replies
    1. Glad to hear of your success. What is it you wish to change about the interrupt pins? INT0 and INT1 map to the corresponding pin locations for an Arduino, INT2 is an additional feature. For the other pins you can use pin-change interrrupts, they are a little less convenient than a dedicated INT line (only respond to change in state, cannot select rising or falling edge).

      Delete
    2. I would like to use digital pin 14 as a falling interrupt pin.

      Delete
    3. Only the true interrupt pins (INT0, INT1 and INT2) can be programmed with the direction of change, none of these are wired to digital pin 14. You can emulate this behaviour with a pin change interrupt. You will need to check the final logic level on the pin is low to discard rising edges. The interrupt handler is common for all pins on the port, it is possible to identify which pin triggered the interrupt. You can also mask which pins should generate an interrupt.

      Delete
  4. Hi Steve, I'm a little late to the party here but decided to build a Calunium as my first major electronics project (deep end of the pool approach). I had a quick question regarding the values of C15 and C16, which aren't marked on the board or mentioned in the BOM. Also, I noticed in the photo of your build that you're not using C18. I'll be using an MCP-79411 for the RTC, do I need both C17 and C18?

    Thanks!

    ReplyDelete
    Replies
    1. Hi Christian, C15 and C16 should be 22pF ceramic capacitors of the same type as used for C10 and C11. They are actually on the BoM but you'll need to select the correct tab in the Google spreadsheet. C18 is in use but it is a little distance from the capacitor. On the photo of the PCB you may be able to see a white line and arrow linking the label to its footprint.

      For the MCP79411 you will need the load capacitors, C17 and C18, along with R7 and D2. You may need to adjust the values to suit the crystal you purchase for most accurate operation. I think I'm using 15pF and 22pF.

      There are some build instructions for this board in the AuroraWatchNet magnetometer manual (see https://github.com/stevemarple/AuroraWatchNet or download from http://aurorawatch.lancs.ac.uk/manual.pdf). Bear in mind the instructions are for low-power operation with 3.3V supplied from another PCB.

      The next revision of this board is likely to feature a pull-down resistor on the gate of Q1. I'm going to retrofit a 470k 0805 surface mount resistor between D13 and GND on my existing boards. This will prevent spurious operation of the LED when D13 is an input and help protect the FET against electrostatic damage.

      Delete
    2. Thanks...the link you posted to the BoM only displays the v2.0 tab. The correct link to display all three version tabs is:

      https://docs.google.com/spreadsheet/pub?key=0At0gnVuTBQ4udHFOU0gzODB1YTIweDQ4REdXblhoRFE&gid=2

      Delete
    3. Thanks. Just a heads up that I was going over the MCP7941x data sheet and it advises against using a 12.5 pF crystal. Instead, it recommends 6-9 pF, so I'm swapping out the 12.5 uF Epson I bought for a 6 uF Epson, which means 10 pF and 12 pF load capacitors according to:

      http://ww1.microchip.com/downloads/en/AppNotes/00001519B.pdf

      Hope this is helpful for someone else taking the same approach.

      Delete
    4. I've updated the Calunium v2 post with the correct URL.

      The datasheet for the MCP7941x that I used only listed crystals with capacitances of 6 or 7 pF. It seems that Microchip have updated the datasheet again and added additional restrictions. With suitable load capacitors I haven't found problems using crystals with 12pF capacitors but thanks for pointing out this latest change from Microchip.

      Delete
  5. Hello Steve,

    I have a small question about the schematic on the 2.1a version:
    Why do you connect the USB-TTL to the 5V and not VCC for the RESET ?

    Am I missing something ?

    Thanks for your amazing work.
    Regards,

    Dimitri

    ReplyDelete
    Replies
    1. Hi Dimitri, I can't see where the RESET is pulled up to 5V, can you please give me the coordinates on the Eagle schematic?

      I did recently find one error that I have still to correct, the MCP2200 !RTS output should be connected through JP7 so that auto-reset can be disabled.

      Delete
    2. You are right I confused with the Elouera Board ;) (who is mostly inspired from your V1)...

      Anyways thanks for answer me and your amazing work !
      (Sorry for my late answer)
      I 'am also making my own board based on your work.
      It will be awesome to have your feedback about it ;)

      Cheers,

      Dimitri

      Delete
    3. Thanks for replying - I can relax a little before I send off for more boards to be made. I wasn't aware of the Elouera board, its always a pleasure to see one's work has inspired others. Please post a link to your board when you have it made.

      Steve

      Delete
    4. I will post my board ASAP.

      I finally choose to use LDO regulator instead of a standard one.
      ( I want to use the LD1117 to have 1A for the 3.3V )

      But it is more complicate and I've a small question:

      On your schematic (the V 2.1a I'm sure this time ;) )

      for the 5V regulation (coord: A2) I cannot see the Cout 1uf to stabilize the LDO...

      Why ? Is it because you have a 4u7f on VCC (C3) that do the job?
      But in this case why don't you do the same for the 3V3 .
      If yes: what happens if you choose 3.3V for VCC but use the 5V on a shield that you plug ?



      Regards,

      Dimitri

      Delete
    5. There is a 1uF capacitor on the input to the 3.3V regulator which also serves as the output capacitor for the 5V regulator. That's only connected to the 5V regulator when a shunt is fitted on the VREG PWR jumper, although with the shunt missing the regulator cannot be used anyway. A bit more decoupling might be better but to be honest the 5V regulator was a bit of an afterthought and little priority was given to it, as explained in a previous post about the options for powering Calunium.

      Delete
    6. You are right.
      I didn't notice the fact that 5V out and 3V3 in share the 1uF :)

      Okay thanks for all thoses explanations... I have still one small question:

      You also have a 4u7f and a 100nF in parrallel for VCC regulation.
      How do you manage this capacitors and his ESR to avoid LDO instability ?

      Do you use special capacitor ?
      Is it because of your choice of LDO that prevent this kind of use cases to happen ?
      If a choose another LDO should I be suspisious about the 100nf capacity and his ESR ?

      I was thinking to use the http://www.diodes.com/datasheets/ZLDO1117.pdf for the 3V3 do you have any suggestions about that ?

      Regards,

      Dimitri

      Delete
    7. I've used the LD1117 in 3.3V and 5V versions without problems. I've not taken any specific precautions regarding instability with the 100nF capacitor - most ICs specify some decoupling, typically 100nF.

      Delete
  6. Hello Again ;)

    It will be awesome if you could provide me some advicew on how to reassign PWM pins and explain your choice of assignation. Why dont you keep the same pwm pin of the uno ?

    Thanks again for your previous answers and help !

    Regards,

    Dimitri



    ReplyDelete
    Replies
    1. PWM pins cannot be reassigned. For me PWM wasn't so important, and there are plenty of PWM pins to choose from anyway so I attempted to keep other functionality on the same pins as the normal Arduino, in particular RX0, TX0, and the SPI bus (SS, MOSI, MISO and SCK).

      Delete