Transistor driver confusion

devian_t

New Member


I found this on a nuts and volts magazine. The author writes that this driver will increase the range between the ir emitter and receiver. This supposedly increase the 25mA that the picaxe output pin can produce to about 73mA. The first command on my code "high 2" is for the transistor on the top of the pic and pin 1 on "infraout 1, index" would be the transistor on the bottom.

Code:
high 2   'enable IRMB
            'transistor

do                               'loop indefinitely
   for index = 0 to 8      'for-next loop that cycles 9 times
      high 4                    'red LED indicates that picaxe is sending a signal
      infraout 1, index     'send signal on pin 1, signal is the value of index
      pause 250              'slow down a bit
      low 4                     'turn off red LED
      pause 250              'slow down a bit more
   next index                 'increment index (index=index+1)
loop
Is the transistor really improves the range? Advantages and Disadvantages? Are there other ways to increase range while sacrificing less pins?

Sorry about the pic. It's from an online draw program.
 
Last edited:

Technical

Technical Support
Staff member
You don't need the top transistor and it's base resistor at all.

This system looks like it was designed for a mixing a pwm signal with a manual bit-bashing high/low signal, which you are not doing.

So just use the one transistor and infraout command on that output!

The transistor does improve range as it allows more current through the IR LED - IR LEDs can take a surprisingly high current.
 
Last edited:

devian_t

New Member
Do I got it right? If I only need the 2nd transistor this enables the ir LED to have the power directly from supply instead of getting it from the picaxe pins.

This system looks like it was designed for a mixing a pwm signal with a manual bit-bashing high/low signal, which you are not doing.
This sounds violent and intriguing, "bit-bashing." :) What does this mean? I do know that pwm signal can be used for a motor, it pulses on and off and the more the motor is turn on at a time the faster the motor. But how will this apply to ir led?
 

Andrew Cowan

Senior Member
IR control is made from short bursts of high frequency pulses.

Most PICAXE IR stuff runs at 38KHz (the short pulses happen 38,000 per second). However, the commands are much slower - eg a 1mS on, 1mS off pattern may represtent a certain command.

While a PICAXE can use the Infraout command to provide this effect (high frequency pulses at a lower frequency), some other chips (eg logic) may not be able to do this as simply. The method used in your circuit diagram has two inputs - one for the high frequency 38KHz signal (eg a 555 astable), and the other for the lower freqency control signal.

Understand any of that? I've made a bit of a mess of explaining it! Bit-Bashing is the term used for manually making a complex command - eg controlling an I2C chip using high, low and pause commands, rather than the built in I2C commands available on the X series of chips.

A
 

cactusface

Senior Member
Hi,
I first used a circuit like that to drive an ultrasonic RX, (should they not be a pair of complimenty tranies?) but did'ent find it that good. So I changed it to a simple circuit, replace the trany with a BS170 FET As Technical says you just get rid of the top trany and base resistor, reduce the IR LED series resistor to about 47R I used that value and I get quite a few inches using reflected IR. Also use some sleeving to fit over the IR LED/s (I used 2) so the IR only goes forward. My first mistake was thinking the IR could'ent go backwards to the sensor, which was a TSOP2438 the IR LEDS are TSAL6400's..

Well hope this might help, see http://btinternet.com/~melvynsaunders for pictures, info, etc.
Regards
Cactus
 

devian_t

New Member
@Andrew Cowan
While a PICAXE can use the Infraout command to provide this effect (high frequency pulses at a lower frequency), some other chips (eg logic) may not be able to do this as simply
I understand this part. I dont know how to do it but I understand the concept.

one for the high frequency 38KHz signal (eg a 555 astable), and the other for the lower freqency control signal.
You lost me on this part.

@cactusface
47R I used that value and I get quite a few inches using reflected IR
It was indicated that 47R was to be used but I can't find any on my stuff so I used 220R. :)

Is there an advantage on using the command as opposed to making the signal manually?
 

cactusface

Senior Member
@Russbow,
Sorry that was my fault, so keen to get the http bit in that I forgot the www. which is also needed, but without the http:// you get my BTYahoo site which I don't use! its rubbish. http://www.btinternet.com/~melvynsaunders.

I just used a cmos 555 timer to get my 38KHz for the IR, passive IR don't work very well, too much stray IR about. The lower value of 47R gives you more current thro' the LEDS and so more IR output.
Regards.
Cactus.
 

Andrew Cowan

Senior Member
Here's my MS Paint picture to help:
- Input A is the input to one transistor. This could be from a 555 astable timer. It's frequency is 38KHz.
- Input B is the input to the other transistor. This could be from another astable, or from a PIC/PICAXE without an Infraout command.

The output is the sort of signal that IR control needs. It is very easy to generate with the Infrout command using a PICAXE - the method using two transistors is only needed if you are not using a PICAXE. If you have a PICAXE you should use it - it will be far easier and gi=ve a much more reliable signal.

A
 

Attachments

Dippy

Moderator
Thats a good drawing by Andrew.

If you wanted a sound analogy:
Imagine one transistor supplying the continuous high frequency
(The 'carrier' e.g. 38kHz).
Peeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee.
And the other transistor swtiches the carrier on and off for the desired times.
(The 'modulation')
peeee peee peeeeee peee

Andrew's drawing shows this clearly.

Personally I think the transistor circuit design could be a lot better.

But as said, Infraout does the hard work for you.
So, dump the top transistor, and chuck your PICAXE Infraout signal into the bottom one via the res.

The Manual says all that is needed: "Transmit an infra-red signal, modulated at 38kHz."

The bottom line is that you are making a current amp to put more current through the IR LED.
More current = more power output = greater range. (Don't go OTT with this though ;) ).

If your power supply is a bit weedy and the modulation is causing some funnies with your PICAXE, shove a >100uF cap between the top of the 220R resistor and ground. It'll act like a local reservoir and reduce noise to the rest of your circuit.
 
Last edited:
Top