[Laser] PWM PIC

C. Turner turner at ussc.com
Tue Mar 3 20:13:29 EST 2009


Hi James,

A few details about this PIC:

We were invited to by several people associated with the U of A College 
of Optics (they are one of those that make the big telescopes:   They 
were polishing some 8.4 meter diameter mirrors when we dropped by their 
mirror lab) to talk about some of or microwave (10/24 gig) and optical gear.

In advance, we decided to leave them with a "simple" version of an 
optical transceiver:  K7RJ had laid-out a board for and constructed an 
optical receiver while I put together a somewhat "minimalist" PWM 
transmitter, the idea being that, with the inexpensive Fresnel lenses 
bought beforehand from the University of Utah bookstore, we'd construct 
an optical transceiver out of black foam-core posterboard held together 
with thermoset glue.  The idea was to show the group - some of whom are 
professors in optics down there - a device that followed the KISS principle.

Down there, we commandeered a portion of their optical lab and threw 
together this transceiver.  While we didn't have time to totally 
complete the transceiver, we did construct the two boxes - one for TX 
and the other for RX:  What was left was to set the focus of the two 
boxes, bind them together as a single, "binocular" unit (one side being 
TX and the other being RX) and then set the paraxial alignment.  For our 
test, then, we simply used a one-way transmission using the TX box by 
itself, using an already set-up receiver at the other end.  While the 
path was only about 7-8 miles, I believe that even with this rather 
low-power Radio Shack LED that a clear-air path of 30-50 miles would be 
quite practical.

***

The PWM is based on a PIC12F683 - an 8-pin device.  In many ways, it's 
based on my older PWM transmitter found here, having stolen a bunch of 
code from it:

http://www.modulatedlight.org/optical_comms/LED_pulse_width_modulator.html

(Again, the above link is NOT the one that I'm describing in this message!)

This new unit was designed to be a bit smaller and more-limited in its 
scope - not to mention having a simpler circuit, yet work "adequately" well.

In a way similar to the Ramsey kit, it also has a "3-bit" AGC circuit, 
but more thought was taken to provide a more-transparent AGC action 
(Ramsey poorly chose resistor values, for starters!) so it has about 
40dB of operational range with reasonable-sized gain steps and a 
"minimally-annoying" AGC operation.  If I get time to do so, I'll add 
the option of using a FET-based gain cell which has a continuous gain 
function rather than step-action, the user deciding which circuit to use 
at build-time.  The only other IC is a dual op-amp used to bring the 
signal up from microphone level to that capable of driving the PIC's A/D 
input and provide adequate Nyquist filtering.

For speech, it has a sample rate of 31.25 kHz with 8 bits of 
quantization - which, with the AGC action, is quite good for speech:  
Considering that only the shorter paths are likely to achieve >40dB S/N 
anyway, 8 bits is more than adequate!  The use of this sample rate 
greatly relaxes the requirements of the Nyquist filter, considering that 
one needs a flat passband to only 3 kHz or so for speech.

It also has a "tone" mode (with the sample rate running at 15.625 kHz - 
there's more for the processor to do so the rate had to be slowed) in 
which sine wave tones can be generated, such as a "fixed" 1 kHz tone for 
alignment, a variable tone can be selected from 20 Hz to about 2 kHz, 
and a dissonant tone sequence that really sticks out of the noise.  
Since the PIC uses its own internal clock, the tone frequencies are 
guaranteed to be accurate to only a few percent, but this concession 
also simplifies construction and allows everything to be crammed into an 
8-pin device.

The PWM output is just a logic level signal "square" wave (0-5 volts) 
that drives a transistor - in this case, a BS170.  The light emitter 
could be about anything - an LED, laser diode, or even light bulb (not 
recommended) but for the construction, the Radio Shack LED (276-020) was 
placed in series with a 68 ohm 1 watt resistor to set the peak current 
to about 140 mA with a 12.6 volt supply - around 70 mA average.  I could 
just as well have used a laser diode module or a high-power LED with the 
appropriate circuitry, but I decided to stick to an LED that was 
available for $2.29 from the store down the block!

Anyway, I need to re-work the circuit to simplify it even more as well 
as add provisions for the "alternate" gain control scheme, then I'll 
stick details online and, if there's interest, make the PIC available.  
As for a board or a "kit", we'll have to see...

73,

Clint
KA7OEI


> Clint:
>
> from your recent post on the subject "Re: [Laser] Light Communications 
> Questions. (Stan)"
>
> ...a newer, simpler one that I'm in the middle of writing up but have not 
> yet posted details or pictures...
>
> ...using a Radio Shack "high power" red LED (P/N:  276-020) modulated with 
> my "new" PWM PIC (not yet online) with 10's of dB of extra margin...
>
>
> I just want you to know that you have my complete attention.  With eagerness 
> and appreciation I await, if impatiently, the posting of this new material.
>
> Thank you.
>
> James
>  n5gui 
>   



More information about the Laser mailing list