AT42QT1070 using output to drive 12v LED

Breakout boards, sensors, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
AcmeVan
 
Posts: 6
Joined: Tue Oct 07, 2014 11:26 pm

AT42QT1070 using output to drive 12v LED

Post by AcmeVan »

Hi, Electronics Dabbler here. I'm using two of the 5 touch stand alone sensors in a Museum display and I've run into an issue I hope y'all can help with. I misunderstood the description of the outputs and got my terms backwards. My plan was to simply use the output of the sensor to switch a 2n2222a which would then pass my 12v signal to an led. wired everything and it's really cool all the leds on the display are on, until you touch a sensor pad then it goes off.... unfortunately this is exactly backwards of what I need. I need the leds off until you touch a sensor pad. I'm more comfortable dealing with relays and 220v than transistors and mA's. Can y'all give me advice on how to invert <?> the signal coming off the output ? Is there a Transistor which turns off when the base is receiving signal ?
Help me Obi Wan you're my only hope...

User avatar
adafruit_support_mike
 
Posts: 67485
Joined: Thu Feb 11, 2010 2:51 pm

Re: AT42QT1070 using output to drive 12v LED

Post by adafruit_support_mike »

Could you post a photo or diagram of how you have things connected now please?

The outputs from the cap sensor should go HIGH when you touch the pad. Connecting that signal to the base of a 2n2222 should turn it on when the pad is touched and off when the pad is released.

User avatar
AcmeVan
 
Posts: 6
Joined: Tue Oct 07, 2014 11:26 pm

Re: AT42QT1070 using output to drive 12v LED

Post by AcmeVan »

Sure, I'll do it when I get home this evening. See, I though the same thing though, I thought when active the signal would go high. When I put a meter on it I get +5 until I touch a sensor pad then I get zero. I'll recheck this evening and get back to you, thanks for the reply !

User avatar
adafruit_support_bill
 
Posts: 88136
Joined: Sat Feb 07, 2009 10:11 am

Re: AT42QT1070 using output to drive 12v LED

Post by adafruit_support_bill »

When I put a meter on it I get +5 until I touch a sensor pad then I get zero.
That sounds right. The 2n2222 is an NPN transistor so it works best for 'low-side' switching. You connect the anode of your LEDs to 12v and the cathode to the collector of the transistor. When the transistor turns on, it conducts to GND via the emitter and current flows through the LED.

User avatar
AcmeVan
 
Posts: 6
Joined: Tue Oct 07, 2014 11:26 pm

Re: AT42QT1070 using output to drive 12v LED

Post by AcmeVan »

WP_20141008_001.jpg
WP_20141008_001.jpg (36.99 KiB) Viewed 286 times
[/img]
adafruit_support_bill wrote:That sounds right. The 2n2222 is an NPN transistor so it works best for 'low-side' switching. You connect the anode of your LEDs to 12v and the cathode to the collector of the transistor. When the transistor turns on, it conducts to GND via the emitter and current flows through the LED.
That's exactly how I have it wired. However the 5 touch momentary is "Active low" so the transistors base is receiving current when the sensor is in it's untriggered state. When triggered the output pin goes low turning the transistor off. I'm attaching picture. Ok, no I'm not. the forum software is calling my jpeg Invalid. Trust me when I say I have the sensor running to the Base, the -12v runing to the collector, the led connected to the emitter. The +12 is running straight to the LED. I did have the polarity reversed, I was running the + through the transistor. I switched out the transistor and flipped all my wiring. Led is on all the time. when I touch a sensor the LED goes out.
Attachments
WP_20141008_001.jpg
WP_20141008_001.jpg (36.99 KiB) Viewed 286 times

User avatar
AcmeVan
 
Posts: 6
Joined: Tue Oct 07, 2014 11:26 pm

Re: AT42QT1070 using output to drive 12v LED

Post by AcmeVan »

Ignore the empty spaces and wires apparently attached to nothing.... that's from me completely tearing the thing apart and reassembling only halfway

User avatar
AcmeVan
 
Posts: 6
Joined: Tue Oct 07, 2014 11:26 pm

Re: AT42QT1070 using output to drive 12v LED

Post by AcmeVan »

I'm going to give this a try- just have to build this 6 X's
thefix.JPG
thefix.JPG (23.26 KiB) Viewed 279 times

User avatar
AcmeVan
 
Posts: 6
Joined: Tue Oct 07, 2014 11:26 pm

Re: AT42QT1070 using output to drive 12v LED

Post by AcmeVan »

Ok, can't find a 9v Zener anywhere in town. Starting to drop back to punt......

User avatar
adafruit_support_mike
 
Posts: 67485
Joined: Thu Feb 11, 2010 2:51 pm

Re: AT42QT1070 using output to drive 12v LED

Post by adafruit_support_mike »

The diagram you've drawn is for a PNP transistor. The ones you mentioned before are NPN transistors which have the opposite polarity.

If you're using NPNs, you want something like this:
npn.jpg
npn.jpg (10.66 KiB) Viewed 253 times

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Products from Adafruit”