Vape Mod Project - beginner with big Plans  :palm: - Page 1
Forum section: electronics / beginners

author: JuculianD
author_rank: Contributor
timestamp: July 29, 2018, 09:28:27 pm
content: Hey,I am doing electronics since 2 years, and Im 16 years old - so you understand that I dont really have a lot of knowledge.I have practice in basics, from Mosfets to Resistors, but my practical knowledge ends on OpAmps, Inductors and Optocouplers...I kind of got the theory, but I dont know how to use it properly.But..I got quite a big project goign onand I need some help, please.I am building a Vape Mod that is basically measuring current and voltage and adjusting it with a mosfet that is controlled by pwm with the Atmega328p.The PWM Frequency doesnt need to be high, but I dont know how much I need. It will be under 1kHz.My Question: is the schematic okay like it is? Will the Mosfet handle currents at around 30A or more without cooling (Pulses of 5s every 10s)?And now my big question.Between the Drain of the Mosfet and A- (Atomizer -) is a shunt resistor to measure the current. I want to read out the Voltage of the shunt to get the current reading.But now the problems: the voltage is too small to read properly. Can I use an OpAmp?Second problem: When I measure between ground and A- I will get the voltage drop of shunt and mosfet together. How should I measure just the shunt? I need to galvanically isolate it to measure, right?Thank you really much for every help, and sorry for taking up your time!

author: rstofer
author_rank: Super Contributor
timestamp: July 29, 2018, 09:45:45 pm
content: I would always recommend putting the shunt resistor in the high side and using a High Side Current Sense Amplifier.You can start with this:https://www.eetimes.com/document.asp?doc_id=1279404All of the usual suspects manufacture these amplifiers. Google around...

author: JuculianD
author_rank: Contributor
timestamp: July 29, 2018, 09:46:47 pm
content: Thanks,I don't exactly know what you mean but I will have a read now!

author: JuculianD
author_rank: Contributor
timestamp: July 29, 2018, 09:52:24 pm
content: Okay, thanks for the document. That helped me out.So what difference does it make, if the shunt resistor is on the high side?High side means, that the shunt is placed between Battery + and A+ - and not between A- and Mosfet Drain, as it is right now. Correct?What I dont know now, is what an differential amplifier is, what it is doing and how I can properly implement it. But I will have a read.

author: JuculianD
author_rank: Contributor
timestamp: July 29, 2018, 10:13:49 pm
content: I missed something out - there is a chapter two on that page - and it explains what I wanted to know.Thanks again for that very helpful link.To repeat it: Im a noob with OpAmps etc., so I dont really get it.On the page one, it shows an example for the whole circuit to measure the current when the shunt is placed on the low side.Here is the photo:This looks straightforward for me because all important equations are included.--Cut-- I just noticed that this wont work because the resistance of the mosfet will destroy the reading.So I would like to implement this one:The equation shows Vout=Vshunt*AdmWhat is Adm? Is it the gain?I.e. which resistors should I choose?The absolute maximum voltage on the shunt will be 50mV. I want to amplify the 50mV to get around 5V. So I want a gain of around 100 times.Thank you for the quick help - I already learned a lot by this project

author: rstofer
author_rank: Super Contributor
timestamp: July 30, 2018, 12:03:09 am
content: If you put the shunt below the MOSFET, between the Source and Gnd, as more current flows the voltage drop across the resistor will increase and the Gate->Source voltage will decrease. This may, or may not, upset turning the MOSFET on.Commercial High Side Current Sense amplifiers come with selectable gain. Here is a datasheet I happened to grab. Note that the amplifier has selectable gains up to 50x. If you need more, you can always add an op amp for gain.http://www.analog.com/media/en/technical-documentation/data-sheets/6100fd.pdfThere are many others. Some are bidirectional which doesn't apply here but does apply to DC motors (regenerative braking).

author: JuculianD
author_rank: Contributor
timestamp: July 30, 2018, 12:15:36 am
content: Thank you!I placed the shunt above the MOSFET, between Drain and Output.But between Source and GND would be a good Idea! I didn't think about that! - Why should the MOSFET be upset? The Voltage drop will be 50mV Maximum!Then I just need to worry about amplification.Can't I just use a normal OpAmp? Where is the difference between the High Side Current Sense amplifier?

author: JuculianD
author_rank: Contributor
timestamp: July 30, 2018, 12:48:07 am
content: Here my schematic. Can someone please tell me if this is correct and will work?And to repeat my first question, is the rest with the MOSFET okay as well and can handle the current?Thank you really much for that effort

author: alsetalokin4017
author_rank: Super Contributor
timestamp: July 30, 2018, 10:39:42 am
content: Can someone please explain to me how the mosfet is switching, if both the Gate and Source are tied to Ground?

author: JuculianD
author_rank: Contributor
timestamp: July 30, 2018, 12:11:27 pm
content: Ooops,I made an error the last time and deleted the signal connection to the gate...

author: JuculianD
author_rank: Contributor
timestamp: July 30, 2018, 12:24:28 pm
content: I attached the corrected schematic