Monday, November 17, 2008

New PIC Programmer

My new Microchip PIC programmer arrived today. I have been meaning to get a USB powered version for awhile now since my new bench machine only has two serial ports... causing the rs-232 real estate to be rather limited. (plus I can't use my ISA serial cards in machines now that the ISA bus is pretty much obsolete ). Instead of going the expensive option, I went the cheap Chinese option and ordered a PICkit2 compatible programmer off of eBay. It took about two weeks to arrive directly from Honk Kong, but it's here and it works.

Of course after opening the package I noticed that it was missing the ZIF sockets. :(



Looking back at the auction I see that this was stated in the description in a non-descriptive Chinese kind of way. Luckily the sockets are cheap and I ordered them from a reputable supplier today.

This will allow me to start using the surplus of samples I have been ordering for free and let me explore the PIC world a little more. I have been spending a lot of time in the AVR ATmega world for the past month or so (most ATmega's don't require a programmer) so it will be cool to compare and contrast the two micro families.

Wednesday, October 22, 2008

The best electronics find I have ever had: Intergraph Logic Boards

I have always had my eye out for surplus electronics and one of the best finds I have ever had was this:


A local business was throwing away a very old Intergraph computer. This was a very large, old, and massive computer. It consisted of several cabinets of hardware, each containing circuit boards of standard TTL logic. The best part about these boards is the fact that every single chip on each of them is socketed.


This board in particular which is labeled as a "High Speed Concentrator" has over 550 74S, 74LS, and a few other miscellaneous chips socketed.


I really wish I had more information about this machine. This board labeled as "MPCB191 Bit Slice 2903 16 Bit Processor" has over 300 socketed TTL chips along with Motorola 68000 series processors.

If anyone has information about what machine this came from, please leave a comment. I am very curious about it. My only regret is that I didn't grab more boards out of the cabinet...

Sunday, October 12, 2008

Tektronix TDS-420 oscilloscope external video display

A nice feature of the Tektronix TDS series of digital storage oscilloscopes is their external video display capability. Most (if not all) Tektronix scopes in the TDS series have an external video output (including my TDS-420) for hooking up an external display.

The internal display is very nice:


Sometimes it would be nice to have a larger display at my bench level while working...

Unfortunately this external video output is in a 9-pin form, unlike the standard DB15-pin connector we are familiar with on our VGA monitors. Because Tektronix labeled the connector as 'VGA compatible', I assumed it held to the VGA standard, and would be compatible with most modern multisync monitors.


To hook up an external display to your TDS series oscilloscope, you must perform the following. Obtain a standard 15-pin VGA connector cable and remove one end, replacing it with a standard 9-pin connector (preferably a metal connector to help with shielding). Wire the new 9-pin connector to the VGA cable as listed here. The 15-pin connector is on the left with pin assignment to the 9 pin on the right:

VGA DB15-S Female DB9 Female
15-pin, 9-pin
1, 1 Red
2, 2 Green
3, 3 Blue
4, - Monitor ID bit 2
5, - N/C
6, 6 GND
7, 7 GND
8, 8 GND
9, - N/C
10, - GND
11, - Monitor ID bit 0
12, - Minitor ID bit 1
13, 4 Horizontal Sync
14, 5 Vertical Sync
15, - N/C

I tied pin 6 on my 15 pin connector to all three grounds (6,7,8) on the 9 pin connector. After assembly of the connector, I gave it a try with success!



One of my Samsung Syncmaster 151v lcds on my bench sync'd up perfectly along with several other lcd monitors I have around. With the output being 640x480 there is plenty of resolution on the display giving the external monitor a very nice picture.

Friday, September 12, 2008

Freedatasheets.com :: my semiconductor datasheet library

So I have been frustrated lately. While working on a project... I will need to look up a datasheet for component n. I commonly turn to google with a search such as '[part number] datasheet' with sometimes good and sometimes bad results. I usually end up at one of many bad datasheet archive websites that will go unnamed. By bad, I refer to sites that have broken links, incorrect datasheets for the part described, mazes of links that I must click through, annoying pop-ups, and primarily wasted time.

Because of my frustrations, last weekend I threw together a site for my own collection of datasheets. It is now available for everyone at freedatasheets.com . I have done my best to collect datasheets from large semiconductor manufacturers (STMicroelectronics, National Semiconductor, Atmel, Freescale Semiconductor, Microchip, Xilinx, Maxim, Fairchild Semiconductor to name a few) and collected ALL of there datasheets into one source. I currently have about 30,000 datasheets organized, in a database, and fully text searchable for your component database needs. I plan to keep adding to this database, their are still many component manufacturers whose datasheets I would like to obtain.

Sunday, July 13, 2008

Plant watering system

For the past few years I have been growing various cayenne and habanero peppers in planters off of my condos balcony. The only issue with this besides lack of space has been watering. Previously I have been simply filling several large containers with water and carrying it out to the plants. This is fine in the beginning of the season, but by late July and August when the plants are large and consume much more water, this has been a chore. Multiple watering trips are necessary as well with watering them both in the morning and night. For a solution, I built a simple microcontroller based system that I could automatically water the plants on a set cycle. It also has a simple rain detector that preempts any further watering for a set amount of time after it has rained.


I designed the system around a Rabbit RCM3400 core 8-bit microcontroller. Realistically this microcontroller is rather overpowered for this system, ( a pic would have worked just fine) but I wanted to begin playing with the Rabbit's cooperative multitasking functionality... and I have a few of these micros laying around. There are a couple neat features of this micro as well such as the real-time clock and built in ADC's. For functionality, the rabbit drives a serial LCD for displaying current information on the system and has 5 microswitches along with a rain sensor for input. The system drives a latching relay which then turns on a 12v solenoid based electronic valve to start the water flow to the plants.

This is final stage of prototyping. It has been working fine for the past five days so I am beginning to build it into an enclosure this week.


The system has two adjustable parameters, frequency of the watering cycle and duration of the actual watering. The five microswitches will be placed under the lcd to allow the lcd to show the functionality of the buttons. I plan on adding a more robust menu setting that will allow control for multiple plants in the future. The left two adjust the watering frequency in hours, the next two can adjust the watering duration in seconds. For my small plants, 20 seconds or so of watering is enough to saturate the soil. The final button on the right is a forced watering function that allows me to provide a 15 second burst of water without resetting the current counters.

Once timing parameters are set, the micro begins counting down to the set watering time. The display shows how many minutes are remaining to the watering cycle. When the counter hits zero, one of the outputs fires for 250ms, enough to engage a latching relay which in turn opens the solenoid valve to start the water flow. Once the set watering duration is counted down to zero, the relay is fired for another 250ms to disengage it and cut power to the solenoid valve stopping the water flow. The process then starts over.

The rain detector is just two thin strips of aluminum foil spaced closely together on my balcony railing. When rain falls and closes the connection, a pin on the micro goes high letting it know rain is detected. The watering process is then put on hold for a set amount of time until watering begins again.


Now for a water source, I tapped into the cold water supply line underneath my sink. This is my only real option as I don't have any access to outside building watering on the top floor. The water is split with a tee fitting and ran to a solenoid valve. From here I ran a line out to my plants. Through a series of different tubing lengths and tees I was able to get an even watering distrubution among all three plants. The actual water is supplied to the plants through a polypropylene tube with a series of holes drilled through them.

The system works quite well.

Future upgrades will add control for multiple plants, and a better timing interface so I can set more precise watering cycles. If I want to go all out, I will enable the rabbit's ethernet interface to pull down real weather data automatically and have the micro set the watering cycles based on that day's conditions...

Tuesday, June 17, 2008

Homemade GPS Antenna

I needed a very small, lightweight passive GPS antenna for an ET-301 USGlobalSat GPS module, but didn't have anything to use on-hand. I started some research to make one but information on this topic is very limited... so I figured a good option would be to make my own. As far as passive antennas go, there doesn't look to be very much too them. I looked at lots of pictures of antennas online and reverse engineered them as best as I could. The result was an antenna made out of a thin piece of metal that is 24mm x24mm located 2mm over a 30mm x 30mm ground plane.

Now i'm not an RF engineer, and basic antenna math fails me on this antenna design (1/4 wavelength at a gps frequency on the L1 band of ~1.5Ghz would be 50mm) which is much larger than the antenna I designed mine after... but upon power up I had GPS lock.

So it works... which really shows how sensitive modern GPS receivers are. This is really amazing since this module is sitting inside, on my bench, located about 6 feet away from the nearest window... and I made the antenna by copying antenna designs I found online. The NMEA $GPGGA string shows that there are only 4 satellites in view (which is expected since I am indoors) so I am really looking forward to testing it outside.

At some point I hope to find a good resource for GPS antenna designs to really make a proper antenna the right way, but for now it works... and I am still impressed by the sensitivity of this receiver.

Tuesday, June 10, 2008

Cooperative multitasking

Sitting down this past weekend for a large amount of time to begin a new project (details will be provided in the next post)... I discovered an amazing feature with Rabbit Semiconductors microcontrollers. Cooperative multitasking. I have actually always known about the multitasking capability of these processors, but never actually used them in any real form.

Cooperative multitasking unlike preemptive multitasking has many benefits. For one, variables can be easily shared among different tasks. This simplifies the necessary code needed immensely as you don't need to take any necessary precautions while sharing variables in a typical interrupt driven preemptive environment. Cooperative multitasking also allows many tasks to be run at once (as they only appear to... time slices are actually given to each function running just like in any modern multitasking OS). The microcontrollers also take advantage of the natural delays that occur in most code execution to provide cpu cycles to other tasks.

Playing with this multitasking environment I was able to update information on an LCD via an array of switches in real-time, without taking any time away from any other running timers or processes. It essentially allows me to run several tasks at the same time while providing data input without the necessity of any type of interrupt. This is extremely powerful.

I have nearly finished the code for the current project tonight, I hope to have the project finished by the end of the week as an update to what this project is will be given upon completion.