|

Notes on
project Gamma - The Control and Monitoring
Circuit
Update and learnings as of 10/18/2005.
After initial attempts to use a Basic Stamp convined me that it just didn't
perform well enough, I switched over to the idea of using a
PIC microcontroller .
PIC's are available in lots of different configurations, and can be programmed
easily using high level languages.
After reviewing
the list of available PIC's, I selected the 18F2620 as a likely prospect.
This part has lots of flash RAM (48k), and is one of the largest and most capable
PIC's available in a 28 pin 300 mil DIP package. I didn't want to hassle with fancy
surface mount type packages - the DIP is much easier to solder and deal with.
The next step was to select a programming language and toolkit. PIC's can be programmed
in pretty much any language, but C seemed like a good basic choice. C is widely known
and well understood, and there are lots of good tools available. The
BoostC compiler
and the SourceBoost IDE are free for small non-commercial use, and offer an outstanding
set of features including an optimizing compiler, built in linker, easy to use IDE,
high performance debugger and real time emulation of simple parts like LCD displays and buttons
right on the PC that you are using for a development environment. The documentation isn't
great, but is getting better. They support the 18F2620.
Next step was to select a programmer, and or programming strategy. It seemed to me that
the ability to reprogram the chip in circuit was critical. After a bit of rooting around,
I found the
Tiny PIC Bootloader , which allows the PIC to be reprogrammed in circuit using
the built in UART/serial prot. Tinybld came with source code for the 18F2620, another
critical feature, and it is free.
The source code for the 18F2620 bootloader that we
are currently using is here.
The binary (.hex file) for the 18F2620 bootloader that we
are currently using is here. It puts the '2620 into internal oscillator mode, running
at 8 MHz.
Before you can use Tinybld to reprogram in circuit, you need to burn the bootloader onto
the PIC using a hardware programmer. There are lots of choices, we selected the
Piccolo Grande programmer because it explicitly supports the 18F2620 and was reasonably
priced. Download the latest version of the
UP software before using the programmer.
So explicitly, here are the steps that you need to go through to start using the PIC in
the control circuit:
Purchase an 18F2620
Purchase a Piccolo Grande programmer
Download the Tiny Bootloader windows client, and the .hex binary from this site
Use UP and the programmer to burn the .hex file into the PIC
Put the PIC into the control board socket
Build a .hex of the control software using SourceBoost
Program the .hex file into the PIC using Tinybld.exe
Proposed requirements (initial draft, 2/2/2005)
Monitor and display:
- Heatsink temperature (in degrees F, optionally degrees C as well) in at least one place on each heatsink.
- Supply voltage to each power module.
- Amplifier output power in watts, return power in watts, and SWR
Optional (for discussion) things to monitor and display:
- Supply current to each power module.
- Bias voltage to each power module.
- Ambient air temperature,
Optional but very nice would be the ability to monitor/display all of this on a PC connected
to a serial port, as well as on a front panel display on the amp.
Monitor the input and output power of the amp, and control the input power (optional, using
some kind of attenuator?) and output power (using bias control).
Wavenode
makes an SWR bridge with voltage output designed for computer
interfacing for $55. Seems very reasonable. There is also a nice circuit for interfacing
their sensor to an A/D converter, and also a nice looking temperature sensor, all
on that web site.
I've decided that N4IP has it right on the control circuit. The
way to go is a Basic Stamp microcontroller, with temperature and
SWR inputs. I have selected their
assembled OEM BS2sx module.
It is faster and has more memory than the entry level BS2ic. The OEM
module comes with the DB9, ready to mount in the amplifier. I paid
$59 plus shipping.
For the display, I've selected the
LCD4041 4x40 LCD unit from Matrix Orbital. It
supports I2C and bar graphs, and should have enough space to display
everything that I care about.
I found one on eBay for $19.95, and another for $79. By accident I bought
both :-)
I am talking to the display using its serial interface over the db9 connector.
The MAX232
RS232 level converter was necessary, because the LCD4041 doesn't
like TTL level inputs on its RS232 port. I provide power to the display through
its 4 pin power/I2C port.
For A to D conversion, I've selected the
Maxim MAX186
low power 8 input A/D converter.
In theory, it should allow easy measurement of voltages up to 4.096 volts using
a math friendly 1 bit = 1 millivolt output.
I am breadboarding up the control unit - once I have it working I plan to design
a small pcb and have it produced by a proto shop (probably by
Olimex ).
The current design for the processor board
to provide system control is now on line.
|