element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Community Hub
Community Hub
Member's Forum Using 12v at base of transistor
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Leaderboard
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Community Hub to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Verified Answer
  • Replies 29 replies
  • Answers 10 answers
  • Subscribers 538 subscribers
  • Views 6255 views
  • Users 0 members are here
  • transistor
  • 12v
  • car
Related

Using 12v at base of transistor

ntewinkel
ntewinkel over 9 years ago

Hi all,

 

I'm thinking of using a transistor in a car circuit, to switch a light depending on the state of another light.

 

So it will be 12v as the signal at the base of the transistor.

 

I have a bunch of pn2222a transistors, and I can't figure out from the datasheet what the maximum means for that. It seems to be a reverse maximum (ie, don't let the output be more than 5v over the base voltage).

 

So the question is - is it possible to switch a transistor like that using 12v at the base?

 

Thanks!

-Nico

 

ps, I know I can easily do this using relays, but those take up more space, and I'd prefer to avoid the mechanical bits.

  • Sign in to reply
  • Cancel

Top Replies

  • michaelkellett
    michaelkellett over 9 years ago +2 verified
    Short answer - no. The base of a transistor is current driven - think of the base emitter junction as being a diode (the arrow on the emitter shows the direction of conventional current when forward biased…
  • ntewinkel
    ntewinkel over 9 years ago in reply to michaelkellett +2
    Thanks Michael! To be more precise with the details, they are to switch the LED taillights on a camper trailer. I should test how much it draws. The description said 3W, but that might be for the whole…
  • D_Hersey
    D_Hersey over 9 years ago +2 suggested
    Maybe there is a POTS soln: How To Install A Trailer Light Taillight Converter In Your Towing Vehicle I am not quite sure how the brake light signal is derived from turn signals. If you can come up with…
  • michaelkellett
    0 michaelkellett over 9 years ago in reply to michaelkellett

    Hello Nico,

     

    Here's a better design - two extra diodes but the relay only needs to be DPST so will be cheaper and easier to find.

     

    image

     

    I think this nearly does what you want - if only one input is high the appropriate turn light comes on, if both inputs are high the relay energizes and the brake lights come on (but so do the turn lights), the brake lights stay on until both inputs go low because the c terminals on the relay hold it on so long as there is power through either diode.

     

    I don't really like the turn lights coming on at all when braking but this gets much harder since you need quite a lot of 'statefullness' in the controller - are you up for a micro ?

     

    MK

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • ntewinkel
    0 ntewinkel over 9 years ago in reply to michaelkellett

    That's really good, Michael!

    You're right about the turn lights coming on when braking being a bit annoying, and might be confusing to other drivers.

    It's similar to hooking up the wires directly to the red and orange lights together, but gains the benefit that signals are only using the orange.

     

    ...this gets much harder since you need quite a lot of 'statefullness' in the controller...

    That's the conclusion I came to as well.

    It seems that the only way to tell if it's a turn signal is by the flashing action.

     

    are you up for a micro ?

    But of course! That's probably where I'm most comfortable. My worries are that the micro would have to start up very fast, or else be kept powered up by an alternate source. I'm guessing that a capacitor would keep it running long enough between blinks though. After that it should be possible to determine when a light has been on and off, and then flash the orange indicator on the transition from 0v to 12v, maybe missing the first flash, but that's ok.

     

    ps, the trailer does have it's own 12v power source too, so that could be used to power it, however, the failure mode (ie, no trailer power available) should provide safe function still (maybe just using the red lights, as would be the usual for trailers).

     

    Maybe the easiest way to handle it is to add two lines from the car turn indicator wires to directly control the orange turn indicators.

     

    Thanks,

    -Nico

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • michaelkellett
    0 michaelkellett over 9 years ago in reply to ntewinkel

    Hello Nico,

     

    Simple micros with on chip RC oscillators can be up an running in under 1mS quite easily - I don't think you need store power between blinks because if the brake is on there is always at least one turn signal high to provide power.

     

    Do you have  a micro preference - almost anything would do (PIC, AVR, ARM) and do you need it to be in a DIL package or are you OK with SO which would need a board. The whole thing will be much more reliable with a board of course.

     

    MK

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • ntewinkel
    0 ntewinkel over 9 years ago in reply to michaelkellett

    Hi Michael,

     

    ...up and running in under 1mS quite easily

    That's really good to know.

     

    For the between-blinks power store I was thinking that would be needed for the case where it's just a turn indicator flashing (no brakes). Out of curiosity I might test to see how long one will run on a capacitor.

     

    Do you have  a micro preference

    I do have a micro preference, mostly due to laziness image  Because my stuff is pretty much all hobby I've decided to focus on Arduino and Raspberry Pi - I found that otherwise I end up spending my time learning new tools instead of building projects. I also have TI MSP430, and CCS isn't too bad, but Energia makes using those super simple too.

     

    I'm still at the DIP stage. I have a few surface mount ATTiny13 chips because I needed one for an art project (it's glued to a rock and "wired" with conductive glue).

     

    I haven't created any PCB's yet. A lot of my projects never go beyond breadboard, and the ones that did I've used perf board - a bit messy but worked well enough.

     

    I do have some nice little 3x2x1 inch project boxes that include perf board in it, that I bought from Radio Shack when they were clearing out all that stuff before they became "The Source" here in Canada. One of those might work well for this.

     

    In terms of controllers inventory, I have a couple of DigiSparks (ATTiny85 based) that might work well for this, or maybe one of the TI MSP430 chips because their DIP format would make them easy to add to a board.

     

    Cheers,

    -Nico

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • ntewinkel
    0 ntewinkel over 9 years ago in reply to ntewinkel

    Note to self, because I'll probably need it later...

    Removing 5 second startup delay for Digispark

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • D_Hersey
    0 D_Hersey over 9 years ago

    Maybe there is a POTS soln:

     

    How To Install A Trailer Light Taillight Converter In Your Towing Vehicle

     

    I am not quite sure how the brake light signal is derived from turn signals.

     

    If you can come up with the FSM I am sure this can be configured with a coupla logic chips

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • dougw
    0 dougw over 9 years ago

    I'm not sure this state table is what you have, but once the states are populated, the logic to derive each state can be determined.

    It the table your vehicle controls (in blue) generate control signals (in green) and you want the output signals in yellow and red.

    The output signals must be derived from the green control signals. there are only 2 control signals, but they each have five states (off, on dim, on full, flashing off-on and flashing dim-on) The darker colours indicate flashing on-dim. If I have it right, there are 14 input states and 11 output states.

    This doesn't need a microcontroller to sort out as your yellow turn signals only have 2 states and your tail lights follow the green control signals, except when the yellow signals are flashing. The dim condition doesn't matter if you use the green signals as power rails for your tail lights. etc.

    Some states are not possible because, for instance, the left and right turn controls cannot indicate both at the same time.

    In order to figure out the state it is necessary to detect flashing. The two types of flashing don't matter, but it is harder to detect flashing because it isn't always the same.

           

    I-STATE 0124358910121113161716161717
    ControlsLightsOFFONOFFOFFONONOFFONOFFOFFONONOFFONOFFOFFONON
    ControlsLeft SignalOFFOFFONOFFONOFFOFFOFFONOFFONOFFOFFOFFONOFFONOFF
    ControlsRight SignalOFFOFFOFFONOFFONOFFOFFOFFONOFFONOFFOFFOFFONOFFON
    ControlsBrakesOFFOFFOFFOFFOFFOFFONONONONONONFLASHINGFLASHINGFLASHINGFLASHINGFLASHINGFLASHING
    InputsLeft WireOFFDIMFLASHINGOFFFLASHINGOFFONONFLASHINGOFFFLASHINGONFLASHINGFLASHINGFLASHINGFLASHINGFLASHINGFLASHING
    InputsRight WireOFFDIMOFFFLASHINGOFFFLASHINGONONONFLASHINGONFLASHINGFLASHINGFLASHINGFLASHINGFLASHINGFLASHINGFLASHING
    OutputsLeft TurnOFFOFFFLASHINGOFFFLASHINGOFFOFFOFFFLASHINGOFFFLASHINGOFFOFFOFFFLASHINGOFFFLASHINGOFF
    OutputsRight TurnOFFOFFOFFFLASHINGOFFFLASHINGOFFOFFOFFFLASHINGOFFFLASHINGOFFOFFOFFFLASHINGOFFFLASHING
    OutputsLeft TailOFFDIMOFFOFFDIMDIMONONONONONONFLASHINGFLASHINGFLASHINGFLASHINGFLASHINGFLASHING
    OutputsRight TailOFFDIMOFFOFFDIMDIMONONONONONONFLASHINGFLASHINGFLASHINGFLASHINGFLASHINGFLASHING
    O-STATE012345667878910991010

    Note the brakes can be flashing if you pump the brakes - you don't want this to cause turn signals to come on unless the turn signals are also on.

    I am not sure there is enough information in the control signals to know what is going on if you pump the brakes at the same rate as the turn signal flashes - while they are flashing.

    If you use a flashing detector, it will delay your turn signal activation.

    I hope this doesn't look too confusing and complicated - it is just trying to set up a way to document what you and Michael have been saying in words, and in translating to a circuit, it should simplify to something similar to what you and Michael have been designing.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • ntewinkel
    0 ntewinkel over 9 years ago in reply to dougw

    Thanks for all that, Douglas!

     

    It's after midnight, so I'll keep it quick, and check in more detail later, but we can reduce the table a little bit: there is no "Dim" - the lights have a separate wire and separate bulbs/LEDs on the trailer, so we can ignore anything to do with night-lighting for the logic. The signals get a full 12v when on.

     

    Thanks!

    -Nico

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • michaelkellett
    0 michaelkellett over 9 years ago in reply to dougw

    No much time today but just a couple of quick thoughts.

     

    1) I would go for the AVR processor but code in C - I just don't trust the Arduino code environment for precise timing, start up etc. The Atmel software tools are free and nice.

     

    2) @Doug - I'm used to classic state diagrams which show how events cause transitions in the machine's state - I don't see quite how your table can show how the reaction to new input conditions is affected by the state the system is already in.

     

    MK

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • D_Hersey
    0 D_Hersey over 9 years ago

    You might consider implementing this in PROM.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
<>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube