Author Topic: Switching transistor and current  (Read 2788 times)

0 Members and 1 Guest are viewing this topic.

Offline AethelstanTopic starter

  • Contributor
  • Posts: 16
Switching transistor and current
« on: February 01, 2015, 10:51:54 am »
Hello, I wish to switch a laser on or off using an arduino pin. I have built a constant current supply using an lm317 and this works, the next step is controlling it. I have sourced a 2n2222 transistor to switch it on and off, but I am unsure if the current supplied to the base is added to the current flowing across the junction. If the supply is set to 375ma and the base has, say 25ma, will my laser diode receive 400ma? I have searched and everything just says the saturated base allows the junction to conduct with no mention where the base current goes. Sorry if this is too basic a question, but I am trying to learn!

Thanks  :)
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Switching transistor and current
« Reply #1 on: February 01, 2015, 12:56:55 pm »
Quote
If the supply is set to 375ma and the base has, say 25ma, will my laser diode receive 400ma?

depending on how the diode is wired and where you source that 25ma base current.
================================
https://dannyelectronics.wordpress.com/
 

Offline AethelstanTopic starter

  • Contributor
  • Posts: 16
Re: Switching transistor and current
« Reply #2 on: February 01, 2015, 01:29:55 pm »
Thanks, I was going to switch the transistor using a pin from an arduino at 5v. I would use a current limiting resistor in between the pin and the base, depending on how much current is added. The current limiting circuit I am using is this one http://www.langeder.org/homemade-laser-driver-with-lm317/#comment-1221 and I was planning on putting the transistor on the supply before the capacitor and 1n4001.
 

Offline bugs

  • Contributor
  • Posts: 31
  • Country: 00
Re: Switching transistor and current
« Reply #3 on: February 01, 2015, 01:50:37 pm »
http://arduino.cc/en/Tutorial/DigitalPins
The pins seem to be able to drive up to 40mA, so 25mA should be OK. Can you draw a schematic of the circuit you intend to make? Perhaps it is better not to replace the switch in the linked page with a transistor. You could try to put it on the `-` side of the laser diode.
 

Offline mij59

  • Frequent Contributor
  • **
  • Posts: 693
  • Country: nl
Re: Switching transistor and current
« Reply #4 on: February 01, 2015, 02:30:52 pm »
Its much easier to use a digital logic n-channel mosfet, its voltage driven and has a low on-resistance.
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Switching transistor and current
« Reply #5 on: February 01, 2015, 03:24:47 pm »
Quote
I was going to switch the transistor using a pin from an arduino at 5v.

What's the forward voltage of your laser diodes?

If it is substantially larger than 1.25v, you can use the mcu's gpio pin to control the lm317's adj pin to turn it from a CC driver to a CV driver (with Vout so low that it would not turn on the laser diode meaningfully).
================================
https://dannyelectronics.wordpress.com/
 

Offline AethelstanTopic starter

  • Contributor
  • Posts: 16
Re: Switching transistor and current
« Reply #6 on: February 01, 2015, 03:39:38 pm »
The forward voltage is 2.2v, however there is no data sheet so I am having to guess at current. It is a 300mw laser diode and I shall grab a schematic to attach when I get to my computer. I was planning on placing the transistor on the regulated output, but before the 1n4001 and capacitor. I think placing after the capacitor will result in a surge when I switch it on?
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Switching transistor and current
« Reply #7 on: February 01, 2015, 03:44:46 pm »
2.2v will work.

Take a lm317, from its output pin wire a resistor to your laser diode -> the resistor here will set the current levels when the laser diode is turned on.

From the adj pin, wire a small resistor (110ohm for example - determined by the maximum current you want the mcu's pin to sink) to the laser diode as well.

Connect the mcu's control pin to the adj pin directly.

Initialize the mcu's pin to output a low.

To turn on the laser diode, turn that pin to input; to turn off the laser diode, turn that pin to output.

Done.
================================
https://dannyelectronics.wordpress.com/
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf