Jump to content

As of July 17, 2015, the LabJack forums here at forums.labjack.com are shut down. New registrations, topics, and replies are disabled. All forums are in a read-only state for archive purposes.

Please visit our current forums at labjack.com/forums to view and make new posts. To post on the current forums, use your labjack.com login account. Your old LabJack forums login credentials have been retired. There are no longer separate logins for labjack.com and LabJack forums.


Photo

U12 as switch


  • Please log in to reply
3 replies to this topic

#1 pandrew

pandrew
  • Members
  • 2 posts

Posted 09 July 2006 - 04:11 PM

Hi,

I want to use the Digital IOs on my Labjack U12 as a switch to turn a 12V 60mA power supply on/off. I am using an NPN transistor to achieve this using one of the IOs to provide the base current, but am experiencing difficulties . I am using the circuit as in the attached diagram,
Posted Image
If I connect the Labjack's +5V as the supply voltage (Vs), IO0 as 'chip output', and GND as 0V (with appropriate resistor Rb), setting IO0 to high/low switches the transistor on/off as expected with the current ranging from 0mA in the 'off' position to about 18mA in the 'on' position (I will worry about the exact current Ic later as I am using my 272Ohm multimeter as the load at the moment). However, when I change Vs to +ve of my 15V DC power supply, keep IO0 connected to 'chip output' and connect GND and -ve of the 15V power supply to 0V (changing Rb once again to appropriate value), current flows through the transistor even when there is no base current flowing and therefore the switch does not work and results in me frying loads of transistors.

I am using an NPN transistor with max current of 0.1A, hfe(min) of 420. Is my method going to work, has anyone got any simple circuit diagrams for such a Labjack switch and are there any easier ways for me to achieve this? Any help very much appreciated - am sure it is something very simple I am missing!!!

(the end objective of my project is to control the solenoid points on the track of a model train set using my PC)

#2 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 10 July 2006 - 08:56 AM

Note sure what is wrong with your circuit (don't forget the IO lines have a 1500 ohm series resistor), but check out the ULN2003 (search for ULN2003A or ULN2003AI at ti.com). One word of caution is that the load ground is the same as the logic ground, so I suggest using a 100 ohm resistor between the ULN2003 ground and the LabJack ground to prevent load current from going into the LabJack or host. The ULN2003 has 7 switches to ground. Here are connections to control two switches: U12 IO0 to ULN2003 pin 1. U12 IO1 to ULN2003 pin 2. U12 GND to 100 ohm resistor, other side of resistor to ULN2003 pin 8. Your +Vs to one side of your loads and to ULN2003 pin 9. Other side of Load0 to ULN2003 pin 16. Other side of Load1 to ULN2003 pin 15. Your power supply ground to ULN2003 pin 8.

#3 pandrew

pandrew
  • Members
  • 2 posts

Posted 10 July 2006 - 03:40 PM

Thanks very much for the advice. I managed to get my circuit to work in the end (changed the transistor type I was using), but I am going to try the ti.com chips you suggested as that looks like a much better overall solution - will have approximately 30 switches I need to control in the end, so am very much experimenting. Cheers Andrew

#4 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 10 July 2006 - 09:29 PM

Note that the ground issue also applies to your transistor circuit. Looking at your diagram above, we would recommend a 100 ohm resistor between the transistor emitter and LabJack ground. This will discourage the load from sending any large ground current through the LabJack/host.


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users