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.