Wednesday, 18 December 2013

A tale of two scopes and a horrible signal

I hade the chance yesterday to get my hands on a Agilent DSOX3024A in the school lab.
Usually these devices are locked away from the students because they are way to expensive to withstand the daily abuse from not so much caring students. It's a shame but reasonable,...

On the other hand there is the Rhode&Schwartz HMO2024 for which I got a great package deal including all options.

They both are  200 Mhz scopes with 4 channels and have about the same feature set.
The Aglient though is a bit pricier.

Since I own the Hameg of course I am biased for that model so please keep that in mind although I will do my best to stay objective.


The second I sat before the Agilent I must confess it has a huge wow factor.
It is bigger than the  R&S but it has about the same weight.

I love the display it is so huge and has a nice resolution and best of all a great sampling depth.
According to Agilent it also has a lighting fast update rate so it should be a joy to catch glitches.

Unfortunately I could not play with the logic analyser because it is an option which was not installed.
I don't understand why Agilent does not sell a full blown scope to a school or university.
This would have been the best advertisement money can buy. Once the students get used to the features they don't want to miss them any more.And since the scopes are not used in a commercial environment why not add something for free ? 

I really love that every channel had its dedicated voltage divider knob, a feature I miss on the R&S scope. Speaking of the knobs there is one fact I hated on the scope, the layout.
I am used to the Textronix layout which is voltage divider knobs beside the timebase knob.
This layout makes sense because that are the most important knobs and it became an industry standard.Why changing something that works so well and people are used to ? I even did not find the seconds divider knob for quite a while and had to use autoset which I don't like that much because I prefer to be in full control of the displayed data.

I also could not get a trigger on an I2C data signal the data acquisition had to be stopped before the picture stood still. But I assume that was my fault in fact it had to be. Since the I2C signal is irregular according to frequency the displayed waves were all over the screen and the irregularities were interpreted as glitches I assume.
Btw the R&S scope also had a hard time to trigger correctly and I had to tweak the trigger settings quite a bit (like setting a trigger hold off) so in fact the Agilent did quite good.

I was not impressed with the wave auto analysing tough. The auto measure function is somewhat greedy and does not nearly display as much info as the R&S scope does but then again that could also be an operator fault.
To get my hands on this scope was a quick settling opportunity I had not planned for. If I were better prepared I would have inspected the scope way more closely.

The test setup:
I used an LM75 on a breadboard driven by an 500kHz I2C bus.
So the signal should work but it also should look horrible.
The Msp430 was also powered by usb which also should inject quite some noise.

The pictures:



Pretty much the same, huge over/under shooting on the clock channel and massive cross talk



The detail view is interesting, while on the Agilent side the ringing is visible on the Data line the R&S shows the ringing on the clock line.
Which one is correct ?
I tend to believe the R&S version more because it makes more sense imho. Since the clock line over/under- shoot visible on both scopes has to degrade somehow (because there are capacitive and inductive components involved) the dampened oscillation makes more sense on the clock line, while the data line has no comparable over/under shoot so why should it ring ? Any ideas from the reader which might shine some light on the issue is highly appreciated since I am somehow puzzled.




The automeasure function on the Agilent is somehow greedy compared to the R&S but that might be my fault, I will study the manual to check if there is a possibility to get more measurements.


The final verdict:

I could fall for the Agilent, the big screen is a winner no question.
The update speed is insane.

I don't like the knob layout but I think after a while I would get used to it.

The feature set on a first glance is pretty much the same.
But the devil is in the details.

Is the scope worth the higher price tag  compared to the R&S Hameg line, I would say yes.
 
I only had  a few hours playtime on the Agilent scope so I only scratched the surface.
It is an impressive scope but what else would you have expected from such a great company ?

Wednesday, 11 December 2013

Agilent 34461A Miniseries Part 1 Histogram and Cdf

Today I received a Agiltent 34461A Truevolt multimeter from Xtest.at the Austrian Agilent distributor.
I plan to write some articles about this  multimeter and especially about features which imho separates it from it's competition.

I am a Hewlett Packard / Agilent fan but I will try hard to be as unbiased as possible,...

A very interesting feature for me is the histogram display. I enjoyed the online demo's about this feature and after unpacking the meter I had to try this feature immeadetly.

If you wanted to measure the deviation of a source before you had to collect data via a serial usb or gpib bus and then create an excel sheet to visualize it. Therefore you would do such a cumbersome task only if you really need statistical data badly.

With the new Agilent 34461A you can watch the deviation instantly by pressing a button.
To test this feature I connected a 5V reference and let the instrument visualize the data.


After some 4500+ measurements you get a nice picture with an expected Gaussian distribution form.
You can also see that the Reference drifts about ±10 uV and that the reference is about 283 uV off (not as bad as it looks).

The reference and meter grosso modo  work as expected, since I have not trimmed the reference against a calibrator yet.

The  reference I used is based on the Max6350 chip with an ±0.02% initial accuracy, which translates to ±1mV. That considered it is doing great.It is awfully hard to  get your hands on a reference which is a match to the precision of a modern 6.5 digit meter, unfortunately.

Beside the histogram which is relatively easy to interpret, the meter also offers to show the cumulative distribution function (in short CDF). The CDF is represented by the green line on the picture above.
The y axis represents the percentage, the x axis the voltage.

So what is the CDF good for ? You can use the CDF to determine what percentage of the data falls between two points. The gradient of the function is also interesting.The first 10% have a considerably smaller gradient than the rest of the function, which means that the negative outliers in that sector are more rare than the other ones.
You can also see f.e. that 10% of the voltages  are of in the range of  5.000272 and 5.000279 V.
The position where the function crosses the x axis is the 50% point which in this case is slightly of the origin point on the positive side.
All in all the CDF is a great addition to an already useful statistical feature.

Test setup:


Many thanks go to the Austrian Agilent Distributer Xtest.at for making this test possible.

More mathematical insight on  Gaussian Deviaton and the cumulative distribution function can be found here.


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

Friday, 2 August 2013

Meet the Goodfet v42

The Goodfet is a super versatile tool for debugging and programming.

Once you received your pcb from Trevor you practically only need two integrated circuits and few passives.
The FT232 ic is responsible for usb to serial communication and the MSP430F2618 is the "brain" of the tool.

When the build is completed, simply  plug the Goodfet into a free usb port.
Open a console and enter dmesg to find out where the Goodfet is attached to.

> demesg

[ 4225.304042] usb 2-3: new full-speed USB device number 31 using ohci_hcd
[ 4225.610251] ftdi_sio 2-3:1.0: FTDI USB Serial Device converter detected
[ 4225.610327] usb 2-3: Detected FT232RL
[ 4225.610333] usb 2-3: Number of endpoints 2
[ 4225.610339] usb 2-3: Endpoint 1 MaxPacketSize 64
[ 4225.610344] usb 2-3: Endpoint 2 MaxPacketSize 64
[ 4225.610349] usb 2-3: Setting MaxPacketSize 64
[ 4225.623183] usb 2-3: FTDI USB Serial Device converter now attached to ttyUSB0

In this case it is ttyUSB0

Then edit your environment file and add the following lines:

> nano dev/environment

export board=goodfet42
export GOODFET=/dev/ttyUSB0 

 
The next step is to save your info file (important!) because after programming it is 
gone.
 
> board=goodfet42 goodfet.bsl --dumpinfo >info.txt
Use -h for help
Use --fromweb to upgrade a GoodFET.
MSP430 Bootstrap Loader Version: 1.39-goodfet-8
Invoking BSL...
Transmit default password ...
Current bootstrap loader version: 2.13 (Device ID: f26f)

 
This is what my info.txt file looks like
 
> nano info.txt
 
@1000
aa 55 ff 3f cd ab aa 55 34 12 ff ff aa 55 ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff ff 8b 86 fe 16 ff ff ff ff ff ff ff ff ff ff ff ff 
ff ff ff ff ff ff ff ff ff ff 08 10 00 80 01 00 d0 81 ba 0b da 0d 04 82 05 07 
4c 08 fe 08 ff ff ff ff ff ff ff ff 01 08 9a 8f a2 8e 95 8d d2 86 
q
 
 
Next step program the newest firmware to the device
  
 
> board=goodfet42 goodfet.bsl --fromweb
Use -h for help
Use --fromweb to upgrade a GoodFET.
MSP430 Bootstrap Loader Version: 1.39-goodfet-8
Invoking BSL...
Transmit default password ...
Current bootstrap loader version: 2.13 (Device ID: f26f)
Checking for info flash...  Saved!
Grabbing goodfet42 firmware from http://goodfet.sourceforge.net/dist/goodfet42.hex
Failed to run curl, trying wget
2013-08-01 09:46:07 URL:http://goodfet.sourceforge.net/dist/goodfet42.hex [55933/55933] -> "/tmp/.goodfet42.hex" [1]
Mass Erase...
Transmit default password ...
Invoking BSL...
Transmit default password ...
Current bootstrap loader version: 2.13 (Device ID: f26f)
Program ...
19870 bytes programmed.
Programming info flash...

 
I also programmed the install info created from the info file, tough I am nut sure this step 
is necessary.
 
> board=goodfet42  make installinfo
goodfet.bsl --speed=38400 -P goodfet.hex -p info.txt || true  #MSP430F2xx targets only, inelegant.
MSP430 Bootstrap Loader Version: 1.39-goodfet-8
Invoking BSL...
Transmit password ...
Current bootstrap loader version: 2.13 (Device ID: f26f)
Changing baudrate to 38400 ...
Program ...
256 bytes programmed. 

 
Programming is now completed and you should now own a working Goodfet tool.
To be on the safe side lets invoke a self test.

 
>board=goodfet42  goodfet.monitor test
Performing monitor self-test.
Self-test complete. 
 
Great a new working Goodfet tool is born.
To see what this tool is capable of lets enter
 

> board=goodfet42  goodfet.monitor listapps full
 
GoodFET with f26f MCU
Clocked at 0x8f9a
Build Date: 2013-01-23 16:28
Firmware apps:
Monitor
    The monitor app handles basic operations on the MSP430
    such as peeking and poking memory, calling functions and
    managing the baud rate.

SPI
    The SPI app handles the SPI bus protocol, turning
    your GoodFET into a USB-to-SPI adapter.

MAXUSB
    This allows you to write USB Host or USB Device drivers for
     the MAX3421 and MAX3420 chips.

JTAG
    The JTAG app handles basic JTAG operations such as
    resetting the TAP, resetting the target, detecting
    the instruction register width, shifting bits into
    both the instruction and data registers.

JTAG430
    The JTAG430 app adds to the basic JTAG app
    support for JTAG'ing MSP430 devices.

JTAG430
    The JTAG430 app adds to the basic JTAG app
    support for JTAG'ing MSP430 devices.

JTAG430X2
    The JTAG430X2 app extends the basic JTAG app with support
    for 20-bit MSP430X2 devices, such as the MSP430F5xx Family.

JTAGARM7
    The JTAGARM7 app extends the basic JTAG app with support
    for JTAG'ing ARM7TDMI based devices.

OpenOCD
    The OpenOCD app handles the OpenOCD bitbang protocol.

CHIPCON
    The CHIPCON app adds support for debugging the chipcon
    8051 processor.

AVR
    The AVR app adds support for debugging AVR based devices.

NRF
    The NRF app adds support for the NordicRF register
    interface.
 
 


If that is not a powerful tool I don't know what is.
I will add some future blogs showing in detail how to use this swiss army knife of 
programmers debuggers and tools. 
 
Goodfet42 and Goodfet41
 
 
Links:
Goodfet42 


Thursday, 1 August 2013

Goodfet hardware developing tools

Trevor Goodspeed is an amazing hacker and hardware designer.

In the moment there are three pcbs available.

First the Goodfet Trevor's signature module.

The GoodFET is a JTAG adapter,  based upon Texas Instruments MSP430 FET UIF
The Goodfet can not only be used as a programmer, but also as an universal serial bus interface.

Second the GoodThopter

The GoodThopteris an opensource Can bus monitor.
The main purpose of this board is to explore Automotive communication buses, currently supporting only the CAN bus. In addition to the Goodfet a high-speed CAN Transceiver and a Stand-alone CAN Controller with a SPI Interface was added. The GoodThopter also allows users to purchase the cheaper OBD2 cables from SparkFun.

And third the Facedancer

The Facedancer is a hardware revision of the GoodFET except unlike the general-purpose GoodFET boards, the only purpose of this board is to allow USB devices to be written in host-side Python, so that one workstation can test the USB device drivers of another host.

I received pcbs from the above modules and will post a more detailed blog entry for each of them soon.



Trevors hardware and software are available under the BSD license, and free-as-in-beer boards will be given to those who ask politely.

Goodthopter Facedancer and Goodfet pcbs


Links:
Goodfet further information
Goodfet Homepage
GoodThopter Homepage
Facedancer Homepage
Ordering blank pcbs 

Wednesday, 31 July 2013

Complex Programmable Logical Devices

I already gave an small introduction about CPLDs in part III of the 3 Ghz counter build.
Cplds and Fpgas are very interesting devices for those who ever wanted to design their own integrated circuit but could not afford a million $ to let your prototype actually build.

A Cpld consists of the following elements:
Programmable And/Or matrices the macro cells
Programmable feedback
Input blocks
Output blocks

They distinguish themselves primarily in speed and the amount of programmable cells and pin count .
Unfortunately if you need many programmable macro cells the designers assumed you probably need many in out pins too. But many in out pins mean very small footprint and very home brew unfriendly.

So the hobby engineer is restricted to low cell count packages and therefore only small designs.

What are the advantages of a Cpld over a micro controller.
A Cpld can work massively parallel a  lightning speed.
The I/Os don't need a higher level control structure they work just by the logic assigned between an input and an output. They are often used for data capturing and collecting then they transfer the data to a high speed ram and then a micro controller  analyzes the data. Fast oscilloscopes would be unthinkable without high speed logic, micro controllers are ridiculously slow compared to Fpgas.

How to get started ?
Unfortunately programming and designing code for Cplds is completely different to program a micro controller and full of pitfalls.So the best way is to start small and use a simple low cell count target chip.
This is where Dangerous prototypes comes in, they designed two breakout boards based on the Coolrunner II series.One has a macro cell count of 72 and the other of 64.So you wont be able to run an Arm chip design on them but you could use them as multiplexer, inverter, ... You could reproduce the basic logic design blocks with them and combinations of them. You also get used to Verilog the programming language.
Later one if you decided you like the environment you could easily transit to the bigger high cell count Cplds.

To get started I would suggest the CoolRunner II XC2C64A CPLD with 64 macro cells and an Altera Usb Blaster programmer clone from Ebay.

As a first step I would work trough the Dangerous Prototypes tutorial section.

Cpld devboard and programmer



Links:
Dangerous Prototypes Cpld Board
Cpld Forum
Tutorials

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

Thursday, 25 July 2013

GPS Locator

I often read about new Gps receiver which are so sensitive the even get a lock indoors.
Every now and then I believe this rumours buy the unit try it at home and of course it does not receive enough satellites to get a lock sometimes it does not even receive one.

A gps receiver at would be grat, I could synchronise my Rubidium oscillator with the 1pps output, or build a timeserver ,...

 The MTK3339 Gps receiver I tested has a pretty fast fix and there is a breakout pad available which fits on the Launchpad. There is even the option to connect a battery to it so it does not lose its satellite data and only needs a warm start.

When you remove the target processor on it you can use the Launchpad as serial to usb converter.
So you plug the Gps pcb on the Launchpad, start a terminal programm on the Pc and watch the Gps data flow.

Unfortunately no Gps lock at home, but nevertheless a very sensitive and fast Gps receiver.

Gps Locator pcb

Gps Locator bottom view

Links:
Booster Pack shop link
Gps receiver

Wednesday, 24 July 2013

Nokia 5110 Msp430 Booster Pack

Texas instruments is becoming my most used development platform.
The launchpad series is great for rapid development and did I mention the debugger is great ?
Since Ti is such a big company it is somewhat hard to gather the information you need, since they have many technical writers and thousands of documents. They also lack some kind of easy tutorial which just gets you started like the one from Embedded Artists for the Nxp line or I simply have not found it yet.

Edit:
Unbelievable there is a great tutorial site from Ti I just found it within minutes after I wrote this blog,...
http://processors.wiki.ti.com/index.php/Getting_Started_with_the_MSP430_LaunchPad_Workshop



On the other hand there is a great user community and if you have some experience with other controllers you will get used to the controller line soon.

The Nokia booster pack is designed by RobG and it is also possible to build it as a  stand alone display.
I decided to do so, but I had great difficulties to get the programmer to recognize the board.
In the end my reset controller consisting of an resistor and a capacity did not work out. After hours of head scratching guess work I removed the capacity and it did work immediately, very strange.
To program the controller I simply put the board on a launchpad with empty target controller socket.

I tried some example code from the designer and the booster pack worked great.

I usually don't like displays without a character generator,  but once you defined the character set you won't notice a difference, so no problem whatsoever.

The Nokia 5110 display is controlled via Spi bus, so update rates are fast and programming is easy once you get used to the concept. There is a nice lecture from Cornell university which helps you understand the basic concepts to use a Spi bus.

Btw. I decided to build a standalone version, because I can implement a full blown easy to use display controller module and then simply connect any circuit to it to use it, even the interface choice is flexible, from simple bit bang mode to serial or I2C anything is possible. I simply like modular approaches.

Finally some pictures:

Nokia 5110 msp430 booster pack

Bottom side

In action

On top of the launchpad to program the controller


Links:
Spi tutorial
Buy pcb from 43oh shop
Build thread

Tuesday, 23 July 2013

WS2812 RGB Led Matrix Booster Pack

The WS2812 is a highly interesting RGB led, since it already has a controller build in and supports daisy chaining.

Now how does it work ?
You can send 3 bytes of information to the led. Every byte corresponds to either the intensity of the colour red green or blue. 255 translates to highest intensity while 0 turns the corresponding colour of.
So f.e. you have 10 leds in a row and send 30 bytes to them. The first led grabs the first 3 bytes and passes the left 27 bytes down to the other leds. But the led not only passes the bytes down, it also reshapes the signal and amplifies it.. You don't need to worry of signal integrity.

The controller also only needs one data line, so there is no clock signal needed.

There is only one problem, the signal has to be short to get reasonable update rates.
So a 1 is translated to a 1.2us long high impulse followed by a 1.3us long low impulse.
While a 0 is translated to a 0.5us long high impulse followed by a 2. us long low impulse.

So the pulses need to be so fast you cannot bit bang them any more you need a built in hardware module.
Some genius developer on the internet suggested to use the built in Spi bus protocol since it supports fast data rates.But there are still some problems waiting to be solved. In hardware Spi a bit always has the same time frame and either a high or a low pulse.

So you have to map your bit to a matching spi sequence.
So first program the bus speed to 2 mhz. Every bit is now 0,5 us long.
A bit with value 1 now translates roughly into 11000
A bit with value 0 translates exactly into 10000

The bit with the value 1 is not exactly mapped but the processor has a tolerance of +-150 nS so we should be fine.

I tested the code with a WS2812 led light strip I built and it worked.

This is a great example of a developers ingenuity, there is a big problem but thinking out of the box and using an hardware bus protocol which has completely different specs but is fast enough saved the day.

I plan to use the led matrix  as a moodlight, but most importantly I wanted to learn how to use this leds.
I want to use them to display sensor data like temperature and humidity. Blue would translate to below comfortable, green ok and red above comfortable level.

RobG Led Matrix Msp430 Booster Pack


Backside JP1 powers module from launchpad

Booster pack in action
 Links:
Buy pcb
Designers forum thread

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

Thursday, 18 July 2013

Embedded Wifi

More sooner than later even simple electronic products will have to support wifi.
The electronic industry finally has recognised the demand and started to deliver easy to use solutions.

To send some data to a server I am not interested to study osi layers and literally thousands of pages from different rfc papers. I simply want to connect open a socket and send the data somewhere.

Available and affordable solutions: 

TI CC3000 module 

A great pitfall today is to connection to the wifi. Until now you needed a pretty serious gui interface just for that one time operation. Texas Instruments created a very nice solution, they added to their CC3000 wifi interface a program where you can set up your wifi client with your handy.
Their api  called Simple Link is easy to understand and helps you to get everything up and running in a second.
You can buy the CC3000 directly from Ti for 35$ including s&h

Wiznet WizFi220 

The Wiznet devices are around for some time now. The WizFi220 low power "Serial to WiFi” module with additional power amplifier is also easy to use. You even don't need an api to run it, you simply send serial commands from your application to the module and the module does all the magic.
There is also a big user community and many examples are available on the internet.
You can buy the WizFi220 for about 25$ but unfortunately s&h to Europe from Wiznet or their resellers is pretty expensive.

TP-Link TL-WR703N 

The hackers choice. The WR703N is a small router whit an available open wrt port.
Unfortunately this device was until recently only available in China and therefore has a chinese user interface. To find the correct firmware update page is not an easy task.

Once you have taken this hurdle you have a nice little wifi enabled Linux computer.
The unit also provides a serial interface on the pcb, you just have to solder some wires to the pcb and a connector. Then you can talk to the device with an micro controller and run some python scripts on the router side to send your data over wifi.

You can buy this device from Ebay for under 20$

I like all three modules and will soon post about my experiences using them.

Links
Ti CC3000 wiki
Wiznet WizFi220
TP Link TL-WR703N Open Wrt page

Pictures:

From left to right: CC300 Booster Pack, Wizfi220 and Antenna, TP Link TL-W703N

TP Link router inside case



Wednesday, 17 July 2013

SVR transfer reference

More than a year ago I bought a 5,5 digit HP 3478A bench multimeter.
Usually professional tools like this are pretty expensive, but if you are lucky they reach their end of life cycle in  big production companies and then they swamp the second hand market.
I bought the HP 3478A at the right time for about 100$.
There is a big problem with this multimeter, the calibration chip is battery buffered.
If you had bad luck you buy one which has lost it's calibration data and then operates way out of spec.

Recently the 6,5 digit workhorses like the Agilent 34401A are becoming more and more affordable.
I could not resist and bought one at a ham radio flee market.

Unfortunately it is hard to test such precise devices and a new calibration would cost twice as much as the device itself.

So I needed a cheap high precision voltage source to test the meter.
I found one from Geller Labs, which is based on the  AD587LQ (cerdip!) or AD587LN from Analog Devices. Since they also sell  bare pcbs I populated mine using a way cheaper (but also more temp. drifting) version  the AD587KNZ.


To get reproduceable results it is advisable to let the meter and voltage source run for at least half an hour.

Btw. I ignore the least significant digit on a display or when important I round it.
If you round the least significant digit all displays would have produced the perfect result of 10V !
That is why I can live with a more drifting version of the Analog chip and drifting it does unfortunately.
I would like to test a calibrated version with the cerdip chip, but only for curiosity.

Bbtw. 8.5 digit meters are becoming more affordable,....

Svr board with Agilent U1272A multimeter

Agilent 34401 6,5 digit multimeter
HP 3478A 5,5 digit multimeter
















































































Links:

Geller Labs Svr transfer reference

Tuesday, 16 July 2013

Backwoods Logger

The Backwoods Logger is a very useful at displaying graphing and logging pressure, height and degrees , all in the size of a Tic-Tac box weighing about 1 ounce.

It's built-in oled screen can show current data or graphs of data vs time within a scale from the past 2 hours to the past 2.5 days.

Most important, this logger is an open source project.
The logger is based upon a Bosch BMP085 temperature and pressure sensor and an Atmel AVR ATmega328P micro controller.

I built this device about a year ago and often used it.
Unfortunately I once left it in my trousers bag and put it in the wash machine.

Of course it was broken afterwards, the display and the pressure sensor had to be replaced.

I changed them today and now the logger is back and alive again.
Since it is so small I can use it inside an rc controlled glider as an altimeter.

Btw. did I mention it uses an oled display ?!
 


Backwoods logger start up screen

Backside with micro controller and sensor
Washing machine casualities

For more information please visit the project's hompage



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

Thursday, 11 July 2013

Meet the Powerscope

Since Ti announced the Launchpad I was very excited to play with this awesome development tool.
It is like a Arduino on steroids, mostly because of it's 16 bit capability and most important it has a debugger.
When your code does not work nothing is more useful than a debugger, maybe  with the exception of a razor sharp brain and years of development experience might not hurt either.

Since the Msp430 line supports low energy consumption and have many different feature sets it is important to verify if the consumption is really as good as it could be. To see exactly what is going on, a scope is the tool of choice, but for a quick estimation the Powerscope is much more comfortable and easier to use.

When measuring very low power devices I would not recommend to use a multimeter, because of their usualy high burden voltage. To circumvent this problem, David Jones from EEVBlog designed the uCurrent , also a great tool.
The Superprobe is a somehow similar device, but it has it's own display so you don't need to connect it to a multimeter.

I also built an usb adapter to attach the Powerscope to a Usb device and measure it's power consumption.
In the attached example pictures I connected the Powersope to an Launchpad which drove a CC2500 radio device.It does not make much sense, because the attached debugger also has a unknown power consumption but it gives an idea of usage and it also shows that the TX mode consumes about 17 mA more than the RX mode .Btw. the code in the moment has no power optimisations what so ever, I was more than happy to get the CC2500 up and running,...

The programming of the Powerscope also was more than easy.
You can either use the Launchpads programmer by removing all the jumpers and insert a programmer cable or you can like me use a Goodfet programmer designed by Travis Goodspeed.
Since I don't like to solder headers just for one time programming, I made a small programming cable with pogo pins. You can use this kind of connection even for debugging.

You can buy an empty pcb at the 43oh store.

Powerscope front side


Powerscope back side

Powerscope connected to Lauchpad in TX mode

Powerscope connected to Launchpad in RX mode

Goodfet 4_1 programmer and programming cable with pogo pins


Links:

Buy Powerscope pcb
Designer thread
Powerscope Code and Info page
Goodfet programmer