LowPowerLab Forum

Hardware support => Moteino => Topic started by: Tony Weil on February 11, 2018, 10:17:49 AM

Title: DIY Moteino Crystal/Resonator and Bootloader
Post by: Tony Weil on February 11, 2018, 10:17:49 AM
I'm just finishing up laying out a PCB for my first integrated Moteino and sensor hardware using Kicad and for the first time (that's another mostly good story). I'm using mostly 0805 size SMT components and plan on hand soldering the first board (I've been somewhat successful before) and maybe trying some toaster oven reflow on the next one.

I'm not sure whether to use a 16 Mhz crystal and caps or a 16Mhz resonator. What are the pros and cons? Looking at the Moteino schematic and board it appears to use a tiny resonator with a metal top. On Digikey, most of the larger resonators are ceramic, which is not really a problem. I'm just looking for a good choice for the crystal or resonator that I can hand solder and am paralyzed making a decision.

I hope to be able to load the Dual Optiboot bootloader on the Moteino Github. This requires using Atmel studio and ICSP connector (or at least the right exposed pins and jig) which I've done before in the distant past. This bootloader will blink the D9 LED as a new program is uploaded through the FTDI connector. It also includes the Wireless Programming feature which I don't need for this project.

If I have difficulty, I may just use the easier to install Arduino bootloader through the Arduino IDE. I assume this is designed to blink the D13 LED during program upload. What is the downside to having a D13 LED that is connected to the same pin as the RFM69? Will it blink during transmit/receive which I don't want? Mess up the RFM69 in some way? I can always lay out both LEDs and decide later which one or both to solder.

I have a small pile of RFM69HW modules which I plan to use. Should I bother to also add an RFM69HCW footprint overlapping the RFM69HW footprint also so I can possibly use this board again in the future?

Tony
Title: Re: DIY Moteino Crystal/Resonator and Bootloader
Post by: Felix on February 11, 2018, 11:02:13 AM
I doubt you want super clcok accuracy so resonators will work just fine and have integrated caps (smaller BOM).
You'd need a jig if you plan to make lots of these. For a few you can just connect through headers. You can use another arduino as programmer. I use an AVR programmer.
D13 is SCK, part of SPI. I wanted the LED separate from that. Otherwise it should not matter, AFAIK as long as your SPI devices are not selected, SCK activity should have no impact.
Overlapping the 2 footprints will take you some work and time. Just go with what you have, then later when you are done with those and want something else, and are better at layout, do the other.
Good luck and please follow up with your progress!
Title: Re: DIY Moteino Crystal/Resonator and Bootloader
Post by: Tony Weil on February 11, 2018, 02:23:24 PM
Any recommendations on particular resonators that are hand soldering size that anyone has used before?

Kicad has been ok to use. Large learning curve on schematic and footprint libraries and editing. I decided to make my own set of mostly footprint libraries and fill them with parts I used for this board that I either copied and verified from other sources (Kicad, Sparkfun, Adafruit, Digikey) or made from scratch. A few program crashes here and there. All in all, a decent experience and nice licensing terms. Lots to like, lots to complain about. I think it will only get better. The fact that CERN engineers or physicists are using it and contributing to the development gives me confidence it will continue to improve.





Title: Re: DIY Moteino Crystal/Resonator and Bootloader
Post by: Felix on February 11, 2018, 02:31:43 PM
I think most SMD resonators will not be hand soldering friendly.
Good to know KICAD is getting better, but it sounds like the same level of experience I had several years ago when I tried it (some likes, some dislikes, some crashes ... overall MEH). So im still on Eagle 7.7.
Title: Re: DIY Moteino Crystal/Resonator and Bootloader
Post by: perky on February 11, 2018, 08:02:49 PM
Personally if I were designing a Moteino-like board I'd be tempted to put on a 10ppm 32kHz watch crystal, drive TC2 asynchronously with it, and use that to calibrate the 8MHz internal oscillator. Software can write to the OSCCAL register and according to the datasheet you should get +/-1% over temperature and voltage which would be more than enough for serial comms. I can't see why anyone would really need 16MHz unless doing some really clock intensive stuff like lots of floating point. Having an accurate watch crystal opens up a whole new set of possibilities with accurate time slots and sleeping, I use a ABS25-32.768KHZ-6-1-T in my projects which is an SMD device and very easy to solder:
http://www.farnell.com/datasheets/1856019.pdf

Mark.
Title: Re: DIY Moteino Crystal/Resonator and Bootloader
Post by: Felix on February 12, 2018, 08:46:48 AM
Quote from: perky on February 11, 2018, 08:02:49 PM
Having an accurate watch crystal opens up a whole new set of possibilities with accurate time slots and sleeping, I use a ABS25-32.768KHZ-6-1-T in my projects which is an SMD device and very easy to solder:
http://www.farnell.com/datasheets/1856019.pdf
Mark.
I wanted to mention some watch crystals (like Mark mentioned) have side leads which are relatively easy to solder, but I assumed Tony wanted external 16mhz.