Hacker News new | comments | show | ask | jobs | submit login
Building a software-defined radio from scratch (electronics.kitchen)
283 points by dominicgs on July 28, 2016 | hide | past | web | favorite | 46 comments



Hey! I'm Lukas, the guy who made this. Just discovered someone posted it on Hacker News, pretty exciting for me. If you want to ask me any questions or make comments, I'm here and on reddit: https://www.reddit.com/r/electronics/comments/4uic5r/sdr_pla...


Just a quick note to say how impressive this project is, and that it was fun to read your detailed writeup. Thanks for sharing, it's inspiring and a neat bit of engineering on a lot of levels. I learn as much from mistakes (usually my own, but sometimes of others) so I'm glad you shared those, too.

One question: If you had to start over on this project, what would you do differently? (I am going to guess you would go straight for a six-layer board rather than 4 to simplify layout...)


Thanks! Actually, doing 4 layers first really helped me save cost on the first prototypes while still allowing me to verify almost the complete design. But that's a difficult question. I think it's inevitable for some things to slip through like they did (the wrong valued resistors...) and 3 revisions to get it right were not that many. One thing I'd certainly do is starting with the FPGA design early on, so I'd not just blindly pick a part that looked suitable like I did this time. That would have also eliminated the mistake where I didn't route clocks to clock capable pins.


Just a technical writing tip, when you are using any sort of acronym that's the subject of the piece it's helpful to do something like SDR (Software Defined Radio), then use SDR through the rest of the text. Either that or do the blog-style hyperlink the first acronym to the wikipedia page or give a footnote.


Thanks -- you're right. I've added a link and spelled it out completely in the first sentence now.


I second this! I understood that it would be something like that from the context, but I didn't knew what SDR meant until I read the comment above. Great work!


Lukas, keep up the fantastic work.

I am blown away that someone your age can master all the expertise needed to implement this. This is very very non-trivial work indeed. At your age I could have put together some silly receiver/transmitter electronics based on schematics copied from an Elektor magazine. But this is mind blowing.

Wishing you the best. You have a great future ahead.


Very nice work. You're going to be faced with some interesting questions over the next few years, such as "WTF am I doing wasting time in this classroom?"


This is seriously impressive! Beautiful work. It's inspiring to see someone bite off a project this large and execute so well!


Thanks for posting details about your experience. I'm a software person learning about hw/FPGAs. These kinds of resources are invaluable!

P.s. it says you are a student. If you want to earn a side income giving virtual classes on PCB design, etc. you'd make a decent side income. Just an idea :p


Didn't like what's already out there? https://contextualelectronics.com/


Thanks for the link. I am interested in such a program but $29/mo for a hobby is too much at the moment. It would be great if there was a free community edition also.

However its good to know that there are options.

My primary concern with signing up for something like this, from a hobbyist perspective, is that these things add up and soon you will be bleeding money without generating any income to cover the expenses.


I was thinking 1 on 1 tutoring. There are already a lot of video resources out there. I wouldn't mind 30-50 bucks an hour for a consultation. Sort of like a fitness trainer for my electronics hobby.


This is a really impressive project, and I am all the more in awe that this guy is only 18 years old.

The project is on Github: https://github.com/FreeSRP Reddit discussion: https://www.reddit.com/r/electronics/comments/4uic5r/sdr_pla...

He's selling a small batch of these for $350 apiece - calling it now, he's going to be very successful in his career.


Thank you for the kind comment. Not selling them yet, though, and the small batch might end up being a little more expensive than that (but I'm really trying to keep it under $400).


I also had done more revisions of the board and spent way more money than I initially planned for... even though in hindsight, having only three revisions for a fully functioning, moderately complex design, with no previous experience working on something like this, probably is not that bad.

Are you kidding? That falls into the realm of superhuman. I've seen 20 year veterans blow a 100 grand and get half that far. I think even Woz would do a double-take.


> Are you kidding? That falls into the realm of superhuman. I've seen 20 year veterans blow a 100 grand and get half that far. I think even Woz would do a double-take.

A high density BGA through an OSH Park board with a homebrew reflow oven and only 3 revs and a stainless stencil on only the last pass? Yeah, that's really quite good.

You practically can't avoid making a mistake on a PCB of that complexity. There are simply too many details buried on too many datasheets and one of them is going to drop.

If you have the time, the best thing I have found for catching mistakes is to have a design review. Even if the person doesn't understand electronics, the fact that you have to walk through every part and explain it to somebody means that you will catch some really stupid things.

However, if you're good and the board isn't too expensive, it's often cheaper just to fab the board. You're time is worth something, and you can be designing something else while the PCB is being fabbed.


That's actually sort of what I did. I didn't explain it to someone else, but went through it in my head, talking to myself explaining the design. Explaining it to someone else must be even better!


Or just a rubber duck.

https://en.wikipedia.org/wiki/Rubber_duck_debugging

Personally I use a cat. Its Steve-Jobs-like attitude seems ideally suited for the task.


Yes, great work! I think of PCB design like golf -- low scores are better, but nobody hits a hole-in-one every time they tee up. 3 revs is shooting par for even simple designs, much less a complex RF design like this.

Having someone else look over the design is always useful. A healthy distrust of datasheets is always useful. But at some point, you have to ask yourself you have reduced the risk of errors enough that a couple of rework wires with get you through debug, at which point just go fab it. Blue wires tack-soldered on are a fact of life in prototyping. It is easy to obsess over PCB designs, but "fail fast" applies here, too.


Awesome project man. I do EE HW design for a living and this I can attest is a hard project. I have a bladeRF and use it regularly. One thing I try to instill in the people that work on my team is that the best attribute you can have and try to foster in your career is not giving up on hard things. So it's great that that is something you have.. To stick with this project for a long time and putting in the time to make it happen. MIT will be a challenge but I'm sure if you stick with it you will end up doing great. Go for something tough and glad you are coming to the US. I have to apologize for politicians that say we don't like foreigners. We do like foreigners and we need them. You will be a great addition to the many awesome people coming here to find there path to great success!


I think the USRP1 motherboard, when I originally used one in 2008, used to be $700 complete/$550 for the motherboard. The price now is $719, but that includes the enclosure, cables, power supply, etc...

I actually cut my teeth on Python learning GNURadio.


That's true, I'll update the USRP price on the website.


I am curious; what would one actually do with this device once it is working?

This is a really neat sounding project.


With 56MHz bandwidth, a lot. You could record and analyze most 802.11 connections (typically 20MHz to 40MHz, except for newer AC hardware that can go to 160MHz).

You could also record the entire FM band in your area at once, all of it. Same with AM and a lot of other bands. It'd also probably work really well for recording things like fire and police bands, with trunking and being able to determine an entire conversation at a time that normally need 2 or more cheaper SDRs to record the trunk and then the channels. That would normally mean you'd probably miss some channels that are at the other end of what you're listening to. It'd also mean you can monitor the entire bandwidth of many of the ISM bands to determine what some misbehaving device is doing.

So many things that I'd love to do with it! I really want one now.


Probably overkill, but I'd love to have at least AM and FM into a box on my network which then splits it up and streams via RTSP+SDP.

Fun fact: The rtl2383 which RTLSDR is based on has an undocumented function to dump an entire DAB+ station (10+ channels) at once. Nothing can demux the resulting file and the DAB spec is overwhelming.


You could also record the entire FM band in your area at once, all of it.

I'm not very familiar with RF beyond the basics, but could you explain simply how does that work? Don't you need to tune into a specific frequency to receive a signal?


Basically a traditional radio would multiply a signal with the frequency you want to tune to and give you the resulting signal which is an audio signal. With an SDR, you can record the actual RF signal and then store/multiply whatever you want to. So you can store everything and later tune to any frequency using software later!


Basically what SDR lets you do (More properly the Quadrature Sampling Detector techniques they use) is record a large amount of radio bandwidth at once. So in this case I could record from 80Mhz to 136MHz. I'd have to then tune in to each frequency on the recorded data, but I'd have the entire spectrum there recorded to play it back later.

It's like recording a bunch of TV channels all at once, and then being able to go back and look at every channel at any given time in the recording.

The bigger issue with this particular device is that almost any antenna you use is not going to perform very well over such a large bandwidth, but that's a much nicer problem to have.


Yea, but if you record the whole spectrum then you can tune frequencies on the recording.

It's a bit like a color photo vs black and white. I don't know if that's a great analogy though.


SDR has a lot of applications in infosec, amateur astronomy, and other signal processing science applications. Check out Balint Seeber's talk at DEF CON 21.

https://www.youtube.com/watch?v=1bgC3AjCnA4

another talk: http://www.rtl-sdr.com/new-talk-by-balint-seeber-hacking-the...


Transmit or receive analog or digital information on just about any frequency : audio/voice (including multichannel), video, GPS, telecommunications, data transmission, synchronization, module configuration, etc. etc. etc.

Sky's the limit.


> Sky's the limit.

Until you get a bigger antenna ;-)


Isn't the FCC the limit?

How much transmitting can you do legally?


You could in theory run an entire GSM base station over it, or use it to recieve television, radio... or use it to mess with airplane communications.

The possibilities are virtually endless, the responsibility is yours alone.


Amazing project!

1. What are your plans for it? Aside from high altitude balloons.

2. Do you plan to turn this into a sort of "shield" add on?

3. What will you work on after this project is done?


Thanks!

Well, I'm currently working on a new version that I'm hoping to sell. I also still need to work on the software.

This won't be an addon, but the next revision will include an expansion header so you can add addons. Should be pretty neat to make an LCD+battery pack "shield" so you can use the SDR as a stand-alone spectrum analyzer.

What I'll actually use it for: I built it because I wanted to learn more about signal processing and the different protocols that common devices use, so I'll be tinkering with all those protocols.

No idea what I'll do after this, maybe that LCD addon I was talking about?


Really an amazing job. Keep feeding your curiosity, it is really worth it and try to travel a bit while explaining your project. Array processing is something that deserves a better look. Many SDR solutions still lack a bit under this point of view. Yet that will be quite useful to have. :)


You should get yourself a nice dish antenna. They are cheap and allow for a lot of fun projects. I sourced a free 10-foot dish with motor (to adjust angle) not long ago. Its gonna be used as a backyard radio telescope of sorts. :)


Lukas, your schematic link seems to be broken on the project site. I have been thinking about doing a similar project with this chipset actually. I really want to put down about or 8 of these ADI parts and actually make lower cost phased array development environment. One day....


That'd be a cool project... The link is working for me, the schematics should be here: https://s3.amazonaws.com/freesrp/prototype-r2/freesrp-sch.pd... Are you sure it's broken?


Your link here, and the link in the article, both work for me.

This is a really nice write up of an impressive project!


Could this project, in theory, be done with a 2-layer (front and back) board? I'm thinking of building a small SoC board... but I don't want to shell out hundreds of bucks (and days of shipping time) for prototype PCBs, but hand-etch them instead.


Its been done, but AFAIK not with hand etching: http://hforsten.com/making-embedded-linux-computer.html

I don't think you can do high frequency RAM lines with hand etched boards or BGA escape routing without vias, but two layer prototype boards are pretty cheap these days.


Is it the truth, or just pure genius? I choose second! What an amazing job, well done!


SDR: Software-defined radio




Applications are open for YC Winter 2019

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: