Sunday, February 24, 2013

Hardware: Universal PIC / PROM programmers - low cost


A correspondent commented:

"Just wondering if (you) have any experience with universal programmers is.
I have been looking for one that can do just about any PIC or EEPROM under the sun and is priced under $120.
- The TL866CS Universal Programmer
- The Wellon VQ 1"


I only have a little bit of experience with programmers.

Years ago I scratch built a EPROM programmer, and write the software to drive it in "C" via a parallel port on PC. It only worked with one family of EPROMS and I gave up trying to update it when new ones came out. The Software is now lost and the parts recycled or tossed. Moral of the story - if you homebrew, you are the support for new SW.

I purchased an "aftermarket" programmer for PICs when I first started with them. It worked OK, but had some bugs that had to be worked around by adding some caps to the programming leads. Only problem is that after about 6 the company went out of business, and there were not further updates to the software, so it would not support new devices.

I then bought a geniune Microchip PISstart programmer used from eBay that worked OK.

A while later bought another one, a PICKit II starter kit (not as much because the other one did not work, but because this one supported in circuit programming directly and had a proto board with it).

Both the those devices are still supported by Microchip.

So the point I am trying to make is that if you CAN find a "universal programmer" the key is going to be buying if from a real company with a track record that will issue SW updates in the future to support new devices in the future. A "hobby" device from a small one person company may not do that.


Eric Pierce VA3EP - See the Disclaimer in the Introduction

© Eric Pierce and "VA3EP Amateur Radio And Other Geek Pursuits", 1952-2099. Unauthorized use and/or duplication of this material without express and written permission from this blog’s author and/or owner is strictly prohibited. Excerpts and links may be used, provided that full and clear credit is given to Eric Pierce and "VA3EP Amateur Radio And Other Geek Pursuits", with appropriate and specific direction to the original content.

Wednesday, February 13, 2013

Raspberry Pi - Connecting Up A Dumb Serial Terminal

 
** Edited Feb 18, 2014 **

A dumb serial terminal (or a PC emulating one) is a handy thing to connect to the rPI for a number of reasons:
 
- when rPI is booted, boot messages are displayed
- you can log in to the rPI from it
- it allows you to connect to and change / debug / update a rPI with no keyboard / monitor that is being used as an embedded controller (perhaps a model B with no Ethernet)
 
Since the rPI uses 3.3 volt logic and a standard PC serial port with a terminal emulator program such as TerraTerm uses the RS232 and ASCII standards, you need to get a converter that converts 3.3 volt levels to RS232.
 
I found this one on eBay from seller skt_flyer:
 
 
If this one is no longer available, there should be lots more, just make sure you get one that works with 3.3 volt power and logic level.

It has pins that connect into my breadboard, you connect the RX, TX, 3.3 volt power and ground to the appropriate pins of the Raspberry Pi. I am not using the CTS/RTS pins for handshaking.
 
From the converter I go thru a null modem cable and then a serial cable to a PC running a terminal emulator program. This is always the fun part about hooking up RS232, you have to worry about the DTE / DCE conventions. 

I have an old laptop that has a real 9 pin PC serial port, if you don't have that you can use a USB to Serial adapter cable.

From the software perspective on the Raspberry Pi, if you have disabled the serial port from spawning a login process you have to enable it again. In the file /etc/inittab on the rPI, if you commented out the line (as I did previously to use the serial port from python):

     #T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100

you have to restore it to the original

     T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100

This is described more fully in this article (which also discusses how to turn off all the boot messages going to the dumb terminal).

With everything set up like this and the terminal (or terminal emulator software) set for 115200 baud, no handshaking (since CTS/RTS are not used) when the rPI is booted the boot messages will scroll out on the terminal. They you will get a login prompt and can login.

If you are looking for a good Terminal Emulator software for windows, try the open source TerraTerm, which defaults to VT100 emulation.


Eric Pierce VA3EP - See the Disclaimer in the Introduction

© Eric Pierce and "VA3EP Amateur Radio And Other Geek Pursuits", 1952-2099. Unauthorized use and/or duplication of this material without express and written permission from this blog’s author and/or owner is strictly prohibited. Excerpts and links may be used, provided that full and clear credit is given to Eric Pierce and "VA3EP Amateur Radio And Other Geek Pursuits", with appropriate and specific direction to the original content.



Tuesday, February 5, 2013

Hardware: How to wire your house for network, speakers, tv, a/v, etc.


I did a lot of thinking about what type of wiring to run where when we designed our house that was built in 2007. I came to the conclusion that I could NEVER figure out what wires I would need where for TV, A/V, speakers, network, etc. etc. in all the rooms.

So when we built our house in 2007 we had the builder put conduit from the basement ceiling to uncommitted electrical boxes on at least one wall of every room of the house, sometimes 2 or 3 singles, doubles or triples depending on the room (it's a raised bungalow).

When I finished the basement I have the same in every room I finished, in this case the conduit runs up the wall to be accessible from the drop in ceiling.

Also have drop in ceiling in the basement and a long wire run "chase" with a pull down the center where the box over the ducts is, with pull strings from the main electrical closet to the furnace room on the other side. So I can pull any type of wire pretty much anything I need  anywhere I want (subject to the size of the conduit).

In the "bedroom" in the basement that I am using for my ham shack in the corner of the room where the conduits come thru the basement wall from the tower base (installed when the house was build) I have a cable chase with doors on it, the bottom of which allows all the cables to come out at floor level. You can see this as a bump to the right of the window in the NW corner of the pics here.

You may find this idea useful, if you have any questions, I can post some pics.


Eric Pierce VA3EP - See the Disclaimer in the Introduction

© Eric Pierce and "VA3EP Amateur Radio And Other Geek Pursuits", 1952-2099. Unauthorized use and/or duplication of this material without express and written permission from this blog’s author and/or owner is strictly prohibited. Excerpts and links may be used, provided that full and clear credit is given to Eric Pierce and "VA3EP Amateur Radio And Other Geek Pursuits", with appropriate and specific direction to the original content. 

Hardware: UFER House Ground


I installed the UFER ground when the house was built. The Ufer Ground is an electrical earth grounding method developed during World War II. "It uses a concrete-encased electrode to improve grounding in dry areas. The technique is used in construction of concrete foundations". Lots more info about it here.

It consists of wire mesh under the poured concrete floor of the basement and garage all bonded together with #4 copper wire. The copper wire surfaces near where my conduits go out through a side wall in the basement to near the base of the antenna. It goes on out there where it is bonded to 2 legs of the tower, and connected to a large buried ground plate.

There is a copper wire running on the inside of the house from where the UFER ground wire goes outside which then connected to the Electrical Panel safety ground at the panel.

From what I have read, although this is a great safety ground, it might not be as good an RF ground (aka counterpoise) as elevated radials, see this article. The whole subject of safety, RF and lightning ground systems is very interesting with lots of informed (and not so informed) opinions out there, just google around.


Eric Pierce VA3EP - See the Disclaimer in the Introduction

© Eric Pierce and "VA3EP Amateur Radio And Other Geek Pursuits", 1952-2099. Unauthorized use and/or duplication of this material without express and written permission from this blog’s author and/or owner is strictly prohibited. Excerpts and links may be used, provided that full and clear credit is given to Eric Pierce and "VA3EP Amateur Radio And Other Geek Pursuits", with appropriate and specific direction to the original content. 

  

Sunday, February 3, 2013

Hardware: Remote Home Security Camera on the cheap


I was away for a conference last week and wanted to keep and eye on the house (my spouse Jo went with me) when I was away.

I have a couple of old IP cameras in my junkbox that I set up, one of them (an Airlink 101 SkyIPCam250) pointing at the sump pump hole (those of you that live in rural areas know what this is - mine normally gets very little water in it, but I like to be sure) with a battery operated clock and thermometer (to see if the furnace is running) in view:





The cameras have web pages that you can log into to see the video, but with the double NAT on my Xplornet fixed wireless I cannot connect from the outside Internet.

So I set up the cameras to FTP pics every "N" seconds to a Win7 machine running the FileZilla FTP server.  Note that just about every IP camera every made supports FTP - google for the manual of whatever camera you have.

Note that these old cameras do NOT support motion detect, and unfortunately are too old to be supported by the EXCELLENT ContaCam - FREE Video Surveillance software (which I use at work with some newer IP cams - the BEST free one I could find for my needs).


On the Win7 machine I made a command line "batch file" to loop and copy the changed pics to my Google drive every minute using robocopy (a GREAT copy backup utility built into Windows):

:top
     echo start
     robocopy "c:\...\ftp" "c:\...\google drive" /s /r:1 /w:1
     timeout N
     goto top


Note that you will have to change the "..." to match your directory structure, and the timeout N argument to an integer number of seconds that you want. See the robocopy help (type robocopy /? at the command prompt)  for the explanation of the command line switches. It also just occurred to me when I was writing this that I could have also just set the root ftp directory to the google drive folder and eliminated this step - DUHHH!

Now I can login from anywhere in the world to my google account and see the pics up to the last minute in my google drive  from anywhere - it worked great. Even though I was not expecting any issues, was nice to see everything was OK.

I also had the computer BIOS set to restart on power restore (usually under POWER settings) and Win7 to auto login and restart the bat file -  the power WAS out for a few minutes while I was away and it all came back up fine

I am going to look at the second hand store and get a wall outlet powered clock to put in view. Then if the power goes out, I can see by the difference in the 2 clocks to see how long it was out.

Oh, BTW, The other camera has infrared and it set up in a "hidden" location, anyone breaking into the house would be recorded and the pics copied to the net outside the house before they even found the camera!

Incidentally, they used to do this in the early days of closed circuit TV in the 1950's by pointing a camera on a bank of analog meters - poor man's telemetry!

I get a kick out of the things that you can mash up out of your junkbox :-)


Eric Pierce VA3EP - See the Disclaimer in the Introduction

© Eric Pierce and "VA3EP Amateur Radio And Other Geek Pursuits", 1952-2099. Unauthorized use and/or duplication of this material without express and written permission from this blog’s author and/or owner is strictly prohibited. Excerpts and links may be used, provided that full and clear credit is given to Eric Pierce and "VA3EP Amateur Radio And Other Geek Pursuits", with appropriate and specific direction to the original content. 


Friday, January 25, 2013

HF Antenna: All Band Doublet


Another thing that I did over the Dec/Jan holidays was finally get an HF antenna back on the air, hanging from the south outrigger on my combination TV / Ham tower. I use a long rope to pull it up into position so that I can maintain it without climbing.

It is very simple, essentially a 40 meter band  dipole antenna (roughly 33 feet per side) fed with 300 ohm twinlead. This is commonly referred to as a doublet. At the bottom of the tower, the 300 ohm twinlead is connected to an LDG 4:1 balun, then 50 ohm RG-8X coax runs into the shack and is connected to a LDG AT-11 Antenna Tuner, then a NCG 2050 HF wattmeter and to my Yaesu 857D transceiver.

If you want a picture of what that looks like, check this out.

This is pretty much the simplest possible all band antenna you can make. It is only resonant at 40 meters, but the antenna tuner will "transform" the non 50 ohm impedance to the 50 ohm impedance required by the transceiver.

Some hams will argue that the antenna tuner is not perfect, and creates losses, which is absolutely correct (for more info see this reference). However, it is very handy from an operational perspective that you can use one simple antenna to work many HF bands.

My setup will actually tune and work from 80 meters to 10 meters. One ham commented on the air that you have to be careful using an 80 M dipole on 40 M, as that that creates high impedance, high voltage nodes at the center insulator. I find that it works for me at 100 W without any apparent issues. The transmission line is a random length, and is obviously transforming the impedance into something that the wide range LDG tuner can handle.

That is what I find so interesting about AC frequencies, especially at RF.... they act SO different than DC.

Have worked a number of contacts on 80M and 40M, and they are giving me good signal reports. Of course without another antenna to switch over and compare it to, "good" is pretty relative. When it gets warmer again I want to solder on some more wire to extend it to be a 80 M dipole and see how that works. I have tress to hold the ends pretty much as a flat top.

Also, I may putting in some switching arrangement so I can feed it as a "T" against my UFER ground (and maybe a couple of radials along the edged of the house at ground level) on 160 M. All you do here is tie the 2 halves of the 300 ohm twinlead together at the bottom and feed that with the center of the coax. The shield of the coax goes to ground (preferably lots of ground level or elevated radials, from what I have read).

You can read more about my UFER ground here.


Eric Pierce VA3EP - See the Disclaimer in the Introduction

© Eric Pierce and "VA3EP Amateur Radio And Other Geek Pursuits", 1952-2099. Unauthorized use and/or duplication of this material without express and written permission from this blog’s author and/or owner is strictly prohibited. Excerpts and links may be used, provided that full and clear credit is given to Eric Pierce and "VA3EP Amateur Radio And Other Geek Pursuits", with appropriate and specific direction to the original content. 

Thursday, January 17, 2013

Hardware: Storing Resistors and Capacitors


Well, sure have not posted much lately. Had a very busy holiday with family and friends, and did not get in much hacking time.

One thing that I DID do was organize my resistors and capacitors. To do this, I labeled a 24 (actually 25, with one not used) parts drawer with the standard 5% values (one set for resistors, one for non electrolytic capacitors): 10    11    12    13    15    16    18    20    22    24    27    30  33    36    39    43    47    51    56    62    68    75    82    91.

Then I sorted all the parts into the associated bins. They go into the bin by 2 digits of the value, multiplier ignored. Otherwise you would need 1240 drawers! Then when you need a 1K resistor you dig into the 10 drawer and all you have to so is look for the last band to tell it from 10, 100, 10K, etc.

In some cases I had too many of some values, so more than 5 of each value went into labeled freezer bags in a shoe box. Much better than digging around in a HUGE box of resistors with nothing sorted.

For Electrolytic capacitors, label 24 drawers: 1.0 10 100 1000 1.5 15 150 1500 2.2 22 220 2200 3.3 33 330 3300 4.7 47 470 4700 6.8 68 680 6800. You can do this as Electrolytic has wider (usually 20%) tolerance.

Next stop, the semiconductors.


Eric Pierce VA3EP - See the Disclaimer in the Introduction

© Eric Pierce and "VA3EP Amateur Radio And Other Geek Pursuits", 1952-2099. Unauthorized use and/or duplication of this material without express and written permission from this blog’s author and/or owner is strictly prohibited. Excerpts and links may be used, provided that full and clear credit is given to Eric Pierce and "VA3EP Amateur Radio And Other Geek Pursuits", with appropriate and specific direction to the original content.