Hacking up some Arduino-derivative hardware.
I was having a chat with some people the other week at linux.conf.au – I’m sorry, but I’m terrible at learning and remembering new names and faces, and I can’t remember who – about the idea of a future LCA workshop on the subject of the Arduino platform, where delegates are actually given their own kit that they can solder together – getting a little more hands-on with the hardware than using (the admittedly good) pre-assembled Arduino reference-design dev boards.
I mentioned the notion of having such a kit based exclusively on through-hole components, so that it’s easy to assemble by people with minimal experience with SMD soldering. However, the FTDI USB UART devices aren’t available as through-hole devices, only as SMD, so you’re going to need at least one SMD component. That is, unless you want to use RS232 as the interface to the PC, not USB. However, compared to RS232, USB is kick ass.
So, I thought, why not use a Arduino-style dev board that includes both RS232 and USB as well – so, you can have a fully functional board with USB interface if you’re brave enough to solder the SMD – but if you don’t, that’s OK, but you will need to use RS-232 as well as an external power supply.
That’s a pretty good idea, I thought. The people I mentioned it to agreed.
But no such hardware platform is available off the shelf anywhere.
So I created it.
This has been occupying my free time in between free moments for a significant part of the week at LCA 🙂
Doesn’t a conference such as LCA just totally put you in a hacking groove? It does for me. Of course, I’m a hardware, more so than software, hacker.
Hardware IP released under the TAPR Open Hardware License (http://www.tapr.org/OHL).
These are CADsoft EAGLE files; they’re also sufficiently small such that the freeware licensed version of EAGLE is perfectly fine to work with them. Yeah, I know, I know, it’s proprietary software. I’ll have to learn gEDA and re-do the designs for extra FOSS satisfaction.
So, what hardware do we have?
The hardware is extremely close to the Arduino Duemilanove reference board schematic design, which it is based on. I’ve just added the MAX232A and D9 port for RS232, really. The UART connections are bought out to a 2×3-pin header block, so that jumpers can be used to patch the ATMega into either the FT232RL USB UART chip or the MAX232A level translator for RS232.
In theory, if you wanted to, for some strange reason, and you’ve populated both sets of interface components, you could have Tx routed to the USB UART, and Rx routed to the RS232 interface, or vice versa, if you wanted to. Also, you can, in theory, put the jumpers in to connect the hardware UART in the AVR to the USB port, and then code up a secondary UART in software using other DIO pins on the microcontroller, and then patch those DIO pins onto the UART select jumper block so that they’re connected to the MAX232, then you can plug the Arduino into the PC via USB, and then plug some completely separate RS232 peripheral into the microcontroller, too!
(Anyone for an OpenWRT router under microcontroller control?)
Additionally, all components are through-hole, except the FT232RL chip. Because through-hole components are used throughout, it’s a bit bigger than ordinary Arduino boards, and is physically not compatible in terms of form factor; that is, it is not (as the PCB currently stands) presently compatible with Arduino-compatible “shield” plug-in daughterboards. Perhaps somebody with elite PCB-routing skills could overcome that with a revised board layout?
The PCB as it currently stands maybe isn’t perfect. Perhaps it could be better. Perhaps you could make it better.
I’ve routed tracks on both layers so that there are no vias, instead, component leads are used as vias by soldering them to both layers – this can be difficult for certain types of components, and can affect the best component choices – eg. machined-pin IC sockets are easier to use. I find this method faster and easier when using home-fabbed PCBs, but if you can get professional PCBs fabbed inexpensively in China, then it might not be as important because you can get plated through-holes done at fab time for cheaper than you might think.
Unfortunately, I had to cave in in the end and include two conventional vias, near the FT232 chip, in order to route everything. Putting in manual vias with a bit of wire isn’t a big deal for just a couple of vias, anyway.
* You must use a MAX232A, not a MAX232, since the charge-pump capacitors are only 100 nF.
* Power input autodetection is implemented exactly as it is on the Arduino Duemilanove reference design.
* Most components are standard off-the-shelf things available from the workbench of the well-stocked hardware geek or the local Jaycar, with very few exceptions.
* Those exceptions include the ATMega168 itself, the FT232RL, the voltage regulator IC (If your input voltage is high enough I suppose you could use ye olde 7805 instead of the more exotic LDO regulator, but remember that it has a different pinout.) The FT232RL is available from DonTronics, in Australia.
* I wasn’t sure which P-channel MOSFET to use to switch the USB power rail – it probably doesn’t need to be a big honking TO-220 device, but I couldn’t find a more compact TO-92 device that I could confirm easy availability for (that is, from Jaycar or Altronics or whatever, in Australia). Finding a TO-92 packaged device that takes less board real estate would be nice.
* If you’re using the board as it stands now with the TO220 FET, don’t get the FET and the regulator swapped around! Also, all the capacitors are just identical 100 nF, with the exceptions of the two 22 pF crystal load capacitors and the two large electrolytics in the power supply.
* Also, there is the little fuse included in series with the USB power rail. The Duemilanove reference board includes some sort of little resettable polyswitch-style circuit breaker. I’m not sure where you could source one.
In any case, I hope you like it, I hope you find it useful, and I’d love you hear your comments.