technerdchris / boards

These are boards I reverse engineer for my own understading.
The Unlicense
25 stars 4 forks source link

What is the logic of this board #2

Open communque opened 3 years ago

communque commented 3 years ago

Thanks for posting your link on https://www.amazon.com/gp/product/B07XJSRY6B/ I'm not super familiar with MOSFETs so these questions may be misguided. My impression was that by connecting the following... 1 - a 12vdc source to the Vin 2 - an ESP32 PWM (8bit running at 5000) 3 - a multimeter to the Vout ... would demonstrate an ability to control the voltage of Vout. (also see attached diagram)

No doubt it's my lack of knowledge of MOSFETs, but I was expecting that by running the PWM duty cycle from 1 to 255 I'd see almost 0vdc - 12vdc on the Vout. Instead there's no change whatsoever. Setting the duty cycle to 0 does, in fact, turn the Vout off, but beyond that there's no control.

What am I not understanding?

Diagram

CORRECTION -- I diagrammed the PWM / GND in reveres of how I wired.

technerdchris commented 3 years ago

The circuit needs a load for it to function. Using it to drive a LED and a relay will be plenty of load.

Mosfet don't behave like proper valves. In a circuit I am using, I need to use p- and n-channel mosfets together; one to turn a darlington pair on and the other to shut it off. Simply "turning off" one of the mosfets isn't enough for it to stop flowing.

Not sure how this email was sent or what happens with the reply 😆😁

On Mon, Nov 2, 2020, 8:28 PM communque notifications@github.com wrote:

Thanks for posting your link on https://www.amazon.com/gp/product/B07XJSRY6B/ I'm not super familiar with MOSFETs so these questions may be misguided. My impression was that by connecting the following... 1 - a 12vdc source to the Vin 2 - an ESP32 PWM (8bit running at 5000) 3 - a multimeter to the Vout ... would demonstrate an ability to control the voltage of Vout. (also see attached diagram)

No doubt it's my lack of knowledge of MOSFETs, but I was expecting that by running the PWM duty cycle from 1 to 255 I'd see almost 0vdc - 12vdc on the Vout. Instead there's no change whatsoever. Setting the duty cycle to 0 does, in fact, turn the Vout off, but beyond that there's no control.

What am I not understanding?

[image: Diagram] https://user-images.githubusercontent.com/25211897/97936555-b8bd9500-1d30-11eb-82d0-82f1818e9d77.png

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/technerdchris/boards/issues/2, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJC7SO33DDNOLQ6ZXZ7ZIOLSN5MC5ANCNFSM4TIFAHPA .

technerdchris commented 3 years ago

Go and double check the schematic I made here: https://github.com/technerdchris/boards/blob/master/D4184/D4184_board.pdf

The layout of the board doesn't make sense, really. The V+ connections are straight through and are no part of the circuit.

Otherwise, think of it as one mosfet.

Vin- and GND are the same point and are the source. The pwm input is gate and Vout- is drain.

On Mon, Nov 2, 2020, 8:28 PM communque notifications@github.com wrote:

Thanks for posting your link on https://www.amazon.com/gp/product/B07XJSRY6B/ I'm not super familiar with MOSFETs so these questions may be misguided. My impression was that by connecting the following... 1 - a 12vdc source to the Vin 2 - an ESP32 PWM (8bit running at 5000) 3 - a multimeter to the Vout ... would demonstrate an ability to control the voltage of Vout. (also see attached diagram)

No doubt it's my lack of knowledge of MOSFETs, but I was expecting that by running the PWM duty cycle from 1 to 255 I'd see almost 0vdc - 12vdc on the Vout. Instead there's no change whatsoever. Setting the duty cycle to 0 does, in fact, turn the Vout off, but beyond that there's no control.

What am I not understanding?

[image: Diagram] https://user-images.githubusercontent.com/25211897/97936555-b8bd9500-1d30-11eb-82d0-82f1818e9d77.png

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/technerdchris/boards/issues/2, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJC7SO33DDNOLQ6ZXZ7ZIOLSN5MC5ANCNFSM4TIFAHPA .

communque commented 3 years ago

Not sure how this email was sent or what happens with the reply 😆😁

Came through fine!

The circuit needs a load for it to function. Using it to drive a LED and a relay will be plenty of load.

Actually, the reason I put the multi-meter was that the LED wasn't responding in the way I was expecting.

Mosfet don't behave like proper valves. In a circuit I am using, I need to use p- and n-channel mosfets together; one to turn a darlington pair on and the other to shut it off. Simply "turning off" one of the mosfets isn't enough for it to stop flowing.

Ok, so this is curious. From what I'm seeing, if I send 0vdc to the gate, it does shut off the LED (and the multimeter does read 0vdc). The issue is that running the PWM at any duty cycle other than 0, from 1 to 255, results the full voltage passing through. That's what I found to be unexpected. I was expecting the 1-255 to control how much voltage would read on the Vout.

communque commented 3 years ago

An answer to the question might be here

jvilburn commented 3 years ago

First, Thank you so much Chris for gathering the info, especially for reverse engineering the schematic. The schematic was extremely helpful to me.

You said "The layout of the board doesn't make sense, really. The V+ connections are straight through and are no part of the circuit." You are right, the schematic as drawn doesn't seem like it would do much. And indeed they could have left the V+ connections completely off the board and it would have functioned the same as long as you wired up the load correctly.

To make sense of the circuit, remember that there is a load, often a motor, attached between Vout+ and Vout-. That load is a path between Vin+ and the drain of the mosfets. So, as expected, the mosfets act as switches for the current running through the load.