RF design: Roll your own or get a module - Page 1
Forum section: electronics / projects

author: leppie
author_rank: Frequent Contributor
timestamp: March 12, 2015, 05:04:31 am
content: I have a pet project where I will be using BLE.My concern is if a person that know not much about RF design could reliably create an onboard antenna with correct impedance matching based on literature/application/design notes available?When I looked into RF design, it scared the heck out of me! And I know if something is wrong, I will not have access to any equipment to test or tune it (unless I sell me wife, kid, kill my parents, do a few hit jobs, etc).Just how difficult is this? How easy is it to get wrong? Should I perhaps give it a go? Or should I just stick to a module with everything in it already that has been tested, tuned and likely certified?

author: free_electron
author_rank: Super Contributor
timestamp: March 12, 2015, 05:18:34 am
content: First problem designing the antenna is that you must control the material used for the board. you need to talk to the board manufacturer to find out exactly what material is used , not only in terms of dielectrical constant , but also the exact thickness of core and pre-preg.if you run this board somewhere else : be prepared to alter your layout because not all fabs use the same starting materials.So : for a one off : forget it.Second problem : certification. do anything that transmits and be prepared to deal with FCC and other regulations to get the damn thing certified.Prebuilt modules solve that ( provided you buy 'brand name' modules and not some cheap made in sina clone of a clone of a clone.if you get a bluetooth module form TI or Panasonic or Microchip : those are certified. slap em on the board and done. you ain't going to make it cheaper than that anyway.

author: leppie
author_rank: Frequent Contributor
timestamp: March 12, 2015, 05:26:19 am
content: ThanksI thought as much. It will be a waste of time I could use somewhere else.

author: leppie
author_rank: Frequent Contributor
timestamp: March 12, 2015, 06:22:06 am
content: Quote from: evb149 on March 12, 2015, 05:49:49 amThanks for your replyI have one of those kits. Really good value for money and a nice BLE debugger dongle.I have looked at a few modules, and so far this one seems to cover all the bases:http://www.lsr.com/embedded-wireless-modules/bluetooth-module/sable-x-ble-moduleThe price is listed as ~US$12 on digikey, which seems fair given I dont have to bother with an additional MCU and components. I just need to add power, input and code.My only concern is how to mount such a module on my PCB (pads are on the bottom). I have a hot air rework station, but have not used it much.

author: ccayser
author_rank: Contributor
timestamp: March 12, 2015, 08:53:49 am
content: There are many techniques that you can use. You can carefully add solder paste to your board and distribute it from syringe evenly on each pad. Then you have to line up the module on your board almost spot on and the paste "should" pull the module to its place when paste is starting to melt. It is manageable and I have soldered some BLE113 modules on the board that way. You can also order a stencil for this module(I presume that you have to draw it yourself) and you can apply paste to board with stencil. It applies soldering paste more evenly, but to get it right, might take few test runs in the first place. And if you start to use hot air gun, keep in mind that the board itself needs preheating, otherwise you can fry your module, or mechanically weaken your board. It is not the perfect solution, but it does the trick for small and proto runs.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: March 12, 2015, 09:42:23 am
content: A sardonic opinion:RF these days is a joke.All but the simplest, most austere modulations and protocols are fully implemented digital methods. The basic modulation is usually some combination of PSK/QPSK/QAM. It builds in layers from there: detector, scrambler ("whitening" and/or CDMA), error coding (detection/correction), packetized data, stateful protocols, and often a software stack*. A pain to implement if you so choose (even suitably equipped with an FPGA, ADC/DAC and the necessary radio bits), and rarely documented (or free and/or open).*Which is vulnerable, because pretty much anything that's a SoC (system-on-chip) has one or more processors inside, with masked (hard coded) or Flash (can be updated) ROM inside. And it's all buggy code, written in a hurry to regurgitate the next IoT module onto the marketplace.So, there are strong barriers to entry. And, more now than ever, you simply paste in the little black (or green, or red, or purple) box, and hope it does what you want it to, just that and nothing more...Weird, I don't usually rant so gloomily, even this late at night (early in morning?).Apply grain-of-salt liberally...The sum extent of RF knowledge required is, "put this antenna footprint where we say and it should work". If you can't put it exactly so, you can almost always extend the connecting transmission line's geometry (it's almost certainly going to be a 50 ohm format), or add a connector and extension or whatever. Nothing that would be alien to a design or layout engineer who's been exposed to signal integrity and the like.Indeed, signal integrity, and wideband analog, are harder than RF. RF is generally: either the impedance is close enough you're fine, or it's literally off by half a cycle and nothing works. It's often harder to tweak or fix (have fun stretching PCB transmission line structures..), but it's a two dimensional space (the coordinates on a Smith chart) and that's that. Signal integrity has to do it from DC to light*, so a whole hell of a lot more bumps and dips in the frequency and phase response matter. Wideband has to do that, with much more stringent gain and phase demands still.*The circuit's concept of "light", of course: rise time.So really, which is to say; RF doesn't deserve the bad rap it gets, I think. These days, it's bad, but for reasons much different than "radio" per se. Much the same barriers you'd meet if, say, you wanted to write your own TCP/IP stack from scratch (albeit software only, or an embedded mix). And all the same, if you're comfortable with an off-the-shelf product or standard, you can use that without all the bother.Tim

author: leppie
author_rank: Frequent Contributor
timestamp: March 12, 2015, 09:58:52 am
content: Quote from: T3sl4co1l on March 12, 2015, 09:42:23 amIf I had access to test equipment, I would probably not mind experimenting, but even renting something for a week or 4 will be ludicrously insane. I would rather write a TCP/IP stack in that case

author: leppie
author_rank: Frequent Contributor
timestamp: March 12, 2015, 10:07:28 am
content: Quote from: ccayser on March 12, 2015, 08:53:49 amThanks for the advice. I will read up on that

author: nctnico
author_rank: Super Contributor
timestamp: March 12, 2015, 11:59:28 am
content: Quote from: free_electron on March 12, 2015, 05:18:34 amCome on it ain't that hard. Usually a circuit is made on FR4 so take into acount a 10% tolerance on dielectric constant, etc. If the transmission range is affected too much by this amount of tolerance the design isn't going to work reliably anyway. In other words: manufacturing tolerances are not going to determine whether a circuit works or not.There are simple techniques to use either a, piece of wire, chip antenna, helical antenna (can also be implemented in a PCB!) or a simple L shaped antenna. Most of these antennas will need impedance matching circuits which will take some trial and error to get the antenna to resonate at the desired frequency. What is needed is a spectrum analyser (preferably with tracking generator), RF generator (in case of no tracking generator) and a directional coupler.There is a lot of reading material available on this subject. It's not black magic.Using a module is easy but even when using a module certification will be necessary for a commercial product.

author: G0HZU
author_rank: Super Contributor
timestamp: March 12, 2015, 10:20:10 pm
content: QuoteIt's embarassing isn't it?The negativity (and obvious inexperience) in some of the replies here is painful to read... It's almost like they are thinking "I think I know something about it so I'll say it's very fiddly and difficult and not worth attempting"

author: Howardlong
author_rank: Super Contributor
timestamp: March 12, 2015, 10:45:41 pm
content: Quote from: G0HZU on March 12, 2015, 10:20:10 pmWell, I am on the fence on this, I am currently on my fourth layout of a board and it's really starting to bug me, it's an embedded WiFi device with an entire IP stack on it, and I can't even get the chip's reference oscillator to work consistently! (Although I am pretty sure the problem is due to power supply layout rather than an RF problem)Running a bit of microstrip should be reasonably easy, there's online calculators for that stuff. But what is important is that each board house has their own prototype service standard layer thicknesses, so you can easily knacker your impedance matching on a multilayer board jspist taking a generic reference design. On two-layer, it's much simpler, as long as you keep the right thickness, but with the miniaturisation of stuff nowadays, nobody wants a 3mm thick transmission line.However what's not quite so nice is designing your own antenna. That stuff is definitely an art. I did quite a few designs of my own about 15 years ago on L and S band, and learned an awful lot. Having a VNA on hand to measure my creations was without doubt an incredibly useful learning tool, but it is no doubt an expensive tool. Without such equipment you are relying on a lot of random tweaking.Another example is matching filters. While there are tools to do impedance matching online without the need to resort to Smith Charts etc, sometimes not even data sheets can be trusted. SAW filters for example are particularly bad in that regard. Either you can semi-randomly go through your L and C lab kits, or you can measure the device in situ in a board and calculate the required matching. Without the right oarts to within 5% or so your SAW filter will likely be quite an effective attenuator.But yes, something as simple as moving the antenna a little should just be a matter of extending the 50 ohm transmission line... assuming it is 50 ohms, and it's not part of some kind of transmission line matching section, and the antenna is expecting 50 ohms!

author: G0HZU
author_rank: Super Contributor
timestamp: March 14, 2015, 04:01:08 pm
content: QuoteThe popular antenna choice for this stuff is the inverted F antenna. There's loads of info about these antennas on the web and in various books etc. One could argue that there is an art in producing the original reference designs but these antennas have a fairly wide bandwidth and will be fairly tolerant of the PCB layout and materials used.I don't think the PCB thickness (or even achieving a specific dielectric constant at 2.4GHz) will be that critical because the radiating element will be on a single layer of copper. Sure, the dielectric will affect it a bit in terms of tuning but unless you are trying to make a reference design to critically test and 'design centre' in something like a Stargate 64 chamber then I don't think it matters much. This is just Bluetooth. A typical antenna design will not achieve an omni radiation pattern but as long as the return loss is reasonable then the antenna will work. I would recommend making the main strip section of the antenna a bit too long and then trim it with a scalpel.i.e. choose a proven reference design and try and use a fairly similar PCB thickness and reasonable quality FR4 with similar dielectric constant and make sure that the ground area adjacent to the antenna is the right size and shape as per the reference design.For a budget of a few hundred USD it would be possible to lash together a reasonable test jig using something like an ADF4350 EVAL signal source, LPF, 2.4GHz coupler (bought from ebay?) and an EVAL log detector PCB like the AD8313 or something similar from Hittite.

author: Howardlong
author_rank: Super Contributor
timestamp: March 14, 2015, 04:56:28 pm
content: To tune my first antenna attempts on 2.4GHz 15 years ago, I used a £30 channel tuneable CCTV transmitter for a signal source and a £150 Daiwa CN-801S SWR meter. By tuning the CCTV channel manually across the band, and measuring the SWR, you can figure out if you need longer or shorter (or it's a mess!)