# From Milk to Direct Conversion in a Software Defined Radio

Discussion in 'Amateur Radio News' started by VK6FLAB, Jun 22, 2019.

Tags:
1. ### VK6FLABHam MemberQRZ Page

From Milk to Direct Conversion in a Software Defined Radio

It seems my analogy with milk glasses hit a nerve when I explained some of the inner workings of a simple Analogue to Digital Converter, also known as an A/D Converter or ADC as part of my exploration into Software Defined Radio. Thank you for your comments, suggestions and corrections.

I did make an error when I said, grab eight of them and you'll have a byte, I'll get into that. Thank you for pointing it out.

With my milk glass analogy, if you missed it, without naming it, I drew a picture explaining how a flash or direct-conversion ADC works. Briefly, I said that if you were to pour milk into a glass and continued to do that until you ran out of glasses or milk, you'd have converted a signal into bits. I also covered how a partially filled glass was neither full nor empty and if you ended up with milk all over the desk you wouldn't know how much there was.

In terms of electronics, how does this actually work?

In essence you're comparing a reference voltage against your incoming antenna signal. The way that happens is you have a series of resistors between ground and your reference voltage. For simplicity, lets say five identical resistors against a reference of 5 Volts. The result is a series of steps of voltage. At the first resistor the reference voltage is 1 Volt, at the second, it's 2 Volt and so on.

If you were to compare your antenna signal at the first resistor, you'd compare it against 1 Volt and your antenna signal might be higher or lower. If it's higher than 1 Volt, we'd record a full glass or one and if it's lower we'd record an empty glass or zero.

This is done with a nifty circuit called a comparator that compares two voltages. If the signal is higher than the reference, it returns a one and if it's lower, it returns a zero. If that sounds familiar, an op-amp does a similar thing and if you're wondering, a comparator is an op-amp without a feedback resistor.

In a circuit diagram you might see a triangle with two voltages coming in, the one you're measuring and the reference voltage with a single output that's either zero or one. Inside that triangle, which you can purchase as a component for cents, you'll find the whole circuit that makes all this happen.

I'll acknowledge there is an opportunity here to go into how an op-amp actually works, how it slightly differs from a comparator and more, but we're talking about an Analogue to Digital Converter, which in turn is part of a discussion about how a Software Defined Radio works, so I'll leave the circuit diagram and building an op-amp from basic components for another time.

One thing to note though is that this type of ADC is essentially independent of frequency, it's a direct-conversion ADC and the speed of sampling is determined later on in the process.

Back to comparators. We have several of these, each comparing the incoming signal against a stepped reference voltage. In actual fact, if you're doing 8-bit sampling, you'd need 255 of these comparators, if you're sampling at 16-bits, you'd need 65535 of them.

As I explained with glasses of milk previously, you'll have interesting results if the voltage you're measuring is between steps. You could increase the number of steps and measure more accurately, but as I said before, you're only kidding yourself if you think that solves the actual problem.

In the same way, if the voltage you're measuring is higher than the total reference voltage, you're up the creek without a paddle and you won't know what happened, unless you saw magic smoke appear, in which case you know that lightning probably struck somewhere nearby.

You could increase the reference voltage, like making the glasses bigger, but that's actually making it worse, since we now have bigger steps between each measuring point.

So, a flash ADC is a series of comparators which compare an incoming signal against a reference voltage and returns a series of bits that digitally represent your signal.

The final piece of the puzzle is how we get from the bits coming out of the pile of comparators to the byte going into your computer. Basically we're tallying each bit, that is, we're counting how many there are and returning the number as a value to the computer. The speed of this counting process is what determines how fast we can measure our signal.

Did I mention how deep the rabbit hole goes? Amateur Radio for me is the gift that just keeps giving, more to find every time you look.

I'm Onno VK6FLAB

This article is the transcript of the weekly 'Foundations of Amateur Radio' podcast, produced by Onno (VK6FLAB) Benschop who was licensed as radio amateur in Perth, Western Australia in 2010. For other episodes, visit http://vk6flab.com/. Feel free to get in touch directly via email: cq@vk6flab.com

If you'd like to join a weekly radio net for new and returning amateurs, check out the details at http://ftroop.vk6flab.com/, the net runs every week on Saturday, from 00:00 to 01:00 UTC on Echolink, IRLP, AllStar Link, Brandmeister and 2m FM via various repeaters, all are welcome.