By:
Category:
Comments Off

PreScaler Ideas (PIC Freq Counter)

I am thinking about using a prescaler attached to a PIC to get a simple frequency counter. I would suspect that it would just become a "module" that I include in some other design projects later. Initially I need to get a working sample. Target range would be 1mhz through 400mhz.



This table shows what the math might look:








One component that I am looking at is a MC12080:




I have seen some other folks using the MC12080 as their prescaler. I would assume
that there are some other options if I hunt around a bit.





The image below is from the AA0ZZ PIC-EL
III manual as simple circuit for a simple frequency counter.






I need to layout a schematic and then put together a parts list and visit Digikey.
I think that these are all common parts that I can order from a single source. 
Getting the parts will be easy... the code to make this work in the PIC might be quite
a bit more complex.









By:
Category:
Comments Off

PIC-EL III - Frequency Counter

It just so happens that I own a really nice PIC-EL III. It is
a PIC programmer & development board that Craig
AA0ZZ
designed. I thought that I remembered that he might have a simple PIC based
frequency counter design in the manual.  A quick little search and presto.



------snip----------



http://cbjohn.com/aa0zz/PIC-EL-III/PIC-EL-III-Manual.pdf




page 11



2.2.8 Signal Conditioner A signal conditioner, shown in Figure 10
is provided to increase small amplitude signals to voltage levels which are detectable
by the PIC. The output amplitude of the DDS Daughtercard is too low to be fed directly
back into a PIC pin for the demonstration of frequency counting. To make this work,
the amplitude is increased by the signal onditioner circuitry. Notice that this conditioner
is not a linear amplifier in that it does not attempt to keep a distortion-free sine-wave
output. For purposes of frequency measurement, a square wave would be just as good
as a sine wave.





Figure 10– Signal Conditioner




Note that header HDR2 is used to select the source of the signal which goes into the
“conditioner”. In one position (jumper from HDR2 pins 1 to 2), the output of the DDS
Daughtercard is fed into the  “conditioner” while in another configuration (jumper
from HDR2 pins 3 to 4) a signal from an external source can be brought into the PIC-EL
board via the BNC connector (J7) and routed through the Note that header HDR2 is used
to select the source of the signal which goes into the onditioner”. In one position
(jumper from HDR2 pins 1 to 2), the output of the DDS Daughtercard is fed into the
conditioner” while in another configuration (jumper from HDR2 pins 3 to 4) a signal
from an external source can be brought into the PIC-EL board via the BNC connector
(J7) and routed through the “conditioner” before going to the PIC. (Another option
is to route the DDS output directly to the BNC, bypassing the “conditioner”, by installing
a jumper between HDR2 pins 2 and 3.) The sensitivity of the signal conditioner on
the PIC-EL III is about 100 mv P-P at 7 MHz.



------snip----------



I have not done much work with the board since I assembled it recently. (Lot of projects
on the bench these days.) This might be an excuse to pull out the board and see if
I can get it running as a simple freq counter. Maybe this can be scaled to work with
the RF power meter project that I am researching.











By:
Category:
Comments Off

PIC freq counter notes

I am capturing some notes for how to use a PIC MCU as a frequency counter. I would like to potentially include this in some other projects that I am looking at. There are some interesting ideas and the counter does not look too complex. I wonder if a person could prototype it to the point where it is a reproducible "component" that could be easily included in other designs.



http://www.piclist.com/techref/piclist/weedfreq.htm




http://www.qsl.net/dl4yhf/freq_counter/freq_counter.html




http://www.qsl.net/dl4yhf/qrp/index.html#miss_mosquita




http://www.qsl.net/dl4yhf/index.html#dl4yhf_winpic




http://www3.sympatico.ca/richard.blackman/PIC_LED_FREQUENCY_COUNTER.html




http://py2rlm.sites.uol.com.br/FREQLEDEGL.HTM




http://www.best-microcontroller-projects.com/support-files/pic-frequency-counter-lcd-tmr1.pdf




http://www.qsl.net/yo5ofh/pic/freq_counter/freq_counter.htm




http://www.hamradioindia.org/circuits/fcountlcd.php




http://www.embedds.com/the-marvelous-ik3oil-16f84-pic-frequency-counter/




http://ironbark.bendigo.latrobe.edu.au/~rice/newfm/newfm.html




With a prescaler - http://ironbark.bendigo.latrobe.edu.au/~rice/newfm/ghzfm.html




http://kl7r.ham-radio.ch/ik3oil/index.html




It seems like there is a lot of potential for reuse for a tool/module like this. I
will try to look into this more tonight after the kids go to bed. There is no end
to amount of reading that I can come up with.







By:
Category:
Comments Off

RF Power Meter Project

N0FP and I are investigating RF
power meter ideas. There are a lot of designs based upon the AD8307 A to D converter.
Many of the design variations originate with the W7ZOI design.
I decided to convert his design from the June 2001 QST article into a TinyCad schematic.




The image above is my first pass at the initial schematic capture. I might be missing
components or have typos in there... but this is the starting point. (Click on the
image and it will open a larger version with more detail.) The initial schematic
was not too hard. I had to create new parts for the AD8307 and the LM386 but that
only took a couple of minutes. I probably have about 60 minutes or so of time into
this schematic once I filter out all of the interruptions.





We are looking at prototyping this project and potentially adding some features to
make the design our own. I suspect the analog meter is not long for this project but
I will hold back on some of the new ideas until we get a bit further down the road
as there is quite a bit of research and testing to do before we get too crazy.



If you are interesting learning more about this project or participating please ping
me directly.



73 de NG0R



---


Some follow-up notes on 2010-01-10:

http://www.ka7exm.net/pic_power/index.htm




http://www.ka7exm.net/pic_power/ProjectNotes/x.pdf




Roger has a nice update to the original W7ZOI design that was published back in 2001.
I have other design and feature ideas so I don't think that I am going to order/build
Roger's design but will instead likely work through something on my own path.



73 de NG0R







By:
Category:
Comments Off

PCB Design Thoughts

I have been talking with N0FP directly on other folks via email about my time spent trying out some different EE cad tools. A couple of common questions seem to continue to come up....



  1. How do you move between LTSpice and a CAD program like TinyCad, Eagle, or KiCad?

    Being able to import/export with LTSpice is a big deal if you want to easily model
    your projects.





  2. Auto numbering of parts - This is a great feature if you can use and still go back
    and tweak the component numbers by region on the board or completely renumber if you
    add a part to the board, etc.





  3. Making a new part - I need to test how easy/complex it is to make a new raw part/component
    for the schematic & layout tool.





  4. Good auto router integration - So far TinyCad+FreePCB has had the output from the
    auto router. I still need to get this working with Eagle prior to buying Eagle...
    if I buy Eagle.









By:
Category:
Comments Off

Eagle - W7ZOI schematic example






The picture above is a quick schematic that I whipped up over lunch using the Freeware/eval
version of Eagle.  This took about 10-15 minutes to draw and it was my first
time using the tool. If I had a bit more time I would fill in the values of the components.
When time permits after work or over lunch I will try to see if I can finish this
and then move it to the PCB layout portion of the software.



I have to say that the "wires" were the easiest to lay down with Eagle. I think that
Eagle is a bit click and menu intensive initially compared to TinyCad. That might
be an initial feeling that changes once I learn the shortcuts and use the tool some
more.



My initial impression is that I like it at about the same level as TinyCad and more
testing is needed.



73 de NG0R

---------

Here are some additional follow-up notes later in the day (after work.)





  • I updated the schematic with values.




  • I ran into some problems with the part numbering because it auto numbers the parts.
    I could not find an easy to turn off that feature. That created an issue if a part
    number was already in use... I had to work around that goofy issue for 15 minutes.
    If my board was more complex this solution would have been unworkable.


  • I then ran the rule check (almost all schematic capture programs have this feature)
    and the seemingly easy wire routing turned out to have quite a few junction issues.
    (This was similar to the issue that I had with TinyCad.) So I clicked on each error
    and then added a junction to fix the problem.


  • I then exported a netlist and partslist. (Which did not seem to work properly with
    LTSpice... I will have to research this further.)


  • I then decided to layout a board. Hmmm... no auto parts placement. (Only one tool
    has really had that option.




  • Ok... the I will manually place the parts... wait I can't grab/move the toroid/transformer.
    I spent 10  minutes on this and final gave up.




  • Fine... lets run the auto router to put down some traces... oh wait... there is an
    error. This feature appears to be disabled in the Light Version even though the website
    says that it should work. Maybe there is an issue between the free/demo version and
    the Lite version.



 




So my follow up impression:




  • I REALLY like the look of the schematic. The layout was very fast and would
    get faster as a person gets to know the tool. The component library is HUGE.



  • I am really upset that the auto router does not work. I am really upset at the stupid
    part naming issue. I am disappointed with the board layout tool as I could not move
    the transformer.


I am so close to loving this tool and being willing to buy the Lite version for
$50... BUT... I could not complete a board with it and I can with TinyCad + FreePCB.





I will try to spend some more time later tonight or tomorrow evaluating this further...
it is time for dinner with the family.



73 de NG0R





By:
Category:
Comments Off

Pine Board Directional Coupler

I recently bought a spectrum analyzer and have been nervous about over driving the input to the scope. I also bought a step attenuator which will help control the levels but I still did not feel that I had this dialed in. I decided that I needed a directional coupler. Of course anyone could go buy one from MiniCircuits or eBay but what fun would that be. Most of the units on eBay were for microwave bands and up. Most of the units from MiniCircuits were rated for very low power... something like 2 watts in.



I wondered what it might take to build one... it is a geek/knack victim approach to
solving this challenge.



Some good reading on the topic:

http://michaelgellis.tripod.com/direct.html




http://www.elecraft.com/manual/CP1%20Manual%20Rev%20A.pdf




GQRP/SPRAT article by David
Stockton - G4ZNQ





Mechanically they look pretty simple... electrically I am not 100% certain how we
are figuring out forward power from reverse power. Is it the difference in phase on
each side of the toroid or some other evil EE magic?



I found a calculator
on the internet
that I could download and use to model coupling vs. the number
of turns. This calculator matches the data in the Sprat article and the info from
the Elecraft website fairly closely. The schematic below shows what I ended building.




Looking at the schematic we have two toroids, three BNC chassis mount connectors,
and two 100ohm 1w non-inductive resistors. (I found the resistors on the Digikey website...
I was looking for Carbon Comp and found these.) So that parts are not too magical.



Looking at the pine board picture (below) you will notice that I am using scrap aluminum
angle stock to hold the BNC connectors in place. The blue wires are some scrap 14
gauge hookup wire. The white and brown wires are some scrap wire roughly the same
gauge as Cat5 cable pairs... this is actually from a large phone bundle that I bought
at a Hamfest.  The toroids are T50-43 that I had on hand that I bought a while
back from W8DIZ. The resistors
are the Digikey find.








So... this looks like a Rube Goldberg kind of construction. Initially I figured that
I would build it on a pine board, test it, modify it, and then eventually build the
final item. Once I finally got around to the construction it only took about an hour
to cut, drill, wind, and wire-up everything. (The lugs are all soldered together...
no crimps.)




My initial test showed that it was about 20db down from 1.7mhz to 150mhz but that
was the limit of my signal generation at my QTH. I then went over to N0FP's QTH as
he owns a nice Wavetek signal generator that is good to 1ghz. We measured his signal
generator from 1mhz to 1ghz in 50mhz increments and then remeasured the same range
with the coupler inserted. This would allow us to calculate (approximately) how the
coupler performed over a wide frequency range




The coupler was generally 20db down... with a couple of blips at/near 30db down. (I
think that we might have an data error at 550mhz... but we are not sure and it is
not really an issue either way.) The coupler performs very well at HF-VHF. In fact
it is usable all the way to 1ghz.




I am going to build a final version of this coupler into a small Hammond box. As part
of that effort I will also minimize the wire lead lengths. Once that is done I plan
to visit N0FP and test the final product.



I am extremely happy with this experiment and plan to make the final version of this
(in the box) part of my permanent test gear for my spectrum analyzer along with my
step attenuator.  




73 de NG0R





By:
Category:
Comments Off

W7ZOI oscillator in KiCad




Tonight after the kids went to bed I whipped up this schematic in KiCad. (I put it
into TinyCad last night.)



My initial impression is that I can probably crank out a basic schematic quicker in
KiCad but I am not as happy with it. KiCad is pretty easy to layout some basic components
and add some wire links. I probably had the basic schematic done in 10-15 minutes.
I then spent another 30 minutes cleaning up with simple things like alignment. I think
that TinyCad has a much more professional look with the snap to grid function that
is on by default.



I also stumbled in KiCad with how to create a simple picture for the web. I ended
up printing the schematic to CutePDF. Once I had a PDF I adjusted the magnification
so that it looked good on the screen and the used SnagIt to grab a screen shot.



I still need to work through creating a Netlist, Partslist, and then trying to do
some parts placement on a PCB.



I am very unimpressed with the help file for KiCad so far compared to TinyCad and
FreePCB.



My initial feel is the KiCad is good for creating a quick schematic... but initially
I still prefer TinyCad+FreePCB. I will need to do some more testing to see how I feel
at the end of the process if I can get to the point where I am ready to etch a board.



-------------------

An update to this post.... the top section was a couple of hours ago....



I decided to continue to play with KiCad to see how the board layout, auto parts placement,
and router work.   After a LOT of messing around with the board layout program
I decided that you need to manually layout the parts, then compare it against the
auto placement, and then figure out what works best for each part. I then used the
auto router to figure out where to put the traces. It is uses the same auto router
as FreePCB.



The board below is what KiCad and the router think I should put together.








I have to say that for my first pass the schematic capture was decent... but the board
layout leaves a LOT to be desired. This board would not meet my needs and would not
be viable to etch at home.



Bottom Line:


Right now I would say that I probably will lean towards TinyCad + FreePCB as I could
crank out a workable PCB much quicker and with a more realistic layout. KiCad is installed
and will be my backup. Ideally I would like to be able to use both of them as needed
and figure out a way to convert the files between them... until then I will focus
on TinyCad+FreePCB.