By:
Category:
Comments Off

PICkit2 Ubuntu Blues

I am working on trying to get my Linux machine talking to a couple of PICKit2 interfaces.

I installed piklab on my Ubuntu 10.4 workstation. When I configured it to look at a PICkit 2 interface it was not seeing the interface. After googling a bit saw several references to adding some USB auto detection rules.

sudo gedit /etc/udev/rules.d/026_microchip.rules

#PICKit
SYSFS{idVendor}=="04d8", SYSFS{idProduct}=="0032", MODE="0660", GROUP="microchip"
#PICKit2
SYSFS{idVendor}=="04d8", SYSFS{idProduct}=="0033", MODE="0660", GROUP="microchip"
#ICD2
SYSFS{idVendor}=="04d8", SYSFS{idProduct}=="8000", MODE="0660", GROUP="microchip"
#ICD21
SYSFS{idVendor}=="04d8", SYSFS{idProduct}=="8001", MODE="0660", GROUP="microchip
"


Save that.

sudo addgroup microchip
sudo gpasswd -a YOURUSERID microchip



In theory that should let it auto detect my interface. It is still not working correctly but now I got an error that looks like a permissions issue. When I kill piklab and then relaunch it with SUDO (yeah... I know.. that is bad.. but I am trying to troubleshoot the problem)  I am able to find the PICkit2 and the proper PIC.

I have two different configs that I am using for this test:
PICkit2 + 16F690
PICkit2 (clone) + 16F628A

I am seeing on someone else's blog that indicates that I might need to reboot before this works properly. This is Unix... not Windows so why would I need to reboot?  --It might be worth a try.


Connecting PICkit2 Firmware 1.x on USB Port with device 16F628A...
Firmware version is 2.1.0

The firmware version (2.1.0) is higher than the version tested with piklab (1.20.0). You may experience problems.
set Vdd = 5 V and Vpp = 12 V
USB Port: Error receiving data (ep=0x81 res=-110) (err=could not get bound driver: No data available).
---------------
Connecting PICkit2 Firmware 1.x on USB Port with device 16F690...
Firmware version is 2.1.0

The firmware version (2.1.0) is higher than the version tested with piklab (1.20.0). You may experience problems.
set Vdd = 5 V and Vpp = 12 V
USB Port: Error receiving data (ep=0x81 res=-110) (err=could not get bound driver: No data available).
---------------
I am making progress... but it is not working yet.  I need to figure this out so that I can get my "Hello World" program loaded on the 16F628A.

Here is what I might look at tomorrow:
http://sync-signal.com/2010/01/getting-started-with-pickit2-on-ubuntu-9-10/
http://mcuee.blogspot.com/2008/04/pk2cmd-linux-port-under-ubuntu.html
http://mcuee.blogspot.com/2009/07/piklab-wiki-page-usb-port-permission.html

73 de NG0R

By:
Category:
Comments Off

Lots of computer upgrades this weekend

Over the past couple of days I made a lot of changes.. probably more than is safe to push into one long series of upgrades/changes.

  • I looked at the couple of the Virtual Machines that I had running on one of my Linux servers and decided that I no longer needed them or I could move that functionality someplace else. The VMs are now gone and that machine is being repurposed.

  • My main Linux machine was running on a dual core laptop with 4gb of RAM. I had so much stuff plugged into it that it was no longer a laptop. The performance was ok but starting to become noticeable.

  • The repurposed desktop has 8gb of RAM and a dual core AMD processor. It is not a smoking machine by any stretch of the imagination but it is decent machine. It got reformatted and I installed Ubuntu 9.10 64bit on it. (10.4 was not quite out when I started this project.) I then migrated the data from the laptop over to the desktop. I had a couple initial issues; the swap drive was not correctly configured, the audio was extremely low, etc.

  • Once Ubuntu 10.4 LTS was released I upgraded the machine.

  • Next I installed a cheap Sound Blaster PCI sound card, 5 port USB PCI card, DVD RW drive, and a multi function card reader. (The machine already has 3 internal hard drives + some external USB drives)

  • Now my audio issue is resolved. I resolved a weird error about my second hd saying: "/110 is not ready yet or not present"   --I updated fstab with: nobootwait
I have a couple of other minor issues to tackle. Most of this stuff would never be an issue for an average user installing this as a clean installation. This is a migration+upgrade+hw additions.

I am feeling better about my ability to troubleshoot my configuration. I am total neophyte on Linux but finding that it is not really that difficult to work with. This 8gb system with full size drives is quite a bit faster than my dual core laptop.

So far I do not really like the Ubuntu 10.4 color scheme a some of the menu changes. This is probably the first release where I can say that changes bother me. I am taking it with a grain of salt by assuming that there are some features that I will really like once I dig into them or that it is even more stable than my previously stable systems.

I want to get through these upgrades so that I can go back to working on figuring out how to my 16F628A say "hello world."

By:
Category:
Comments Off

PIC 16F628A Notes

Here are some notes for my own reference as I starting with with the PIC 16F628A

Standard Pin out:



Here is the pin out for the PIC-EL III demo board:


I am trying to work up a flashing LED and some hello world code for the LCD using Mikro Basic. I would like to find a couple of spare hours this weekend to bond with the 16F628A.

73 de NG0R

By:
Category:
Comments Off

QRSS on a breadboard... figuring out the FSK shift

At the workbench......





I have a nice VXO for that will become a QRSS rig at some point in the future. One of the things that I needed to figure out was how much capacitance was needed to move about 5 hertz for my desired FSK shift.

So tonight I started experimenting with some different capacitors. Initially it took about seven 3.3pF capacitors in series to get the 4-7 hertz shift that I was looking for. I was not happy with that approach (too many parts) but it gave me some ideas and an approximate range to work with.

I did some more testing and confirmed that I was going to need something smaller than 1pF. I was figuring about .5pF. Where do I get that kind of part? (Yeah... could make a gimmick capacitor but it lacks reproducibility.)

I start looking through my parts boxes without much luck. I don't have any 1pF caps on hand. So I started looking through the variable capacitors. Eventually I found some .5 - 1.5pF variable mica capacitors. I hooked up two in series and that was the magic. (The capacitors are probably older than I am.)

It looks like 0.54pF while move the circuit about 5 hertz. (Sweet!)

I need to think about how to approach this from a commodity component point of view so that it is reproducible for other builders. I have some ideas that I will try as I do some more prototyping in the near future.  My approach might get tweaked as I start to work on the PIC 16F628A integration in the near future.

I am still amazed at that the stability. I am seeing 1-2 hertz of of shift in the couple of hours on the work bench tonight. That is pretty good in my book.

73 de NG0R

By:
Category:
Comments Off

Fun Schematics

I enjoy looking at hand drawn schematics....

http://soldersmoke.blogspot.com/2008/10/i-shift-to-fsk-on-30-meter-qrss.html

Here is "gimmick capacitor" in a simple oscillator circuit. Bill over at Soldersmoke is playing with FSK keyed QRSS. This is an old post explaining about "gimmick" capacitors compared to today where he is using an LED as a varicap in a different QRSS rig.

Fun home brew stuff.

73 de NG0R

By:
Category:
Comments Off

Putting parts away

My electrical workbench is in a different room than where my radio gear is located. I decided about 2 years ago to separate my spaces as they have different requirements.

I like to be able to work on projects for several days and need the ability to be able to stop and walk away as other commitments come up and the come back to a project later. The workbench is a small room in the basement largely unused/visited by the rest of the family. (Perfect for leaving a project on the bench for several evenings.)

Image below shows a portion of the room that hosts my workbench.


Tonight I spent a couple of hours sorting some more capacitors, LEDs, and resistors.


I have a lot of these medium sized plastic parts containers.


I have a lot more parts boxes than what is in this picture. I am trying to sort everything and label the containers with basic information about what "category" of parts they contain. Eventually I am going to need to build a couple of shelves that are dedicated to holding the parts boxes.

12 months ago you probably would have laughed because I had virtually no parts on hand. I had a very small junk box. I would call N0FP to "borrow" 1 or 2 pieces of x or y. I have made point recently of acquiring a lot of standard components. When I started to look at the kinds of projects I am building I noticed a HUGE amount of overlap in the common components.  Mouser, Digikey and eBay have been my friends recently.

It is nice to be able to do some design work in the shack/office and then take the schematic to workbench, grab a couple of parts boxes, and then melt some solder to make a circuit.

Yeah... my bench is mess... I was sorting parts and boxes tonight when I took the pictures while cleaning.

73 de NG0R



By:
Category:
Comments Off

LEDs as a varicap diode

Hans Summers is a genius....


http://www.hanssummers.com/varicap

I have heard about people using LEDs as varicaps but I have never gotten around to looking into the idea. I am working on a project/design right now which will probably need a Varactor diode (varicap).

I saw a link on "The Knights" email reflector with Bill and Hans chatting back and forth about the topic and a link to Hans' site for more details.

Hans is a wild man, lots of graphs and data. I really like the OCD (Obsessive Compulsive Disorder) approach to the data... I would expect nothing less.  :-)

73 de NG0R

By:
Category:
Comments Off

Linux : Sync/Backup USB Drives

I have a lot of content on my home network but backing it up has always been a pain.

When I say content I mean everything in the computing world that is important to me like all of my images, some video files,  CAD files, schematics, reference documents, install files, machine backups, automation scripts, ham radio logs, lots of engineering notes, etc.

  • When my network was W2K3 and XP I used Robocopy to backup the W2K3 network shares to an external USB drive every two weeks. (Sometimes I was better about the two week rotation than other times.)

  • As I started to transition from Windows (servers and workstations) to Linux and my network became more of a hybrid I bought a 1TB external USB drive. I moved most of the Windows and Linux content to this drive as I decommissioned machines. 

    I had numbered several other external USB drives and would rotate which one I used every 2 weeks for the backup of the main USB drive. Once again I used Robocopy to do the heavy lifting. The initial mirror took 6-8 hours to run (a good overnight job) and then additional syncs generally ran in less than 1-2 hours.

  • Now that my network is about 95% Linux I need to rotate the backup USB drive(s) again as it has been about 30 days. I am going to use RSYNC to mirror the primary 1TB USB drive to the numbered USB drives every two weeks or so.
  • I live in the middle of rural Minnesota so using a service like Amazon S3 or one of the other Internet backup services is unrealistic given my bandwidth combined with the amount of content that I have today and produce on-going. (RAW photos from my digital camera + any video work that I am producing is too large for the humble amount of Internet connectivity that I have.)

    At some point I should just take the USB drive some place with ubber Internet connectivity and upload it to S3 (or whoever) and then try to let the nightly jobs keep it in sync... but that will take some research to figure out.


    My answer to this issue for the time being is that I will need to get a safety deposit box at the bank and then rotate several numbered USB drives between the house and safety deposit box at the bank for my off-site rotation.

  • Today I don't backup any of the PCs on our LAN. I probably should look at backing up my PC and the Amateur Radio PC and/or at least the contents of my home directories.  That might be a phase two thing as I refresh my backup process as part of the Linux migration.

Here is how the USB mirror process works:
rsync -vrlptg --delete "/media/SOURCEUSB/" "/media/TARGETUSB/"
replace SOURCEUSB and TARGETUSB with the name of the drive

This should provide a "mirror" between the two locations.

rsync flags:
# -v   verbose output
# -r   recurse into directories
# -l   copy symlinks as symlinks
# -p   preserve permissions
# -t   preserve times
# -g   preserve group
# --delete   delete extraneous files from dest dirs
# --delete-before   receiver deletes before transfer (default)
# --delete-during   receiver deletes during xfer, not before
# --delete-delay   find deletions during, delete after
# --delete-after   receiver deletes after transfer, not before

You can confirm that the drive/content sizes match with:
df -h

For other Linux newbies (like me) here is a link to a webpage that provides some simple background on the rsync backup process I am using.
http://www.basicallytech.com/blog/index.php?/archives/73-Using-a-USB-external-hard-disk-for-backups-with-Linux.html

Scott Hanselman has a great post on the Family Backup Strategy that I like a lot:
http://www.hanselman.com/blog/OnLosingDataAndAFamilyBackupStrategy.aspx



By:
Category:
Comments Off

EFHWA notes

I am planning to build a tuner box for an EFHWA (End Fed Half Wavelength Antenna) and was doing some research on what other people have done. (I have posted links in previous posts as well.)


http://www.qsl.net/va3rr/sw30/30metres.htm


VA3RR has a nice design. He has a tuner + a swr bridge (aka LED) that he can use for the tune up process. I think that Bob AD7BP was looking at building something like this as well.

I have the parts on hand to build a QRP version and a 100w version of the tuner box. I probably have the pieces to build the bridge as well. I am inclined to build a 100w version. Recently two of my three sons got their Technician license so I need to think about how to include them in the hobby. QRP is not a sport that I would throw a new ham into... it is better suited to an older hobbyist that already has Q's in the log and is looking for a challenge.

I am thinking that a nice EFHWA tuner + some pre-cut antenna leads will work very nicely with the FT-450AT that boys have. We recently bought the FT450AT to take on our camping trips, Field Day, and weekend visits to our extended relatives. We would like to have a nice little box with everything needed to play HF away from home. (I still would prefer to use my K2 but that is a QRP only rig.)

Maybe we can prototype the EFHWA on Sunday at the work bench.

73 de NG0R

By:
Category:
Comments Off

No Rain in Kingston

We live in Kingston Minnesota. It is a small community about 53 miles north-west of the Twin Cities.

There is something odd about this area. We are on some sort of weather line. The heavy rains tend to run about 12 miles south of us or 8-10 miles north of us. Unless we have a huge widespread event we generally don't get too much rain here.

A great example is that on a regular basis the area between Dassel and Hutchinson will get 2-3 inch rains  and for the same event we will generally get .25-.5 inches of rain in our bucket.

The radar image above is a great example. Granted this is only a trace so far, but when you watch it loop on the radar the initial rain front will break up as it approaches us and then reform a few miles away on the other side of us.

Your laughing at this post... but talk to the locals and they will back up this story 100%. As of June this year we will have lived in this house for 5 years. Our initial summer here was extremely wet (which figures because we did not have any landscaping completed, no grass, a rough driveway, etc) ever since then we have had drought years.

So far for this season we have only had .5 inches of rain in our rain gauge since our snow melted. (That .5" was about 12 days ago.)