For the latest iteration of my wireless temperature sensor (compatible with OpenEnergyMonitor, Nanodes and Jeenodes) I decided it was time for a proper PCB. While it’s not too much hassle to make one from stripboard, botching the RFM12B transceivers onto it is a bit of a pain in the bum and a custom PCB makes it a lot smaller, neater and quicker to build overall. I had made some PCBs a very long time ago using ferric chloride etching and the letraset style transfers but found it to be hard work with very variable results and not something I cared to repeat, newer laser printer transfer techniques look like they can make things a little easier but getting short runs of professionally manufactured boards produced is also a lot easier and cheaper these days so I thought I’d try my hand at that.
So a couple of weeks ago I got stuck in and designed a board with the Eagle CAD software. I’d played around with Eagle a bit in the past but only to view schematics I’d downloaded elsewhere, I’d never tried to actually design anything in it, it seems rather dated in its design and I don’t think I’m being unkind in saying it isn’t the most intuitive piece of software ever designed but I soon got the hang of it and to be fair, it is pretty good at its job once you get to grip with its foibles.
I decided to use the Chinese site SeeedStudio.com to produce the boards, they don’t take Eagle files directly but Eagle can export the Gerber files that they need and they have an Eagle design rules file that makes it easy to check that your board fits with what they are capable of producing and a job file for the Gerber export to make sure everything is setup correctly for them. It’s still worth double checking the resulting Gerber files in a viewer such as Gerbv to make sure everything has come out as intended, I found that some of the silkscreen text that looked fine in Eagle had overflowed the board in the Gerber files.
After getting the design done I duly placed my order and sent the Gerbers off by email. A couple of weeks later and this lot landed on my doorstep:
Slap on an ATtiny84A microcontroller loaded with my TinyTX code, an RFM12B transceiver, a DS18B20 temperature sensor and a 4k7 resistor and connect it up to a couple of batteries and it’s good to go, uploading to my install of OpenEnergyMonitor emoncms via a Nanode and also displayed on my graphical displays. Here’s the completed board on top of a 2 x AAA battery holder:
I went with 2 x AAA batteries when I made this one up as it shows off its diminutive dimensions but AA could of course be used for more capacity and that is what I’ll probably use on most of them. A 3V coin cell could also be used but they don’t have a lot of capacity so I don’t think they really make a lot of sense unless size is critical. The pad spacing for the DS18B20 sensor also allows for a 3 pin header to be fitted instead allowing the sensor to be remote from the board on a plug in lead if desired.
For 10 boards it cost 10 USD + shipping which worked out at £9.42 including UK delivery, so 79p per board given that I actually received 12, not bad at all and the quality is excellent.
I’m pretty happy with how it came out for a first try, the only bit that I would do differently in retrospect is the spacing between the RFM12B and the pads at the bottom is a little tight, I’m going to blame the JeeParts library for that one as the outline it shows in Eagle for the RFM12B is smaller than it is in reality. It still fits though.
Here is a picture comparing it with (left to right) my original prototype ATmega328 powered stripboard version, the improved ATmega328 stripboard version (one of several in use) and the ATtiny stripboard version. Quite an evolution.
Make your own
You might notice the Open Source Hardware logo on the top right of the board, I’ve licensed this under the Creative Commons Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) licence and the design files and schematics are available if you fancy getting your own boards made up or want to use it as the basis for something else. You can find links to download the Eagle files and the finished Gerbers ready to send off to Seeed below. I’ve also uploaded the files to SolderPad here and as always you can get the latest code on GitHub here. The code needs to be loaded using the Arduino IDE and arduino-tiny core as covered in this previous post and requires a one line change to the OneWire library to get it to work with the arduino-tiny core.
Bill Of Materials:
1 x TinyTX PCB
1 x ATTINY84A-PU Microcontroller
1 x RFM12B Transceiver
1 x DS18B20 Temperature Sensor
1 x 4K7 0.125W resistor
1 x 14 Way DIP socket
1 x Double AAA or AA battery holder
Wire for antenna (165mm for 433MHz, 82mm for 868MHz)
Update: There is now a dedicated page for the TinyTX with more information.