Tuesday, May 9, 2017

What do Baseball and IR Optical communication have in common?

Seems like a strange question to ask, to start a blog post.
But like they say, a picture is worth a thousand words.

Front view of the IR PWM "Cube" transmitter

So to answer that question...
They share a storage container.
Here is the first iteration of my IR PWM Optical transmitter.  The case is a cube that is used to store a signed baseball.  It measures 3 1/8" per side.  This transmitter uses the same LEDs as my beacon, the Osram SFH4550 IR emitter.  I have them in metal LED holders that I picked up from Radio Shack.

I use a standard 555 timer chip to generate the PWM.  The duty cycle is 22% at a frequency of approximately 70Khz.  Below is the schematic of the transmitter.

555 timer PWM circuit

Pin 5 is used as the input from the audio amplifier.  The audio modulates the duty cycle and not the PWM frequency so my original receiver circuit is able to demodulate the audio. The 555 timer is running in the astable mode.  D1 is a 1N914 switching diode and it's placement between the discharge pin and the trigger pin changes the charging of the capacitor to allow a less than 50% duty cycle.
I wanted a duty cycle of approximately 20% so I could feed 400ma through the LEDs. According to the data sheet that gives a good balance for improved radiant intensity and current draw.

Back of the IR PWM "Cube" transmitter

The back of the transmitter has the jack for the audio source, either a electret microphone or from a laptop sound card for digital modes (upper left).  The knob is connected to a potentiometer that controls the gain of the audio amplifier.  The jack in the lower right is for DC power.  For this version of the transmitter I'm using 6 - AA rechargeable batteries with an output of 7.5 volts.



First version of audio amplifier
This is the schematic of the first version of the audio amplifier that I built.  I liked the way it sounded however I felt that the parts count was too high and the three pole low pass filter was a little over kill, so I simplified it in the final version.

Vero board layout of the PWM and audio circuits
Here is the layout of the boards.  I put the audio amplifier and the PWM/switching circuits on separate boards.  I felt that would give me some isolation of the 70Khz switching noise and the audio amplification.  In testing I haven't noticed any switching artifacts from the transmitter.

I haven't completed any distance testing.  I have bounced the light off of the neighbors garage on one side and the trees in the other neighbors yard, but living in the city the distance is pretty small.
This will be something for another day.

Tuesday, February 14, 2017

PWM Optical transmitter using a 555 timer

Finally!

After fiddling with the ATtiny based optical transmitter with mixed results for almost 2 months, I put that design on the shelf and pulled out a 555 timer.

I had a solid PWM duty cycle with the ATtiny45.  I could modify it to produce any duty cycle up to 100%.  I had a nice 600Hz tone playing through it with a 20% duty cycle, firing an SFH4550 LED with 400mA of current.  What I couldn't get to work was intelligible audio when adding a microphone and Op-amp.  I got close, but not close enough for me, so I took a break and created this.

555 timer based Optical PWM transmitter

It is a PWM transmitter based on the 555 timer.  The output is fed through a .1uf capacitor to an IRF510 MOSFET, which switches an SFH4550 IR LED.  Power is a 9v battery, so I have a 5watt 18 ohm current limiting resistor which brings the current to just under 400mA.  To be able to feed that much current to the LED I need to have the duty cycle at 20%.  The 555 timer can be used for less than a 50% duty cycle if you put a diode from pin 7 (discharge pin) to pin 2 (trigger pin).  Also R1 needs to be smaller than R2, which is reversed from the traditional timer circuit.  Audio is connected to pin 5 (control pin) through a .1uf capacitor.

The PWM Frequency is about 85 kHz.
These are the values I am using to set the frequency and duty cycle;
R1 = 2200 ohms
R2 = 12000 ohms
C1 = .001uf

For testing I've been using my iPhone to provide audio.  Yes I am using music, but only for the initial tests.  Once I build out the audio amplifier, I will post the completed circuit.  The plan now is to create an amplifier that will be used for an electret microphone as well as a level for a line input from a laptop for digital modes.

Until next time - 73, Warren.