last day (15 days later) » 

05:07
-2
Q: How to drive two complementary MOSFETs for a variable load?

Nico CanoI am designing a variable digital load and I am controlling it with a PWM signal from an ESP32. The problem is that I don't know how to control the P-channel MOSFET. What would the circuit be?

Depends on what it is you need and the voltage being switched,
It's a variable load for alternating signals(like amplifiers), what I want is to vary the current going through the mosfets
Info is still insufficient. You might not even want PMOSFETs at all.
what information do you need
As previously mentioned, voltage being switched. Also switching frequency, and possibly current being switched to, and possibly the load being switched as well.
05:07
what do you mean by (prefix) being switched
Your dissipative element.
It's simple, I have two mosfets, one channel N and another channel p, both are being controlled by a PWM signal that passes through a filter so that it becomes "DC", the channel n mosfet is in charge of the positive half cycle and the channel mosfet P from negative
Gil
Gil
Can you show a simplified annotated schematic of what you are trying to do?
yes, in the image i want to know how to drive the P channel mosfet, PWM sigal is 3.3V high
You need to learn how 1. full FET bridges work 2. loads must defined up front 3. To include a symbol of a load in your schematic. 4. How to define results before a schematic
05:07
This is not a trivial thing to design. You absolutely can't just use an RC low pass filter to turn PWM into an adjustable DC voltage in this context. Trying to slam the MOSFETs on and off at max \$I_d\$ is going to be an EMI hellscape. You have to be careful with MOSFET FBSOAs, and probably need planar MOSFETs that are designed for linear operation. You need a control feedback loop and a low inductance layout to ensure stable operation and avoid shoot-through. You need to properly characterise the \$Q_g\$ vs. \$I_d\$ and \$V_{ds}\$ transfer functions as part of that.
It's impossible to advise further without at least knowing your source voltage range, AC source frequency, the amount of power you want to dissipate, what level of precision you require in the power dissipation setpoint, and any other design parameters.
Ok, let me answer this step by step, @Hoagie points 2 to 4 are nonsense and instead of trying to find an answer or something you say to me "Read a book".
now @Polynomial, got no idea whay FBSOAs are, what Qg is, the only thing i want to know is a circuit that controls a P channel mosfet with a positive signal, i didn't even touch mosfets in my college
@NicoCano In which case you are trying to run before you can walk. I'd advise that you study electronics further before attempting to jump in with something like this. I'd also ask that you be respectful to others on here - your last reply to Hoagie was both incorrect and rude.
Digital loads don't work like that. You can't just short across your load like that. You also cannot switch MOSFETs like that..at all. It looks like you are trying RC filter a square wave to smooth it out and then apply it to the MOSFET gate which is not switching the MOSFET. That will force the MOSFET into a state between full conduction and no conduction (the actual two states you want for a switch) and make it dissipate lots of heat and burn it out. Frankly, there's too much wrong. It's not a matter of making corrections to the circuit.
@DKNguyen then, pls explain to me how they work if you know, as far as i know thanks to this video link, they "short" by changing th gate voltage
So right now you have a choice between an all digital variable load that actually switches current between 100% and 0% and using transistors averages that out through a dissipative element OR you can use the transistors as linear devices where the transistors operate somewhere between 100% and 0%. No switching involved there but lots of heat.
05:07
You are asking experts to help but we expect you to try to understand that your question is too vague
The video you showed is explicitly not a digital variable load. It even says so in the title. Nothing is being shorted in that video either there is clearly a load resistor. What is being shown in that video is the "transistor as a linear device" approach I mentioned.
@Polynomial i'm being rude because it seems like everybody knows the answer but dont want to tell me and instead give me a live lesson, i can't just wait for knowing the solution, i may not even still on this career by then
@DKNguyen sorry, wrong video link
@NicoCano No one is telling you because you lack the fundamentals to understand the answer. Right now it is like asking how to do algebra when you don't know the basic operations.
Does that video have a schematic?
I don't see one. But I clearly see a giant load resistor on the breadboard.
it is for sensing current
This circuit appears to still be the linear type.
So calling it a digital variable load is what is confusing everyone
05:10
the digital part is the control, PID control
The only difference between the second video and the first video is that the opamp has been replaced with a MCU that uses an RC filter and PWM as a DAC
the screen
and the only thing i want to know is how to drive a P channel mosfet with a positive voltage, by converting it somehow
@NicoCano Nobody's telling you the answer because you haven't provided any information about the design requirements. The reason you're struggling is due to a gap in your knowledge. We'd would've been perfectly happy to explain why your design won't work, and what a better approach would be to achieve the goals given a set of design requirements, in order to help you bridge that knowledge gap. But instead of engaging in good faith, you were rude.
I suggest you actually start with the op-amp source follower circuit in the first video
I'm gonna duck out of the conversation now, but consider it a lesson learned for next time.
05:12
And only after you get that working, replace it with the MCU RC filter+PWM DAC
@Polynomial theres no design, no circuit, i'm just testing concepts before doing anithing, i saw that video and a thought, what a cool circuit lets make one
that is, forget about AC for now
just do DC
@DKNguyen ok bye
once you get it working with DC then you worry about AC
so just one NMOS
no PMOS
the thing is that i work mostly with audio
amplification
05:14
Then the opamp step should be super easy for ou
once that's working then you can spend our effort on the MCU DAC part
for an NMOS follower on a DC source
acting as a current source
ok, thanks
So to re-iterate
forget the AC for now. Start with DC
start with the circuit in the first video that is a op-amp driving a NMOS source follower
with a current sense resistor (the load really) making it act as a current source
once you get that working then you can replace the op-amp output with a DAC from the Arduino. In the second video it uses an RC filter to smooth out a PWM signal to simulate an analog voltage
and it reads the current sense resistor voltage with the ADC to replace the op-amp feedback path
if you're audio the opamp part should be easy. Once you get that working then you can struggle learning the ARduino part
and only after you have it working then, then you can try it with the AC which is kind of two of those mashed together
Then your question about how to drive the PMOS will be answerable
since by that point that question will mostly stand alone with everything behind it working
Ok thanks, i'm better at digital than analog, not related but just wanted to tell it
well Arduinos are pretty easy to pick up
yeah, i'm programming them by using ports
05:20
Actually once you get it all working with DC
you should do it with a negative DC voltage and the PMOS
like DDRS and all those
yeah
all the weirdness in your immediate question you posted will rear its head at that point with the negative DC voltage and PMOS
then you can come backed by that if you have PMOS drive problems
once those a working, then the AC will be trivial
since you'll have each half already
by the way, what did you study specifcly, i'm in progress of chosing wich branch
Im electronics
i took power electornics and controls
05:23
PLC is just programming as far as I'm concerned. I only took controls but never really had a job that used it
PLC controls is not the cool kind of control anyway
It's the canned kind where you're doing nothing new. A PLC isn't well suited for something like inverted pendulum
or a robotic arm
thats what i'm concerned, to chose something that dont give me any job, but also to chose something i dont like
PLC tends to be like valves and switches and junk. The mundane stuff in a factory
I mean, if it's a job in industry you won't know enough anyways since they won't teach it in school
they just used canned practices for a lot of things like factories and plants
it's only if you do R&D or the specialty development that you use the academia stuff
i was thinking something like making microchips but there's no job in my country for that
making microchips requires a PhD. You aren't going to get a job like that without exactly targeting it
that's the risk of specialization
I didn't specialize but for that reason I can't get a job making microchips or radars, etc.
Depends how ambitious and driven you want to be
and studying electronics here is horrible, there's only copys of IC's, i cant send to make a board because of aduanas
and original IC's are expensive
my final project(an amp) was almost failed by poor quality IC's
05:30
yeah things can be tough without high end chips but you lose some skills when those are avaialble too
there's also power distribution and transmission, something I did not take at all
the great thing is that there are great deals here, a dual channel Analogic osciloscope for only 50 Dolars
Tele Comunications is an option
I am told lots of money communications
when I was in school. I took a class. Wasn't for me. Very mathy. The abstract kind.
@DKNguyen yeah, and it's kind of fun from a point of view
but is very demanding
I found it dry because I want to build machines that move
Mecatronics its another one
05:34
yeah that's what I sort of aimed for.
if I was communciations I would prefer to work on the electromagnetics side rather than the signal processing side.
@DKNguyen yeah, i prefer things that someone cannot see
im actually designing a processor(for fun)
thats my kind of thing
well good luck with that. Maybe you shoudl gravitate towards the more micro side but like you said, more specialization and needs more advanced education and the jobs aren't as widespread
and yeah, it's scary.
@DKNguyen thanks, i'm only a few instructions left, then i need to write an assemble, an emulator and a progrraming language for it XD
is it built with a bunch of logic ICs or something?
@DKNguyen i'm designing it only, tha would be building it
05:38
oh I see
well hopefully you can get an FPGA or something and code it in at some point
let me me take a picture of the processor
Ah, so you can simulate it or something?
that's not even an 40% XD
@DKNguyen yes
with logisim evolution
yeah hang onto that and someday maybe you can get ahold of a CPLD or FPGA to load it into
or build it with logic ICs
@DKNguyen i already bougt one form aliexpress, it only needs to be delivered
05:41
cool
but verilog and VHDL are head breaking
I guess. it takes a different kind of thinking
I dont know Verilog. Just VHDL
i want to make the processor a console, at least at the emulated part
a videogame
like nes
but in 16 bit
I see. sounds like a lot of work. If that's what you're intersested in that really is like microchip design but there's lots of different things in that
like there's the actual physical semiconductor fabrication, the architecture, and the silicon libraries
and pretty much no one can do the fabrication or silicon libraries because it's pointless without a wafer foundry
so no hobby or basement versions of those
@DKNguyen only the simulations
theres a point where you can't just build it with IC's
05:44
yeah
there's no 16 bit IC
at least THT
surface mount is quite handle solderable though
you tend to need a custom PCB though
BGAs aren't hand solderable though
@DKNguyen but i cant buy SMD because the would take a long time to arrive here
well if you want to build a console you probably can't build it from a bunch of ICs anyways
and a need to pay them(ship included) like a 100% more
05:46
you'd need an FPGA
@DKNguyen that's for shure
which you can't hand solder anyways for the size of FPGA you would need so it would need to be a dev board or module or something
@DKNguyen i bought a TANG Nano 9k
Enough to learn Verilog or VHDL on
@DKNguyen yeah, dont know if a can put a processor on them
well, if i do some tricks i may
changing logic for memory cells
05:48
If the variable load is for non-small signals: the usual implementation was a bridge rectifier + a DC variable load.
I mean, you could probably put a 4-bit procssor on there if you really wanted to
not much practical purpose to it though since you already have an FPGA you could do whatever it could do more easily moe directly
4-bit processors are more for mass producing dirt cheap products where you churn them out, rather than put them on an FPGA
It seems to have an HDMI port though?
Difficult to judge just how powerful it is. I'm more familiar with Xilinx
@DKNguyen yea, i've seen some videos of people bulding 8 bit processors on breadboards
@DKNguyen the processor was originaly 8 bits
but i thought it wasn't enough
so i went psyco and made it 16 bit
i regret
but no
I dunno. FPGAs are weird. YOu can fill up an FPGA doing the dumbest simplest things while other designs you can fit way more complicated stuff on it
@DKNguyen they test PCIe boards with FPGAs
yeah
anyways, I need to go to bed now
night
05:53
ok, god night

last day (15 days later) »