Why are RF PCBs usually 4 layered?

There are RF based PCBs that are 2 layered too, I accept that but we are not talking about them here, although the answer is simple and universal to actually apply to 2 layered PCBs too.

On Google you will find solutions to this issue like RF signal integrity, interference etc but these are the common answers that you will find on the internet. I will tell you something that I experienced practically while designing.

NOTE: For complex RF circuits there is no way but to make 4 layered pcb because of the routing complexity involved, but when you are dealing with simple rf circuits like subGHz RF frontends like cc1101, cc10L, RF microcontrollers like MKW41Z, MKW21Z or from SAM series from Atmel etc then there is no need to make 4 layered boards but that is where the catch lies and read on to find out about it.

A lot of RF based ICs require 50Ohm impedance tracks. There are some that don’t need it because the matching circuit or tuning circuit is already there inside the module itself (like CC3200MOD), but when working at IC level where you solder RF based ICs with crystals and everything then quite a few of them need the 50 ohm impedance track. This is where it gets interesting.

If you open up any microstrip line impedance calculator (I am using AppCAD) and put in the values then you will realize where the problem lies. Let me explain this to you with an example –

20170307T170345

This is the window where you put in the values for various parameters and the calculator gives you the value of the impedance. The parameters are –

  1. Width of the microstrip
  2. Height or thickness of the PCB(FR4 material to be exact)
  3. Thickness of the copper
  4. Dielectric (which is a constant for different materials, you get to choose from a drop down list below, just choose FR4 )
  5. Frequency (2.4GHz in our case)
  6. Units (mm in our case)

Lets look at common values for a 2 layered PCB design –

20170307T171038

This is the screen shot of the Fusion PCB service from Seeed Studio. The common thickness values for PCB are 0.8 and 1.6mm. The thickness of the copper has options of 1oz, 2oz which translates to 1.4mils and 2.8mils respectively that translates to 0.03556mm and 0.07112mm respectively. Now these are the values that are fixed depending on your fab house, what you can play with is the width of the stripline. So plugging in the combinations you will realize the following –

  1. Length has no effect on the impedance of the strip line (as it should!!)
  2. As thickness of FR4 reduces then impedance reduces.
  3. Increasing the thickness of copper also reduces the impedance (not by much as the change in thickness is not much.)
  4. You can change the impedance a lot by playing with the width of microstrip.

The fourth observation is what is crucial and the cause of problem here!!.

At the optimal values the thickness of microstrip that gives you the value close to 50 ohm is 50.20 ohm at 1.4mm. However 1.4mm is TOO much for thickness for smd capacitor and inductors of sizes 0603 or 0402 or 0201 which are the preferred sizes for tuning circuits. I will show you an image of what a PCB i am designing looks like –

20170307T173952

The thick trace in the middle and towards the end are 50 Ohm impedance tracks. But I have designed it cleverly (the actual thickness here is 1.25mm actually), if you change the trace with to 1.25mm and click on the unrouted wire from the left capacitor to the right capacitor then you will realize that it will short the capacitors terminals!!.

Now if you look at a thickness of 4 layered pcb between the top and the second (Ground) layer, you will notice it is usually from 0.2mm to 0.32mm.

So, if you plug in these values in the impedance calculator you get a significantly lower value for the width of the microstrip!!.

20170307T23044220170307T230952

And that folks is one of the reasons why RF pcbs are 4 layered !!.

 

 

Advertisements
Posted in PCB | Tagged , , , | Leave a comment

1.8V or 3.3V ?

Is it better to run CC2650, CC2640, CC1350 or CC1310 SoCs from Texas Instruments keeping in mind ultra low power and utilizing energy harvesting at 1.8V (but consume larger current) or at higher voltages (like 3.3V ) but consume lesser current?

Well, it depends. The performance will be similar because the core runs at 1.6V !!. It is important to note that the power consumption will be same but you can definitely play around with voltages. However for small energy harvesting devices and space constrained applications it might be a constraint that you don’t get higher voltages like 3.3V. For example, a supercapacitor will discharge from lets say 5V to 1.8V. In that case you are effectively using the capacity from 5V to 3.3V only(C*(V2-V1)), however if you run at 1.8V then you will use its capacity from 5v to 1.8V(which is more than 5V to 3.3V). But you can say that in this case its current consumption is larger. True. But you need to understand and take into consideration the worst case scenarios and edge cases like when the node is sleeping. Then the current consumption is same so voltage will play an important factor and keep your node active(ON) for a larger time!!.

However if you think about it then it is unclear that, although the core is running at 1.6V then suppose at 3.3V if the TX current is 5.5mA then why should it consume more current at 1.8V. I believe that the core consumes effectively the same current, what is happening here is the load that is called the antenna. It needs to radiate a certain amount of energy so that the data actually reaches a receiver at a respectable distance. Hence more current consumption at lesser voltage? Is this theory correct? Please comment below.

Posted in Energy Harvesting, Internet of Things, IoT, Wireless | Tagged , , , , , , , , | Leave a comment

Batteryless Bluetooth Beacons update 2

So, I have been making steady progress with the project. Here are some pictures of the latest stage and some videos showing the Power Management in action. The board has been tested with simple blinky program and a BLE program too. But the code for the sensors is yet to be written which I hope to complete in the coming 2 weeks. Stay tuned and keep making !!

 

(Will add videos after compressing them.)

 

NOTE: The LED has been soldered where there is supposed to be an inductor for filtering the noise and supplying the power to the CC2650 Module. So when the module has been programmed to run at 1.8V then the LED will be desoldered, the programming JTAG wires will be removed, the LDO will be removed from the bottom layer and the inductor will be soldered in its place.

Posted in Uncategorized | Leave a comment

Batteryless Bluetooth Beacon Introduction

Its been a while since i have put up a blog post. All this time i was busy with my next project, a batteryless bluetooth low energy based device. Here is what the prototype looks like (only the BLE part). It has some issues right now that i am figuring out ans will update as soon as i get it working.

cc2650 ble beacon

Posted in Uncategorized | Leave a comment

Self Sustained Wireless Sensor Node for IoT

Finally after through testing i stacked all the modules on top of each other and…… boy, don’t they look pretty 😛  (video coming soon!!)

Visit the Hackster.io project page or my GitHub Project page to access the schematic, layout, Energia code, and the javascript codes.

sswsnIMG_20160320_122648_HDR[1]IMG_20160320_122731_HDR

 

 

 

 

 

 

 

 

For a week i did extensive testing of all the functionalities and gathered nearly 50 screen captures of the waveforms under various circumstances. I studied them thoroughly and was really impressed by the results, the design performed properly in every test. After organizing the test results i will put them online. But here are a few for your viewing pleasure 😀

wf1 wf2 wf3 wf4 wf5 wf6 wf7 wf8 LOADN000 007 000 005

 

Posted in CC3200, Energy Harvesting, IoT, Sensor Hub, WiFi Micro | Tagged , , , , , , , , , , | Leave a comment

Energy Harvesting Shields for WiFi Micro – Part 2

I finally received the components form element14 and in a couple of days i also soldered the ics and the passives etc and did some preliminary tests. I am delighted to tell you that the preliminary tests were a success. Over the next few weeks i will do some more extensive tests to check its performance in various situations and record the performance.

I had never soldered smd ics before (i did solder a few smd sensors, but they were really easy to solder) so when i started soldering the BQ25570 board i actually screwed up 3 of them. It was the 4th and the 5th boards that were successful. Gaining from the experience of soldering BQ25570 i was able to solder BQ25505 in the first go 😀 .

Here are the assembled pieces –

DSC02349DSC02359DSC02338 DSC02357 IMG_20160310_001339_HDR[1]

AND IT WORKS 😀

Web-2

SOME PRELIMINARY TEST RESULTS

I am sorry to say that i forgot to mark the graphs for what measurements they were showing. I will do that when i post the more extensive results.

000 001 003 005 006 007 008

Posted in CC3200, Energy Harvesting, IoT, Sensor Hub | Tagged , , , , , , , , , , | Leave a comment

Energy Harvesting Shields for RedBearLab’s CC3200 WiFi Micro

A little while ago i got really interested in ultralow power applications and Energy Harvesting. After researching for a while i chose to do some projects that exploit energy harvesting. For my parts selection i decided to go with TI’s BQ25505 and BQ25570. I designed shields for my Wifi Micro keeping in mind that my input energy is Solar.

BQ25505  and BQ25570 are specifically designed to efficiently extract the microwatts  to milliwatts  of power generated from a variety of DC energy harvesting, high-impedance sources like photovoltaic (solar) or thermal electric generators (TEGs) without collapsing those sources.

First lets look at the specs of BQ25505 – bq25505

  • User-Programmable Overvoltage Level
  • Internally Set Undervoltage Level
  • Warn Attached Microcontrollers of Pending
    Loss of Power (and disable loads).
  • Integrated MPPT for Optimal Energy
    Extraction From a Variety of Energy
    Harvesters.
  • Ultra-Low Quiescent Current of 325 nA.

The integrated multiplexer gate drivers autonomously switch the system load to a primary nonrechargeable battery if the secondary battery voltage falls below the user-defined VBAT_OK threshold.

Now lets have a look at BQ25570 –

bq25570In addition to the highly efficient boosting charger, the BQ25570 integrates a highly efficient, nano- power buck converter for providing a second power rail to systems such as wireless sensor networks (WSN) which have stringent power and operational demands.

  • Operating Quiescent Current of 488 nA
  • Programmable MPPT.
  • Warn Attached Microcontrollers of Pending
    Loss of Power.

Note: BQ25570 does not have support for multiplexing primary and secondary batteries.

The gerbers have been sent to the fab house to manufacture the PCBs. They should reach me in about a week. Till then keep designing 😀

Once i have thoroughly tested the PCBs i will host the designs on GitHub.

UPDATE:

The PCBs have come , have a look –IMG_20160213_182842[1]

Posted in CC3200, Eagle, Energy Harvesting, WiFi Micro | Tagged , , , , , | Leave a comment

Panelizing and Gerber generation in Eagle

I have been working with Eagle for quite some time but never really got a PCB manufactured. almost all the time i used the toner transfer method to make homebrew PCBs. But then i took a project in which i had to use SMD components and i could no longer use toner transfer method because of the limits on resolution of the Laser printer.

Time had come for “properly” designing and generating “Gerber files”. When you are using toner transfer then there isn’t really a need to go into minute details of every layer as you know what you want exactly, but this approach dosen’t work with the manufacturers. Hence you have to take a lot of precautions and understand what exactly you are doing.

Till designing is okay for most of us. But then i needed to “Panelize” and then create the “Gerber” files.

PANELIZE

This is fairly easy to do. Just save your .brd and .sch files after you are done with the design. After that in the same folder create a new .brd file by doing File -> Your Project -> New -> Board

Now just save this board file without adding anything to it and name it as “project_name_panel.brd”. After that open your project and select the whole board then click on the “copy” icon. After that browse to your panel board file and then click on “Paste” icon. The whole board would be copied. Similarly you can copy “Different” board files(from different projects) into a SINGLE panel board file.

This step is NOT yet complete. Because of what you did just now Eagle will rename the component name so that no two components have the same name. So even if you are not copying a different board but making multiple copies of a single board the names of the components will be changed.

Notice the capacitor on the top in all the boards. They all have different names although they are the same.

without_pan_ulpWhy ? Once the copy is placed on the board, Eagle automatically changes the part names to avoid duplication. Normally this is not a problem, but when you want to panelize a design you want all the panels to come out exactly the same. Some of you might be fine with this but some of you might not be. This especially becomes a nuisance if the board is of moderate to high complexity and has a lot of components. For that we run the “panelize.ulp” ULP. There are two ways to do that –

  • File-> Run ULP -> From the window scroll down and choose “panelize.ulp”
  • Tools -> Panelize -> Execute

correct_with_panNOTE: Run the ULP on a SINGLE layout. Then select the group and copy paste it there itself !!.

You can see that the part names are still automatically corrected by Eagle (bad for us) but the original part names (in yellow) are all preserved (yay!). Now the only thing left is to tell the CAM processor that we want to export the newly created layer (with the same component names) rather than the original ones.  This is how we get the FAB houses to print the same part names on the silk screen !!. We do that in the CAM settings page while running the CAM job OR we can directly edit the cam files!!.

GERBER FILES generation

For that we need to run the CAM processor for generating the Gerber files. I had no idea how to do that. So i searched the net for resources and honestly it was of little help. I definitely learnt a few things but i got more confused. There were quite a few “custom” gerber generating files form Sparkfun and other individuals/institutions. And then there were videos that showed completely different (and possibly outdated) stuff. Then i found that Eagle itself has cam files for generating gerbers. After spending quite some time on it and understanding the steps in the video i thought lets just READ these cam files. So i read the cam files of Eagle and Sparkfun and then i had that moment of epiphany  😀 !. I understood everything properly.

If you open the “gerb274x.cam” in eagle->cam->gerb274x.cam you will notice that its not that overwhelming as you apparently thought it might be.

In a summary it has 5 or more sections(5 if it is the original one and more or less if it is a third party custom gerber generation cam file).

SECTION NAME Layer Numbers Layer Names Comment
1st Component Side 1,17,18 Top, Pads, Vias Do Not Change
2nd Solder Side 16,17,18 Bottom, Pads, Vias Do Not Change
3rd Silkscreen Side(Top) 20,21,25 Dimention,tPlace,tNames  You can change

The Silkscreen part is a flexible one, it depends on what you decide. So after panelizing you should edit the original to 125 i.e” _tNames” layer. OR if you also want to have a silkscreen on the bottom side then you should have layer 126 i.e “_bName” too. Apart from that you can choose any other layer too like dimension layer(21) depending on your needs. So decide carefully what do you want.

4th Solder Stop Mask(Component side) 29 tStopSolder Do Not Change
5th Solder Stop Mask(Solder side) 30 bStopSolder Do Not Change

What are solder masks ?
Solder mask or solder stop mask or solder resist is a thin lacquer-like layer of polymer that is usually applied to the copper traces of a printed circuit board (PCB) for protection against oxidation and to prevent solder bridges from forming between closely spaced solder pads.
solder mask
solder mask 2

Similarly in the custom files there might be additional names or different names for same functions like –

  • Top Layer/ Top Copper
  • Bottom Layer/ Bottom Copper
  • Outline
  • DrillUnplated/ Drill File etc

They might also include the code to generate the drill files too. But the default one in Eagle is NOT in the gerber274x.cam.To generate the drill files you will have to separately run the “excellon.cam” job. Finally when you get all the files you need to view the gerbers in a gerber viewer.

Note: Viewing the gerbers is EXTREMELY IMPORTANT. Do not send your designs without verifying them in a gerber viewer. Check my next post for more info. Till then keep on designing 😀 .

Posted in DIY, Eagle | Tagged , , , , | Leave a comment

Sensor Hub Update

IMG_20151218_004041_HDRFinally my design arrived. Take a look ->

 

 

Apart from the sensor hub i had made 3 other different circuits in the same panel.(Check my Eagle post on how to do that) like this –

panelThis was the first time that i ever got a PCB fabricated in a facility and my first attempt at creating gerbers and all. I realized after getting the PCBs and soldering the components that i has not done the best job but anyways it was a very important learning experience for me. The next PCB would be perfect as i will take extreme care not to repeat these mistakes again. So here is what the bare Sensor Hub looks like –

IMG_20151218_003807_HDRIMG_20151218_003830_HDR

 

 

 

 

 

 

 

Here is what it looks like after soldering –

IMG_20151218_002933_HDRIMG_20151218_002640_HDR

 

 

 

 

 

 

 

This was also the first time i used hot air soldering station and i must tell you it was real fun to use it!!. After that i checked if it was working and thankfully 😛 it did work perfectly. You can get the test codes and the libraries on my GitHub page. Check out my next post on Real Time graphing using the Sensor Hub and RedBear Lab’s CC3200 WiFi Micro.

Till then happy hacking and merry making 😀 .

Posted in DIY, Eagle, Sensor Hub | Tagged , , , | Leave a comment

Running CC3200 on LiPo using TP4056

Looking at the User’s guide its quite clear that you can run CC3200 on 2xAA or 2xAAA batteries and of course on 5v. But it is not exactly clear if it is SAFE to run it on 3.7-4.2 v from a LiPo. Unfortunately the schematic also doesn’t help at the first go. Its fairly complex and uses notations like VCC_BRD, VBAT_CC, VCC_DCDC_3V3, VCC_LDO_3V3 which really do a good job of confusing you more  (I may be biased here but i sure do realize the importance of doing this and actually learn’t a really cool trick employed by TI engineers ! Kudos to the team ! 🙂 ). So yesterday i sat in my club room for about an hour and drew all the power connections on a white board to understand what exactly is going on.

IMG_20151207_200849Then i concluded a few things and after through testing using a multimeter in continuity mode i realized that to run the CC3200 from a LiPo we need to connect the LiPo terminals to 5V and GND on jumper J19.

————————————————-NOTE————————————————-

  • J12 and J13 must remain shorted.
  • DO NOT connect your board to USB power if you are powering it with a LiPo.

———————————————————————————————————-

This was possible because the 5v lines pass through an LDO, TPS 79601. Its dropout voltage is 0.22V hence it can take LiPo’s input and output 3.3V properly !.

Here is the LiPo setup that i have which uses TP4056 to recharge it.

IMG_20151208_101455_HDR[1]This is the final working model –

server-on-offI hope i cleared your doubts and till then keep hacking and learning cool stuff !.

Posted in CC3200, IoT | Tagged , , , | Leave a comment