Showing posts with label electronics. Show all posts
Showing posts with label electronics. Show all posts

Saturday, 3 August 2013

Texas Instruments CC Debugger

Texas Instruments offers great tools to get you started on their zigbee like wireless transceiver line.
CC Debugger and Smart RF studio.
You can buy a CC debugger for about 48$ at the Ti webshop, but where is the fun in that?
Luckily Ti provides the schema files , boot loader and firmware for the CCDebugger, so you easily can build one yourself.
I even found the gerber files for the product on the internet and ordered a batch of 10 pcbs from Itead.
I don't need them all, but this is their minimum order size.

What can you do with this tool?
The debugger helps you to evaluate signal strength , configuring the wireless modules and explore different configurations.
The modern Zigbee devices are incredibly powerful cheap but also very complicated.
A tool which helps you getting started is most welcome. 

The build of the toll was not really challenging but the programming gave me headaches for a while.
After I soldered the components to the pcb, I plugged the board into an usb slot.
Both leds lid up which means according to the manual empty controller.
So I had to load the boot loader into the CC2511 controller chip.
To do so you either need a  (programmed) CC Debugger or some fancy expensive dev board from Ti .
Luckily I own a Goodfet tool.

I fired up the console and connected the CC Debugger to the Goodfet.
The first step is to check if the programmer recognises the module 

> goodfet.cc test


SmartRF not found for chip 0x9104.
Tracing execution at startup.
Verifying that debugging a NOP doesn't affect the PC.
Checking pokes to XRAM.
Done.

Great, success.
Next step programming the bootloader




> goodfet.cc flash ../../../../usb_bootloader_srf05dbg.hex

SmartRF not found for chip 0x9104.
Flashing ../../../../usb_bootloader_srf05dbg.hex
Buffering 0000 toward 000000
Buffering 0100 toward 000000
Buffering 0200 toward 000000
Buffering 0300 toward 000000
Flashing buffer to 0x000000
Flashed page at 000000
Buffering 0400 toward 000400
Buffering 0500 toward 000400
Buffering 0600 toward 000400
Buffering 0700 toward 000400
Flashing buffer to 0x000400
Flashed page at 000400
.....
Flashed page at 001000
Buffering 1400 toward 001400
Buffering 1500 toward 001400
Flashing buffer to 0x001400
Flashed final page at 001400

Done, the rest is easy.
Start Smart RF Studio from Ti , plug in the CC Debugger and Smert RF Studio will program the device for you. Great!!!

Figuring out how to program the device took me a while, I even killed one CC2511 but once you figured it out all becomes so easy,...
Debugging the chips using the Goodfet is also possible, but Smart Rf Studio is way simpler and has a Gui.
I admit I am lazy,...

CCDebugger board top side
CCDebugger board bottom side


Links:
CC Debugger
Smart RF Studio
Goodfet

Tuesday, 30 July 2013

Arduino Video Overlay Shield

In 2011 I won a free pcb from Dangerous Prototypes, a Arduino shield you can use to overlay and display data on a video stream.

The Arduino Video Overlay Shield is based on the MAX7456 on screen display chip.
The Arduino compatible shield board overlays text on analog video, therefore
it allows easy overlay of text onto an analog video signal, NTSC or PAL.
Just plug it on an Arduino processor board to get started.
The shield is created by Lowvoltage Labs.

 I wanted to use it to display the subject line and address  of incoming emails while watching tv.
Another use could be a osd system to display flight data on rc planes.

Unfortunately the board needed a 27 Mhz crystal and I could not get my hands on one.
As soon I got one I could not find the board anymore,...
Meanwhile I found it and finally assembled it. The board worked out of the box, except the processors character set is Japanese by default! Luckily I could find a European standard Ascii character set and some code to upload it. The character set text file size is 170 kB and the upload took about three minutes.

Now the hello world output does not look so strange anymore.
A fine board and a interesting new chip, what could you possibly ask for more ?

One final but important note, do not forget to insulate the osd output plug, because it will most certainly short out on the Arduino Usb plug.

Osd shield ready for action
Osd shield top side
Osd shield bottom side, please do not forget the insulation on the video out side plug
Hello world test osd over webcam input


Links:
Dangerous Prototypes Video Shield Announcement
Lowvoltage Labs
Seeedstudio sells assembeled boards
MAX7456 datasheet
Wiki entry
Arduino forum thread

Monday, 29 July 2013

3 Ghz counter and power detector build Part IV Putting the counter into service

After I had soldered the remaining parts like missing passives the lcd display and user buttons the build process was finished.
Before applying power I measured the resistance of the power lines  and some other important points to ensure there are no nasty shorts hiding somewhere.

The big moment applying power.
Nothing except a short blink of the lcd back light happened .
Hmmm
Soon I figured out there is a very nice software power switch  implemented.
You need to press the ok button to switch the unit on.
Very nice, I will implement that logic in my own designs too.
Power switches are so outdated.

So the unit works. As a first test I measured the power and frequency of an fm test generator.
Without calibration the frequency part worked ok but the power measurement was of by 3 db.
To calibrate the unit I need access to the university test lab, which I don't have until September.

First impressions, pros and cons of the unit:

Pros:
Very nice power on design
Usage of qfn components I lover to solder fine pitched smd devices
Cpld design
Open source software for the microchip and the cpld

Cons:
A usb port to export data is missing
The displayed frequency is always drifting
No gate time setting
Silk screen of pcb is horrible , very fuzzy and partly unreadable (the manufacturer promised to take care of this problem though)

In the end I am unfortunately disappointed of the unit.
On the other hand it still will be a help in the spectrum analyzer build process.
I am also thinking about implementing an serial output.
To log the data in a computer could be a big help. You could for example plot the frequency versus power output of a device and visualize the stability of the power in a given range.

Finally the counter in action (Please excuse the flare on the lcd)


Links:
3 Ghz counter and power detector build Part I
3 Ghz counter and power detector build Part II
3 Ghz counter and power detector build Part III
Elektor project page


Sunday, 28 July 2013

3 Ghz counter and power detector build Part III Cpld

The counter not only has a Dsp that needs programming, there is also a Cpld.
Cplds (Complex Programmable Logical Devices ) are very interesting parts.
A Cpld gives you the possibility to create your own integrated circuit.
In a very simplified explanation I would say they are made of thousands of gate arrays and configurable wires which connect between the gates and the pins.
Programming a Cpld is more like routing a pcb than programming a microcontroller.
A common language to describe your circuit is VHDL (Verilog Hardware Definition Language).

Cplds and Fpga (Field Programmable Gate Array) are very powerfull devices.
They can process tasks massively parallel are very fast but also expensive and tricky to program.

Programming a Cpld is usually done via Jtag interface.
I downloaded the Altera programmer and used a 5$ Jtag programmer clone of the Altera Usb Blaster.

Everything worked immediately .
The last step of the counter build is to add the rest of the passive components.

Successful programming of the Cpld
Links:
3 Ghz counter and power detector build Part I
3 Ghz counter and power detector build Part II
Elektor project page
Altera Homepage

Friday, 26 July 2013

3 Ghz counter and power detector build Part II Troubles programming the Dsp

When I populate a new pcb I first solder the chips with the smallest footprints.
Next in order are the bigger ics and power supply chips.

Then I make a break and program the controller.
To program a Pic chip you just need the chip, some decoupling capacitors a pullup resistor  on the reset line and the three programming data lines MCLEAR (reset line),PGC,PGD.
Usually pic chips are super easy to program, compared to the Atmel Avr line they even don't need an oscillator.

So with high hopes I started  the Microchip ide Mplab, connected the programmer to the board (using pogo pins to avoid solderin a connector) and clicked the connect menu entry.


Connecting to MPLAB ICD 2
...Connected
Setting Vdd source to target
ICDWarn0020: Invalid target device id (expected=0xF0F, read=0x0)
...Reading ICD Product ID
Running ICD Self Test
... Failed Self Test.  See ICD2 Settings (Programmer->Settings) (status tab) for details.
MPLAB ICD 2 ready for next operation

Hmmmm
At least one head scratching hours later, no difference.
The Dsp chip simply told me in this working environment we ar on strike, go f*** yourself.
Now what to do if a processor is in working refusal ?
The best way is to negotiating with their local labour union boss, the datasheet.
In a good datasheet there is often a minimal working environment section and voila there is a strange pin number 7 called Vcap/Vdcore.

Hmmmm

After further reading I understood the internal core runs on 2.5V and to avoid an extra power line the chi provides an internal regulator which needs a decoupling capacitor.

Next try:

Connecting to MPLAB ICD 2
...Connected
Setting Vdd source to target
Target Device dsPIC33FJ32GP204 found, revision = Rev 0x3006
...Reading ICD Product ID
Running ICD Self Test
...Passed
MPLAB ICD 2 ready for next operation
Programming Target...
...Validating configuration fields
ICDWarn0046:  Because clock switching is enabled, MPLAB ICD 2 requires the user to cycle target power after a program operation.
...Erasing Part
...Programming Program Memory (0x0 - 0x54FF)
Verifying...
...Program Memory
...Verify Succeeded
...Programming Configuration Bits
.. Config Memory
Verifying configuration memory...
...Programming succeeded

BOOOOOM
Success, the chip is now programmed.
Now that was some heavy lifting , usually troubles appear from the most unexpected direction.

Time for some pictures:
Dsp processor

PLL chip very small footprint

 Log Power measurement , Cpld and Pll chips

Links:
3 Ghz counter and power detector build Part I
Elektor project page

Monday, 22 July 2013

3 Ghz counter and power detector build

To measure the output of the phase locked oscillators for the spectrum analyzer I needed a fairly accurate frequency counter.

I test a counter usually against my 10 Mhz rubidium source.
Neither a cheap 1 Ghz counter from China nor a self built counter built around pic micro controller produced good results. They were way of,...

This new project which I found on the Elektor homepage raised my curiosity.
Usually I don't like Eektor projects that much,  they tend to use the most expensive components but then deliver a mediocre circuit that does not make use of all the bells and whistles this components could deliver. On the other hand I like the magazine and always  hope this time they hit gold.

First for pre scaling (dividing the input signal down) it uses a cheap pll chip instead of an expensive dedicated pre scaler. (nice!)
Second as counter it uses a CPLD device and provides the VHDL (Verilog hardware description language) sources.
Third it uses a 0.5 ppm crystal oscillator as reference.
Forth it can measure the power level but unfortunately only within an accuracy of 4 db (if the frequency is modulated). I can live with that, power meters almost always have trouble with modulated sigbak sources .

I ordered an empty pcb, luckily I already ad most of the needed parts in my lab.
In the build process I first populated the most difficult parts like the qfn power detector, the input amplifier and than the rest of the integrated circuits.
Then I soldered the passive components.
Afterwards the big components like the display were soldered.

Before power up I checked for short circuits.

Next step is programming the Cpld and the Dsp about which I will tell you in another blog post.


Counter function blocks
             1) Hf input
             2) Dc input
             3) Battery input
             4) Input splitter (Log detector, Counter)
             5) Log Detctor
             6) Preamp
             7) Pll (prescaler)
             8) Oscillator
             9,10) Linear regulators
             11) Reference
             12) Polyfuse circuit protection
             13) Jtag disable
             14) Jtag (Busblaster programmer input)
             15) Icd (Dsp programmer input)
             16) Cpld
             17) Dsp

Links:
Project link



Sunday, 21 July 2013

Meet the Lpcxpresso

Embdedded Artists did an awesome job around the Lpc Arm processor line from Nxp.
32 bit Arm processors are now  available and affordable for everyone.
All you need is some fundamental C experience, an Lpcxpresso board and to read the Embedded Artists tutorial.

For example I read the I2C tutorial section, hooked up an Lm75 I2C temperature sensor and understood enough about the usage of I2C to write my own character display library based on an Newhaven I2C display.

The productivity using this tool set can be breathtaking.
You use templates from Embedded  Artists, expand the code debug it and you are done.

The code red ide is based on Eclipse so you really get a nice development environment.
There is a huge user base on the Internet and some really great forums.

The debugger works great and you always see what is going on with your source code.

For my hardware designs I meanwhile use only controllers from Ti and the Lpc line if I need 32 bit power. I don't want to work without a decent debugger any more.

In the moment I use the following boards:
LPC1115 board
A Arm cortex M0 processor with 64kB flash and 8kB data memory

LPC1669
A Arm cortex M3 processor with 512kB flash and 64kB data memory
It has a built in Ethernet and can interface and offers tons of features.

I also bought the Lpcxpresso experiment kit, which offers example hardware and software to try the most interesting chip features out.

Once I figured the user rights management on my private git server out, I will provide some example code I wrote for this processor, like my lcd library.

LPC 1115 and Lm75 sensor on a breadboard


The new Jtag V2 interface

Lpcxpresso experiment kit



Links:
Embedded Artists
Lpcxpresso experiment kit
Code Red Ide
Nxp
User Forum

Saturday, 20 July 2013

Spectrum analyzer Part IX High Voltage Supply

The workhorses of the spectrum analyzer the phase locked oscillators (PLO) need a control voltage greater than 20V. Scotty's controller pcb already has a switching converter section, but there were some problems  reported on the newsgroup. So Sam Wetterlin designed a new stand alone module for this purpose. It is a switching style design, but creates very little oscillator ripple at its input and output, and little radiation, though it still should be encased with a fence. 

Since I was lucky and got my hand on a pcb set which included also some Wetterlin pcbs I decided to use his design on my analyzer build.#

Soldering the module was pretty much easy and the module worked immeadetly.

#s
Sam Wetterlin's HV module
Links
HV Module Schema File
Pcb files
Sam Wetterlin Webpage


Spectrum analyzer Part I Controller board
Spectrum analyzer Part II Phase Detector
Spectrum analyzer Part III ADC 16
Spectrum analyzer Part IV Logarithmic Detector
Spectrum analyzer Part V Master Oscillator
Spectrum analyzer Part VI DDS 
Spectrum analyzer Part VII The Frame

Spectrum analyzer Part VIII The Mixer Modules 

Friday, 19 July 2013

Spectrum analyzer Part VIII The Mixer Modules

Friday morning the perfect time for a new Spectrum Analyzer build entry.

This time the four mixer modules are finished.
There is unfortunately not much to tell, except since one of them (Mixer 1)  is directly coupled to the input stage, shielding is important.

Mixer 1 is responsible for the input.
Mixer 2 is placed directly behind the cavity filter.
Mixer 3 is responsible for the tracking generator output.
Mixer 4 is needed for the Vna functionality.

Since I am building the full blown analyzer, I had to build all four of them.

Mixer 1 to 4 with brass shielding and matching lids





Links:
Spectrum analyzer Part I Controller board
Spectrum analyzer Part II Phase Detector
Spectrum analyzer Part III ADC 16
Spectrum analyzer Part IV Logarithmic Detector 
Spectrum analyzer Part V Master Oscillator
Spectrum analyzer Part VI DDS 
Spectrum analyzer Part VII The Frame

Saturday, 13 July 2013

Sorting, sorting , sorting


Usually I store my resistors in a zip bag and there is always the worry  if I already own the right ones for a certain project.

More than a year ago I bought three smd component storage boxes and started to sort my 0603 resistors.
First you have to label all the compartments and then you fill them up with resistors.
Great care is to be taken, wrong placed resistors have to potential to sabotage you project.

Sorting the 0603 resistors was really not a project you would write home about.
But the resistor box turned out extremely useful.
In fact so useful I would not miss this box anymore.
By the time (> 1 year at least) I also forgot about all the hassle.
So I decided today it is time to fill another box, this time 0805 resistors.
To get an idea of the project, i own meanwhile more then 10k of 0805 resistors with about 170 different values.Eight back aching hours later, I finally sorted them in !!!

 
Very useful storage box

more than 10.000 sorted resistors

Friday, 12 July 2013

How to solder QFN chips like the MSP430FR5739

The new MSP430FR chip line has interesting features like embedded non volatile fram and ultra low power consumption. The chip is available in TSSOP38 or QFN40 package.I simply had to try them out.

Usually hobbyists  are repelled by the very small case and the missing pins.
But once you get used to work with the QFN package you start to prefer it over any other packaging.
Since they have no visible pins, they cannot suck the solder up via capillary suction and create ugly shorts.

To solder a qfn chip you buy a breakout board and put a small amount of solder paste at the pcb.
Beside the solder paste you add some solder flux (very important).
Then you place the chip on the board and roughly align it.
With an heat gun you slowly heat the chip and board until the flux starts to melt.
This is a very important phase because the chip will swim on the fluid and align itself correctly.
Now heat it up until the solder past melts and you are done.

The next problem you will face is how to check the correct alignment and if all pins are correctly connected to the board.I use a multimeter for that purpose. Usually the pins have a certain resistance around 5k to 1mega ohm. Measure all pins and if there are shorts suck them away using some solder wick.

Once you get used to Qfn packages and are able to solder the chip  correctly it will only require about two minutes of your precious spare time. Soon you will start to enjoy working with Qfn packages.

MSP430 in QFN package compared to a Dil20 chip

Links
MSP430FR5739
Fram
Demo video

Wednesday, 10 July 2013

Spectrum analyzer Part VI DDS Module(s)

Description (copied from Scotty's web page)

The DDS module is designed and configured with a filter and squaring circuit in the DDS A path.  The filter shown is a 10.7 MHz crystal filter with a 15 KHz bandwidth.  
The squaring circuit of U3 will output a CMOS level, capable of driving a 50 ohm line (J4).  
J3 output is an unfiltered output of the DDS B and will contain all harmonics and aliases of a normal DDS output.  Its output power level is approximately -8 dBm.
For best results, the Clock Input at J1 should be a 5 volt peak to peak square wave, but it will operate at a much lower input.  R3 determines the input impedance of the module.  The input clock frequency must be between 1 MHz and 125 MHz, although the AD9850 is somewhat underrated.

Build process

Soldering the dds chip is somewaht tricky, good magnifying glasses are a must.
Since the DDS chips are serially programmed, I use a different pcb (which I got in a group buy) with only 5 inputs.I think it was routed by Sam Wetterlin but I am not sure.
Studying the schema carefully is highly advisable since there is always a chance that components are placed in a different location.
Because I am building the complete" analyzer, I had to solder two of this modules, the second one is used in the tracking generator.

One of the coming blog posts will be about testing the DDS module and how to shield a Slim module properly.



DDS module rev D with serial input only

 Links:
Spectrum analyzer Part I Controller board
Spectrum analyzer Part II Phase Detector
Spectrum analyzer Part III ADC 16
Spectrum analyzer Part IV Logarithmic Detector

Spectrum analyzer Part V Master Oscillator

DDS Module

Spectrum analyzer Part V Master Oszillator

Description (copied from Scotty's web page)

The Master Oscillator, contains a 64 MHz oscillator and 3 buffered line drivers.
Each output is 5 volt CMOS that can drive a 50 ohm line that is terminated with either, a high impedance load, or 50 ohms.  A 33 ohm resistor is shown as a series element in each output.
The frequency will drift with temperature. I was able to test only one sample. It had a positive frequency/temperature coefficient of .15 parts per million per degree F (9.6 Hz / 1 deg F)

The build was fairly easy you just have to take care of possible cold solder joints around the crystal oscillator. This kind of packaging easily produces cold solder joints.

Since the unit is already tested I already shielded it.

Master Oscillator rev B

MO back side

Side view of shielded oscillator
 Links:
Spectrum analyzer Part I Controller board Spectrum analyzer Part II Phase Detector   Spectrum analyzer Part III ADC 16 
Spectrum analyzer Part IV Logarithmic Detector 

Master Oscillator 

Tuesday, 9 July 2013

Spectrum analyzer Part IV Logarithmic Detector

Description (copied from Scotty's web page)

The 8306 Log Detector Module has a dual function.  It is used as a detector to convert RF power to DC voltage (RSSI).  And, it is used as a high gain, RF limited amplifier.
The module has an input impedance of 50 ohms (J1) and a bandwidth of  3 MHz to 160 MHz.  
The RSSI dynamic range is -90 dBm to +10 dBm, with a DC output of +0.4 volts to +2.4 volts, on J2, "MAGVOLTS".  The Limited I.F. Output (J3) is a 50 ohm source with 50 mv peak to peak output.  
The limiter input dynamic range is from -77 dBm to +10 dBm.

Log Detector Rev 0


Build process

So far the Log Detector was one of the easiest modules to solder.
The only problem was to get hold of T1 but fortunately Coilcraft was kind enough to send me two pieces.

Once the module is thoroughly tested and confirmed working it is very important to shield this kind of units properly. 

 Links:
Spectrum analyzer Part I Controller board
Spectrum analyzer Part II Phase Detector  
Spectrum analyzer Part III ADC 16

Log Detector Module
 

Spectrum analyzer Part III ADC 16

There are two Slim modules for the ADC section.
Their main difference is resolution one delivers 16 bit the other module 12 bit.
Although the 12 bit version is cheaper and has a way easier to solder footprint, I choose the 16 bit version.
 
 Description

The ADC-16 is a dual 16 bit, serial, analog to digital converter, using two AD7685's.  
There is no manual adjustment to set the A to D range.  It is not needed to obtain excellent resolution in the MSA and VNA systems.  Each ADC will digitize its input of 0 to 5 volts to a bit value of 0 to  65535 bits.  This equates to 76.3 uv per bit.
Both A/D's will capture, and clock out their data simultaneously


ADC 16 rev A










Spectrum analyzer Part II Phase Detector Module


The  Phase Detector Module is a 360 degree, Phase to Voltage Converter.  It is specifically designed to operate at 10.7 MHz, but will operate in the KHz range up to 30 MHz.  
 The J1 and J2 inputs can be sine or square wave .  The min / max sine input is -20 dBm to +18 dBm.  The min / max square input is 10 mvpp to 5vpp.  Input impedance is nominally 50 ohms, but can be changed to any input impedance.
The output, at J3, is a DC voltage that is proportional to the differential phase of the input signals at J1 and J2.  The 0v to +5v output should be loaded with 100 K or higher.  A realistic phase range is from 20 degrees to 340 degrees with error less than .1 degrees.
Power requirement for the is +7 volts to +15 volts at 50 ma.

To build the RevC module I had to made some component changes and add some capacitors.
The most visible change is the added jumper wire in the bottom right.
It is not easy to solder a jumper to an ic with such a small footprint, but it is manageable as long as you have a good magnifying glass as guidance.

Phase Detector rev C





















Links:
Spectrum analyzer Part I Controller board build notes

Phase Detector Slim Module

Friday, 5 July 2013

Spectrum Analyzer Build

Scotty's Spectrum Analyser|Msa|Slim boards|Electronics|Measurement|Analyser
Two weeks ago I started to build a 0-3 Ghz Spectrum Analyser based on Scotty's design.

For more information you can visit his build page.


I first started with the rev. c controller module.

From left to right: Usb2Lpt Gender changer Controller board rev C



Since the controller uses an parallel board which modern computers dont't have anymore, I used an Usb2Lpt adapter to talk to the board.
Unfortunately the controller and the adapter are routed for a female plug , so their pins are mirrored.
I could easily fix that problem by soldering a quick and dirty gender changer (the board in the middle).

First tests showed the board is working.

Links:
Controller Page
Usb2Lpt



The next step to a spectrum analyser is the  phase detector module.