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
Experts, Learning and Guidance
  • Technologies
  • More
Experts, Learning and Guidance
Ask an Expert Forum 2N7000 as VCR
  • Blog
  • Forum
  • Documents
  • Leaderboard
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Experts, Learning and Guidance to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Suggested Answer
  • Replies 31 replies
  • Answers 6 answers
  • Subscribers 294 subscribers
  • Views 3622 views
  • Users 0 members are here
  • mosfets
  • attiny85
  • voltage controlled resistor
Related
See a helpful answer?

Be sure to click 'more' and select 'suggest as answer'!

If you're the thread creator, be sure to click 'more' then 'Verify as Answer'!

2N7000 as VCR

tibmeister
tibmeister over 9 years ago

Ok, so going to start off by stating the issue I am facing, Q1 (2N7000) is getting hot enough to cook with.  Seriously, I'm measuring 50C on the sucker.  What I can't figure out is why.  Now I will state, I am far from an engineer, I am easily classified as a noob.

 

Anyway, I have attached my schematic.  The sensor has a resistive heater that is driven by Q1 on the HA pin, and the trick is it has to cycle between +5VDC and +1.4VDC at regular intervals.  So since I am using an ATTiny85 (I love these little guys!) I'm looking at max Vout on the IO pin of +4.85VDC @ ~20mA.  So, I came up with using the LM324 as a small amp to bring my IO up to a full +5VDC and then as a buffer to ensure that even as I put load on Q1 Source I will maintain the desired voltage at the sensor's HA pin.  This may not be the best way to do this, but like I said, noob here.

 

So, if my calculations are correct, G1 of the LM324 should represent about a 10% amplification of Vin.  So at most I'm pushing something in the neighborhood of +5.5VDC into V+ of the LM324 G2, which should be well within specs.  As far as Q1, since I'm using it as a voltage controlled resistor I'm not running Q1 into saturation, which I don't think is bad but I'm almost wondering if my heat issue is coming from the fact that on the drain of Q1 I have +12V and on the source I have +1.4-5VDC, so that's a lot of Vdrop which I'm sure turns into wattage and dissipated heat.

 

I am struggling with this one and hoping someone could get my head straight on it.  Oh and yes, I have a lot of filtering caps and zener diodes for over-voltage protection.  It's cheap insurance in my mind having the zeners, and the caps, well it can't hurt to filter out any in-rush current image.

Attachments:
image
  • Sign in to reply
  • Cancel

Top Replies

  • D_Hersey
    D_Hersey over 9 years ago +1 suggested
    Using a power fet as a heater is not that great of an idea in practice as a warm fet has lowered Zin with low gain Switching resistors is a better idea as they are made to be heaters a bipolar Q cheap…
  • tibmeister
    tibmeister over 9 years ago in reply to Robert Peter Oakes +1
    Are you kidding, I've actually begun to understand this stuff much more than I thought I would and that alone is priceless. As for the offset, Rds(on) is 5.3 ohm and the current drain from source to drain…
Parents
  • michaelkellett
    0 michaelkellett over 9 years ago

    I'll add a couple of points to Peter's comments:

     

    1) this configuration of a FET is usually described as a  source follower, as Peter describes in his first paragraph.

     

    2) when you put a buffer (the FET in your case) on the output of an op amp and inside the feedback loop it will very often be unstable. The solution is often to put a resistor between the output of the buffer (FET source in your case) and the op amp -ve input, and a small capacitor from the op amp output to the op amp -ve input. Adding a resistor between the FET gate and the op amp will often make basic stability worse but may be needed to stop HF oscillation with some FETs and op amps. If you are laying out a pcb add all three extra parts, then all your options are open !

     

    3) download a cop of LT Spice  from Linear Technology's website -it's free and it's much quicker to resolve some of these issues in simulation.

     

    4) If you are pulse width modulating PB1 you will need a capacitor from the op amp end of R3 to ground - and be careful of noise.

     

    MK

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

    I'll add a couple of points to Peter's comments:

     

    1) this configuration of a FET is usually described as a  source follower, as Peter describes in his first paragraph.

     

    2) when you put a buffer (the FET in your case) on the output of an op amp and inside the feedback loop it will very often be unstable. The solution is often to put a resistor between the output of the buffer (FET source in your case) and the op amp -ve input, and a small capacitor from the op amp output to the op amp -ve input. Adding a resistor between the FET gate and the op amp will often make basic stability worse but may be needed to stop HF oscillation with some FETs and op amps. If you are laying out a pcb add all three extra parts, then all your options are open !

     

    3) download a cop of LT Spice  from Linear Technology's website -it's free and it's much quicker to resolve some of these issues in simulation.

     

    4) If you are pulse width modulating PB1 you will need a capacitor from the op amp end of R3 to ground - and be careful of noise.

     

    MK

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

    Peter/Michael, you do not see the 220 on the drain, it doesn't exist... (Jedi hand wave)  I don't know how that little guy stayed on the schematic but it doesn't exist on the breadboard after it smoked out.  I realized my mistake and omitted it.

     

    The heater is 33 ohm, so around 120 mA is what I'm looking at for that guy.  What I suspected was the FET pretty much had no resistance and when there was no sensor heater and no 33 ohm resistor I could bake brownies on the ATTiny85, even setting one on fire by not paying attention (silicon and marshmallows DO NOT MIX!).  So I added the 33 ohm to provide the same load that the heater would while I was probing everything and decided to leave it in there in case the heater ever decided to fail and create an open circuit there, I wouldn't start melting and smoking things again.  My suspicion is that without the resistance on the output I don't have any current limiting going on and the ATTiny pays the price because the opamps and FET don't offer any resistance.

     

    The way I'm getting the two voltages is by driving PWM to the G1 V+ pin, 25% duty cycle for 1.4V out and 92% duty cycle for the 5V output.  So the amp is there because at most I could push from the ATTiny is 4.9V, which would not turn the FET on enough to allow for 5V to go through so I put the amp in there with about a 10% amplification to compensate.

     

    The buffer is there becasue I noticed the FET would not stay stable and would sometimes go a little crazy, even hitting 6V on the Source, so I am using the buffer to make sure that my FET stays where I want it.  It's kinda like a comparator I guess.

     

    I was wondering if a lot of my issue is HF noise on the PWM line being transmitted through to the FET and causing my issues, was thinking about a .1 uF ceramic on there to ground to filter those frequencies out, which the ATTiny85 lowest PWM frequency is 20 kHz.

     

    I was thinking about the resistor from the source of the FET to V- on the opamp but wasn't sure what it would do and what resistance I should put in there.  The cap between Vout and V- of the opamp is brilliant, is that to act as a HF filter?  So would .22 uF or .1 uF be appropriate?

     

    I do want to add, outside of the FET wanting to try and go nova everything in the circuit is working how I planned it would; the FET is able to switch between 1.4V and 5V, and all that jazz.  honestly I'm suprised I only got it on the third try, and the first try with the opamps.  I tried one with two mosfets, one in an inverted fashion and that did nothing, and I tried to drive the FET directly with PWM and ya know, that kinda just sucked.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • Robert Peter Oakes
    0 Robert Peter Oakes over 9 years ago in reply to tibmeister

    so if only a 33 ohm in circuit then there will be 363mA flowing, and that's about 4.4W of total power , now if your using PWM and limiting the output through the feedback of the opamp to 5V then your left with 7V @ 363mA dissipated in the FET, thats 2.5W, the device is only rated at 200mW so i'm surprised it is even surviving, double all these figures if you have the heater and the 33 ohm

     

    put the heater between the 5V and the fet drain, connect the source to gnd, and drive the FET directly from the uController

     

    It should turn on completely in this configuration and as such will not dissipate much heat and the max volts is still 5, then use PWM to simulate the 1.x volts you need

     

    In your current design, your using the FET in its linear region and trying to get rid of way too much heat

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • billpenner
    0 billpenner over 9 years ago in reply to Robert Peter Oakes

    Re: 2N7000 as VCR

     

    Absolutely. Make it as simple as possible. I too am surprised that the FET didn't let out it's magic pixie smoke  right away. Another idea might be to use an adjustable Switching Mode Power Supply (SMPS) and just control the voltage output with the Arduino and  resistive divider. Way less power wasted and simpler. I do have to say I love the little 2n7002. I have use many of them.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • tibmeister
    0 tibmeister over 9 years ago in reply to Robert Peter Oakes

    I guess I could replace the 2N7000 with a FQP9N08, don't think that guy would have an issue!  On a serious note, I'm going to layout what my interpretation of the suggestion is and hope I'm on the mark.

     

    One thing I've been thinking, I want this to be battery powered and having 8 AA's in a case is a lot of weight, so I'm pondering getting rid of the LM7805 and replacing the 12VDC with 6VDC.  I have used the MCP1253 from Microchip in past items and I friggen love the guy but it's able to only handle 150 mA at the most so it may be a good drop-in replacement for the LM7805 to power the ATTiny85 with and run the sensor/heater off the battery directly.  I would have to definitely see what the amperage of the circuit as a whole is to make sure batteries will last for a while.

     

    Anyway I'm gonna focus on getting the thing working as is and figure out the portable items later and use my MCP1253 on it's breakout board after things are working at 12V.

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

    Ok, so here the Version 4 of the design with the new configurations and elements.  I'm gonna breadboard it tomorrow and see what happens.image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Robert Peter Oakes
    0 Robert Peter Oakes over 9 years ago in reply to tibmeister

    Sensor Heater HA to +5V

    Sensor heater HB to Mosfet Drain (Top Side)

    NO 220Ohm resistor

     

    Assuming this is a valid configuration for the actual heater sensor

     

    what is the part number for the sensor so I can check or you can image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • tibmeister
    0 tibmeister over 9 years ago in reply to Robert Peter Oakes

    I'm using the MQ series of sensors, the MQ-9 to be specific (https://www.pololu.com/file/download/MQ9.pdf?file_id=0J314).  I won't be able to connect the sensor to the +5V line directly because I'm limited to 120 mA on that line, but what if I put the opamp buffer/voltage follower back in with a zener diode on the V+ line so it can't go above +5V then make sure the two resistors are equal at 220k ohm.  Just a thought...

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • tibmeister
    0 tibmeister over 9 years ago in reply to Robert Peter Oakes

    Still working on this, had some stuff to deal with but didn't want to make anyone think I was blowing them off.

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

    Alright, here is the updated schematic.  Hope I got it right and don't let the smoke out this weekend...

    image

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

    Looking at your circuit I can't see how you get the 5V drive.

    The sensor data sheet is far from comprehensive but I think that you need proper voltage drive on the heater, driving through a resistor may not work very well. You have a 100R resistor in series with 6V so you will see about 1.42 V across the heater (nominal 31R at room temp). The heater won't get hot enough for the sensor to work.

    The idea is that you measure the resistance of the sensor with different heater voltages to sense different gases.

    If you are only going to drive the heater at 1.5V you would do better to use a 1.5V regulator with an enable line, if you use a switching buck regulator it will be much more efficient.

     

     

    MK

    • Cancel
    • Vote Up 0 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