Sunday, February 28, 2016

ATtiny10 Mini Breakout Board

Here is a very tiny breakout board for the Atmel ATtiny10. It's so small, you'll lose it. Literally. I lost one in the carpet and I'm hoping to find it before the vacuum does.

ATtiny10 Mini Breakout Board next to a 5mm LED.

A Tiny Breakout for a Tiny Microcontroller

This breakout board is for the ATtiny10 microcontroller. The PCB is 0.25x0.325" and uses 0.050" header pins. The board could actually be made smaller, but I ran into the minimum PCB size limit on OSHPark. Despite the tiny size, I was able to include a 100nF bypass capacitor, power LED, and a user LED on pin PB1. That pin is also the clock pin for the programming interface, so it flashes when the board is being programmed.

This breakout board might be confused for a bug.

How to Program It

The board is so tiny, it's difficult to use and program. It is certainly not breadboard compatible due to the small-pitch headers. To alleviate these problems, I created a small landing pad board for it. This adapts the 0.050" headers to 0.1" headers. Additionally, the landing pad has a 6-pin TPI programming connector. This allows the ATtiny10 to be programmed with an Atmel ICE. You can also program ATtiny10s with an Arduino and a little extra circuitry.

ATtiny10 Mini Breakout Landing Pad

The landing pad is breadboard compatible, and allows you to power,
program, and use the ATtiny10 mini breakout.

What Can I Do With It?

There are many things you could do with a breakout board this small:
  • Use it to design the world's smallest quadcopter and become a billionaire
  • Build an army of cybernetic bats with ATtiny brains
  • Show it off to your friends and demonstrate your fine soldering skills!
  • Leave off the headers and make electronic fireflies
  • Incorporate it into a project's PCB by adding 0.050" male headers on your board. The ATtiny10 may be tiny, but it has 1k of flash, 4 GPIO, a 16-bit counter, PWM, an ADC, and capacitive touch sensing.

Powering it from miniature BPW34 solar cells. This isn't great for LEDs,
but the microcontroller itself is fully functional.

Assemble Your Own

Here's the information you need if you'd like to assemble your own pint-sized ATtiny10 breakouts.

ATtiny10 Mini Breakout Board: Order PCBs on OSHPark! (select the 0.8mm thickness option)
ATtiny10 Mini Breakout Landing Pad: Order PCBs on OSHPark!

Parts List for Breakout
Parts List for Landing Pad

ATtiny10 Mini Breakout Schematic

ATtiny10 Mini Breakout Board Layout

ATtiny10 Mini Breakout Landing Pad Schematic

ATtiny10 Mini Breakout Landing Pad Board Layout

There wasn't enough space for (readable) component identification in the
silk screen, so here's a picture showing where the parts go.


If you assemble your own ATtiny10 Mini Breakouts, let me know! This board is kind of a novelty, but it's fun to play with a fully functional AVR breakout that is so small.

Thanks for reading!

- Dan W.

Saturday, February 27, 2016

10MHz OCXO Teardown (CTS 1960017)

I recently purchased a case of CTS 1960017 10MHz OCXOs on eBay. They are little 5V units with a sine wave output, and purchased in this quantity, cost $5 a piece. I decided to sacrifice one and open it up to see what's inside. Here are some pictures of the teardown.

Yes, I really meant a "case" of OCXOs. 40 to be exact.

39 of them will be handled with care.

I cut around the bottom of the can, being careful not to go too deep in any spots.
Eventually the can just cracked off in my hand cleanly.


Lots of passive components and a couple of ICs visible from the top of the board.
I always expect to find more inside these oscillator units than I actually do.

The 14SOIC part is an LM2902 quad opamp.
There is also an SC70-5 part that looks like an output buffer.

This small piece of insulation was wrapped around one side of the crystal.

I cut the pins and flipped the board over.
This side is much more interesting!

The crystal is bonded to the ceramic heater board, and that seems to
be glued to the main board.

Now to put it back together. Hmm...

Thanks for reading!

- Dan W.

Thursday, February 25, 2016

LoRa FeatherWing Development Breakout

In this post I will document a LoRa FeatherWing Development Breakout board that I designed for the Adafruit Feather line of microcontroller boards.

LoRa FeatherWing Development Breakout for Adafruit Feather

What is LoRa?

LoRa is an ultra-long range wireless technology that uses sub-GHz ISM bands. It allows the interconnection of small, low-power sensor nodes and Internet of Things (IoT) devices. There are many LoRa transceiver modules on the market from manufacturers such as HopeRF and MicroChip. These modules can be used to connect small, isolated networks of nodes in custom applications. They can also be used to connect nodes to Low-Power Wide Area Networks (LPWANs), such as LoRaWAN.

The choice of module is quite important when designing your project. If you are interested in participating in LoRaWAN, you need to choose a module that is compatible with it. Importantly, significant coding is also necessary to enable the necessary features and functions required by the network. Unless you want to start coding from scratch, you should pick a module with existing library support for whatever development environment you are using.

Check out this great article on The Things Network website that covered various modules and their compatibility. They have documentation on building a LoRa node with an RFM95W module and a Teensy.

HopeRF RFM95/96(W)

The RFM95/96(W) series of modules by HopeRF is a good entry point into LoRa development. There is a substantial amount of documentation, source code, and example projects on the internet to help you get started. Numerous Arduino-compatible libraries have also been developed.

RFM95/96(W) modules can be purchased for as little as $10 from some suppliers. Please read the manufacturer's documentation to become more familiar with them.

As always, low cost comes at a price. The RFM95/96(W) modules interface with a microcontroller over SPI bus plus a few digital I/O lines. If you are interested in LoRaWAN, much of the processing necessary for that is offloaded to the microcontroller and must be implemented in software. By comparison, more complex and expensive modules from other manufacturers do all of the LoRaWAN processing for you, and you merely pass data in and out of the modem.

LoRa Development for Adafruit Feather

I became interested in LoRa technology some weeks ago, and decided to design a small LoRa FeatherWing. I am calling this a "Development Breakout" because it is not entirely ready to use after you solder on the RFM95/96(W) module. My board connects power and the MOSI, MISO, and SCK SPI lines from the Feather to the module. However, there are additional lines that need to be connected based on which library you are using. For maximum flexibility, I decided to break out the DIO, Reset, and SPI chip select pins from the module to a 2x5 0.1" header. This allows you to connect the pins any way you like to the Feather.

The antenna connects via an edge-launch SMA connector. You can select SMA or RP-SMA based on your antennas and requirements.

The example programs I will provide here are compatible with Feather M0, 32U4, and HUZZAH. If you plan to use this board for LoRaWAN, the Feather M0 is required. The LoRaWAN libraries I have seen are quite large, and the 8-bit AVRs do not have enough flash and RAM to support them.

This is only the first board I plan to design. If you want a more polished, ready-to-use board, please stay tuned as the project develops.

Feather HUZZAH ESP8266

I know there will be interest in using this board on the Feather HUZZAH, especially for creating small gateways. I have successfully gotten a Feather HUZZAH to operate in receive mode only, picking up the broadcast strings from a beacon. However, when I attempted to transmit with the Beacon Mode example program, I experienced reset issues on the ESP8266. I'm not sure yet if this is a power issue or an SPI issue, but it will require more experimenting.

Update: Both of the example programs are now compatible with the Feather HUZZAH. A small delay had to be added to the five second wait loop in the Beacon mode program to prevent the ESP8266's watchdog from timing out. Just change your digital pin definitions for the HUZZAH. I found that pins #4, #5, and #2 worked for controlling DIO0, DIO5, and NSS respectively.

Despite compatibility with these simple example programs, the Feather HUZZAH is limited in "clean" I/O pins that can operate as inputs for the DIO lines needed by many LoRaWAN libraries. I am exploring using an 8-bit I/O expander that communicates with the ESP8266 over I2C to enable further LoRa development on HUZZAH.

Shared as Open Source Hardware (OSHW)

LoRa FeatherWing Development Breakout: Order PCBs on OSHPark!

Eagle Files: Shared on Github

LoRa FeatherWing Development Breakout Schematic

LoRa FeatherWing Development Breakout Board Layout

Assemble Your Own

Here is the information you need if you'd like to order PCBs and make your own LoRa FeatherWings.

Parts List:
  • LoRa Module: HopeRF RFM95W or RFM96W (pick the correct frequency for the ISM bands used in your country)
  • RF Connector: SMA or RP-SMA Edge-Launch for 1.6mm/0.062" board thickness 
  • C1: 47uF 1410 Tantalum SMD capacitor, 10V rated minimum
  • C2: 1uF 0603 Ceramic SMD capacitor
  • C3: 100nF 0603 Ceramic SMD capacitor 
  • LED: 0805, color of your choice
  • R1: 680 ohm 0603, or adjust value to change brightness of LED
  • Headers to connect the FeatherWing to the Feather board 
  • Antenna suitable for the frequency range supported by your RFM module
Note: You can do away with the LED and R1 if you don't want an additional power indicator. Also, you might be tempted to do away with the capacitors C1 and C2 to simplify the bill of materials. The RFM module draws over 100mA during transmissions at the maximum power setting, and ramp-up can be quite quick depending on your configuration. I would recommend the extra bulk capacitance on the board, especially if you are loading the voltage regulator on the Feather with other devices.


As noted, this is a development breakout, so you have some additional wiring to do to get the module fully connected to the Feather. I used the following pinout, which is compatible with the example programs I have provided. You can modify it as you like to fit your project or chosen library. The DIO and CS lines from the RFM module only need to go to standard digital I/O pins on the Feather, so you have many options with the 32U4 and M0.

When you try other libraries, you'll probably have to connect more of the DIO pins. Actually, if you look closely in the pictures below, you'll see that I have a different pinout wired up for experimentation. This board is very flexible.

Pinout used in the example programs.

Wiring completed with breadboard jumper wires and a 2x5 0.1" male header.
This allows maximum flexibility to change things, but it's messy.

 Wiring completed with small gauge, solid core wire.
Nice and neat. This is a ready-to-use LoRa beacon!

Example Programs

I debated on which RFM95W Arduino library to use for my example programs. I am aware that many people reading this know a lot about LoRa, have a library in mind, and just need the hardware for the Feather boards. If that's you, awesome. Please enjoy using this board and tell me what you would like to see on future versions. Other people might just need long range wireless connectivity in their project, and don't necessarily want to participate in a LPWAN yet.

I decided to use the RFM95W_Nexus library by Ideetron. This set of code seems to be set up for a specific LoRa development board, but it also has example programs for simple beacon and transceiver nodes operating independently. The portions of code I used don't actually rely on an included library at all, besides SPI. I think this is a great first example program, because it shows you what is actually necessary to drive the RFM module from your microcontroller, without obscuring things into routines. When you get interested in LoRaWAN, the library includes code for that. Additionally, with all of the DIO pins broken out from the RFM module, you can advance to any of the other libraries under development, such as the LMIC library.

The LoRa FeatherWing Beacon Mode program configures the Feather as a beacon that broadcasts a test count every five seconds. This is useful for testing the range of your nodes. The code is very simple, and you will see that modifying the program to send sensor data or anything else you like in the payload is straightforward. Simply load the program, connect a LiPo battery or some other means of power to the Feather, and it will broadcast autonomously.

The LoRa FeatherWing Transceiver Mode example configures the Feather to receive the messages from the Beacon node. There are also functions in there to transmit, so you could modify this into a bridge for long range wireless serial communications. In this example, received messages are echoed across USB Serial, allowing you to verify the receipt of broadcasts from your beacon nodes and test your boards.


The range you can expect from your wireless link is very dependent upon your antennas and environment. Good line-of-sight between the modules is important. Additionally, the frequencies supported by your modules has an impact. Finally, the configuration options you choose for the wireless link will set your maximum data rate, but also affect your range. In the example programs, I set the modules up for 250kHz bandwidth, Spreading Factor 11, and a 4/8 coding rate. These settings favor longer range, with a nominal bit rate of 293bps. Much higher nominal bitrates are possible at the expense of range.

Bandwidth, Spreading Factor, and Coding rate are much too complicated to get into in this article. If you are interested in seeing a separate post explaining those concepts and how they can be use to customize your LoRa FeatherWing project, please let me know in the comments below.

I personally have tested these boards, with the above-mentioned link settings, out to 2.7 kilometers. With a Spreading Factor of 6 (high data rates), I was able to achieve reliable communications out to 500 meters with less than perfect line-of-sight.

Wrap Up

I do hope that you find this FeatherWing design useful. Please let me know if you build one and make a cool project with it, or get it linked into LoRaWAN. Also, please post below any corrections or necessary additions to the information I have presented here. LoRa is very popular in the IoT community, and I look forward to learning from your knowledge and experience in using it.

Thanks for reading!

- Dan W.

Monday, February 15, 2016

HP 5221B Electronic Counter

It is a snow day here, so let's take a break from projects and look at an old Hewlett-Packard frequency counter. I purchased this 5221B electronic counter last year in San Diego from a military surplus store. It is accurate within its limited resolution, the nixie tubes all work, and overall it is in fine shape.

The display on the counter reading out 3.885 MHz.
Who doesn't love nixie tubes and the smell of vintage HP test gear?

The 5221B sitting on top of a Racal-Dana 1992.
I wonder who put the 5 Megacycles sticker on there. It fit the look of the counter so I left it.

The internal 1 MHz timebase of the counter is well within spec:
less than 1ppm out and I have never trimmed it.

It is hard to do nixie tubes justice in a picture. You just have to see them in
person to appreciate the depth and complexity of each digit in the display.

The form factor of the counter is compact and well executed.
(It is also very hard to photograph.)

I would love to see the "Digital Recorder" that attached to this!

Gold-plated pins on the ICs and point-to-point wiring.
Definitely an instrument from another era.

I'll have to get in there one day and check the Sprague capacitors.
I have had bad luck with those in the past.

One thing that cannot be experienced from these pictures is the unit's smell. As it warms up it fills the room with the scent of test gear from days gone by.

Thanks for reading!

- Dan W.

Sunday, February 7, 2016

Quick PCB: Crystal Ladder Filter

Here's a little board for making a four pole crystal ladder filter.

Four Pole Crystal Ladder Filter with SMA connectors

This type of filter has a very high Q and narrow bandwidth, allowing you to select a specific frequency from your signal. Because of the narrow bandwidth, selection of the capacitors and tuning of the filter is important to achieve the desired response. You will want to test your filter after designing and assembling it to verify performance.


Here are some links to cover the design theory. Many more can be found using an internet search.

Schematic of the board

Parts List

Crystals: Standard HC-49 through-hole crystals
C1 through C5: 0603 SMT capacitors
SMA Connectors: Edge-Launch SMA for 1.6mm/0.062" board thickness

If you make some interesting crystal filters with this board let me know!

- Dan W.

Quick PCB: Pi Attenuator

This tiny PCB can be used to make a useful Pi attenuator for your bench.

Tiny RF Pi attenuators using surface mount resistors.

Attenuators are useful when you need to reduce a signal's strength by a specific amount. Flatness of the attenuator's response is very important to ensure predictable signal levels across the entire bandwidth of operation. Maintaining the impedance match is also important. You can buy high quality attenuators from manufacturers like Mini-Circuits, but sometimes it's more fun or more expedient to make your own. Luckily you can make very low-cost, low-power attenuators that will have sufficient performance for general use in your workshop.

Alan, W2AEW, has an excellent YouTube video on the theory of Pi attenuators and how to design them. Check out his video. I'll also post a link to an online calculator to aid the design process.

Pi Attenuator Schematic

R1 is in parallel with R2, and R4 is in parallel with R5. This allows you to get odd resistor values needed for some attenuator designs by placing common value resistors in parallel. The back of the board has a white silkscreen box for writing in the amount of attenuation as a reminder.

Order PCBs on OSHPark:

Parts List:

R1 through R5: 0603 or 0805 thin-film SMT resistors
SMA Connectors: Edge-Launch SMA for 1.6mm/0.062" board thickness

Using SMT components for these attenuators allows you to achieve best performance at higher frequencies. These boards have a generally flat response up to about 2GHz. Be cautious of the signal levels you put through these and the power ratings of the small SMT resistors.

With some of these boards, SMA connectors, and a book of SMT passives, you should be able to handle any low-power attenuation needs that arise on the bench.

Thanks for reading.

- Dan W.

Blog Hits 10k Views + "Quick PCBs"

Last week this blog hit 10,000 page views! That's very surprising to me, as I haven't posted a huge amount of content to date. When I started this, I only got hits when I posted an article on a mailing list or forum. Now, I get a steady stream of views from followers and internet searches. Thank you to everyone who reads my blog. I do hope that the information I present here is high quality and useful.

Most of my posts are lengthy and intended to document a full project. However, occasionally I make small boards that I need for ham radio activities or general lab use. I think some of these would be useful to share in quick posts, even if they aren't as well documented. To that end, I am going to start posting "Quick PCB" articles that share boards you might find useful on your own bench. They will be small, inexpensive PCBs that you can order on OSHPark. I like being able to share boards for my projects, because I think it helps others re-create the work if they find it interesting.

Here's to 100k views!

- Dan W.

Saturday, February 6, 2016

OCXO Upgrade for Racal-Dana 199x Counters

In this post I will document an OCXO upgrade board I made for the Racal-Dana 199x series of frequency counters.

My Racal-Dana 1992 with the OCXO upgrade installed.


I have always been interested in the Racal-Dana 199x series of frequency counters. Though I have plenty of counters already, I was on the lookout for one at a good price to add to my lab. Part of my interest stemmed from the fact that the timebase in the counter is very easy to upgrade, so finding one with the OCXO option was not necessary. Several weeks ago I picked up a model 1992 counter in good shape. It came with the standard XO reference as expected, so I set about designing a small upgrade board.

Gerry Sweeney has some excellent videos on his Youtube channel documenting a very similar project. He created an OCXO upgrade board for his own counter on perf-board that seemed to work well. He also showed how to replace the buttons on the front panel of the counter, which are known to wear out. Thankfully, the buttons on my counter are fully functional (for now).

Check out Gerry's excellent videos on his Racal-Dana 1999 counter:

OCXO Upgrade

Gerry presented a circuit schematic for his upgrade that was very straight forward. For my own board, I used the same LM4140 voltage reference. However, for the control voltage adjustment, I used two resistors and a 20 turn potentiometer in series instead of a single pot. With the values I picked, I have an adjustment range from 0.6V to 3.5V. This works fine for the OCXO I chose, an NDK ENE3311 (datasheet for a similar unit).

The header in the counter where the timebase board mounts is a five pin, 0.1" rectangular male connector with one pin missing. It gives you 5V and Ground and gets 10 MHz back. What could be simpler? I found the mating 5pin connector on Digikey for my board to exactly replicate the original connection.

The 5V rail in my counter is very clean, so I didn't feel it was necessary to do a lot of filtering.

Here's what I came up with:

OCXO Upgrade board schematic.

OCXO side of the upgrade board.

Other side of the upgrade board.

The upgrade mounts exactly like the original timebase, and the trimmer is accessible
through the hole on the rear panel.

Assemble Your Own

If you'd like to assemble one of these boards for your own counter, I have shared the PCB on OSHPark. At current prices, it only costs $16.25 for three copies of the bare board.

Most of the parts can be purchased on Digikey or your favorite distributor. For the OCXO, your best bet is to find a surplus unit on eBay. Purchasing a factory new OCXO will increase the cost of the upgrade by...a lot.

Parts List:
  • OCXO: 10MHz 5V, Square Wave out, 1"x1" standard footprint (example listing on eBay)
  • U1: Texas Instruments LM4140 4.096V VREF SO8 (Digikey listing)
  • R1,R2: 1k ohm, 0603, 50ppm/*C or better preferred
  • R3: 1 ohm, 0603
  • VR1: 5k ohm, 20 turn potentiometer, 50ppm/*C or better preferred
  • C1: 47uF tantalum, 1411, 10V rated minimum
  • C2: 100nF, 0603
  • C3, C4: 1uF, 0603
  • C5: 10nF, 0603
  • Connector: 5 pin 0.1" SIL Horizontal (Digikey listing)

Note: R1, R2, and VR1 values may be adjusted to customize the divider as you like. Using series resistors reduces the adjustment range (giving you finer adjustments) at a degraded temperature coefficient. If you want to use only a potentiometer, place 0 ohm jumpers in the R1 and R2 positions.

A special note about the 5 pin connector: It can be put on backwards! Make sure to test which direction faces down to mate with the pins in the counter before soldering it to the board. If it is installed upside down, the pins will not make solid contact with the header.

Watch the notes on the silkscreen. The OCXO installs on one side, the connector and trimmer install on the opposite side.

TCXO Version?

I was also curious how a TCXO version of this board would perform, so I designed one. Here it is next to the original timebase from the counter.

My own TCXO upgrade board next to the original timebase.

The TCXO performs fairly well. It swings about +/- 30 ppb over a typical warmup cycle. The counter is immediately ready to use from a cold start if I accept that uncertainty. Also, power consumption is low (about 50mW versus 1W for the OCXO). That might be handy if I ran the counter from batteries. (Does anyone actually do that?)

Now the downsides. This TCXO version of the board is actually more expensive than the OCXO version! I had to pop for a really nice $23 VCTCXO to get this level of performance (Connor-Winfield M100V-010.0M). Also, the OCXO I used warms up in less than 3 minutes to an equal if not better level of performance than the TCXO. And of course for long-term stability, and stability over wide temperature ranges, there is no comparison at all. The OCXO wins. Even at the 9 digit resolution of the counter it is noticeable.

So there's really no sense in continuing to explore the TCXO version. Ah well, it is still a nice little board. Maybe I'll find some use for it in the future.


I'm quite happy to have my upgraded Racal-Dana 1992 on the bench. In total, the OCXO upgrade only cost about $26 for a single unit. Though this particular project is wrapped up, I am now working on a similar upgrade for the Fluke/Philips 66xx series of counters.

Good luck if you decide to order PCBs and assemble your own board. Let me know if you need any further details in the comments below. Also, please post any comments or corrections.

Thanks for reading!

- Dan W.

Monday, February 1, 2016

Glass Envelope Quartz Crystals

Here are pictures of some interesting glass envelope crystals I received today in the mail. I'm not sure if I should call them "vintage"; they aren't that old based on the date stamps. Very interesting nonetheless. I hope to use them in a project in the future.

5 MHz Glass Envelope Crystal

Better view of the mount in the 5 MHz crystal

Bottom view of the 5 MHz crystal

25 MHz glass envelope crystal

Back side of the 25 MHz crystal

Bonus: 10 MHz PK-171 crystals

- Dan W.