1

Hi ladies and gentlemen,

I am new to Mosfets and I could use some help!

I want to make a circuit where a DC motor is used as a motor and as a generator. I would like to use PWM to control in motor mode and in generator mode using N-channel Mosfets.

I have made the following circuit: Circuit with two mosfets for generator and motor control

This circuit is obviously shorted out, but I cannot figure out how to have both functionalities while not being short-circuited.

When the motor is used as a generator, the left wire of the motor is negative and right one positive in the picture (for the bottom mosfet).

I have tested the circuits separately as motor and as generator and they work, just not together.

Any thoughts? Thanks in advance! Here is a link to the diagram: https://crcit.net/c/7e69a5c214f649c3b7b92a090ad6ff37

  • Does this answer your question? [Is it possible to use a diode in combination with a N-channel MOSFET?](https://electronics.stackexchange.com/questions/575945/is-it-possible-to-use-a-diode-in-combination-with-a-n-channel-mosfet) – Solar Mike Jul 18 '21 at 18:12
  • What does the 22 ohm resistor do? – Bruce Abbott Jul 18 '21 at 18:31
  • 1
    The 22 ohm resistor is a load for the generator. With PWM, the load can be 'lowered' at will. This is handy for my experimental setup because I want to control the force that the generator applies. – PurpleTurtle Jul 18 '21 at 19:11
  • *I have tested the circuits separately as motor and as generator and they work, just not together*. Could you clarify what you mean by together? – StainlessSteelRat Jul 18 '21 at 20:02
  • @StainlessSteelRat If I only connect the top circuit, so +3V -> Mosfet -> Motor -> 0V, then the motor can be controlled with PWM. If I only connect the bottom circuit, so Motor- -> mosfet -> resistor -> motor+, then the motor can be used as PWM controlled generator and it works well. But if I try to put the two circuits together, as I have done in the picture, then there is a short circuit. But I cannot seem to make a configuration where the mosfets are grounded at the source without having a short-circuit. – PurpleTurtle Jul 18 '21 at 20:16
  • You have to control the circuits. You just cannot connect both and expect them to work. You need MOSFETs to say now you are a generator. Now motor. – StainlessSteelRat Jul 19 '21 at 01:02
  • You need to follow Andy's advice. – StainlessSteelRat Jul 19 '21 at 14:35

1 Answers1

1

This circuit is obviously shorted out, but I cannot figure out how make it not short-circuited.

Then un-short it like this: -

enter image description here

However, if you want it to properly work as a motor and a generator then use a H bridge circuit like this: -

enter image description here

Taken from this youtube video that might help your understanding.

When used as a generator, the diodes across the MOSFETs return electrical power from the mechanically driven motor back to the supply rails. I wouldn't roll my own H bridge; I'd use an OTS commercial chip.

Andy aka
  • 434,556
  • 28
  • 351
  • 777
  • I tried the top scheme but it does not work, you need to connect the source of the Mosfet to the ground for it to work right? – PurpleTurtle Jul 18 '21 at 19:09
  • 1
    @PurpleTurtle I'm just pointing out where the short is and then pointing you in a sensible direction regarding turning a motor into a generator by using a H bridge. I'm not about to go through your highly flawed circuit that is upside down and try and figure out how to get from failure to success when the H bridge is a standard way to do this. – Andy aka Jul 18 '21 at 19:15
  • Well your answer made it seem like it would work if one just removes the short. But thanks anyway :). – PurpleTurtle Jul 18 '21 at 19:18
  • 1
    @PurpleTurtle your question appeared to be about how to figure out where the short is. There is a skill to writing a decent question. – Andy aka Jul 18 '21 at 19:19
  • ah I see, I have formulated it differently, hopefully people will understand now. – PurpleTurtle Jul 18 '21 at 19:35
  • 1
    It makes no difference @PurpleTurtle - nobody is going to lead you down the path of fixing your flawed circuit when the clearly superior approach beckons. If you are hoping to get a blow-by-blow, verse-by-verse conversion from your broken circuit to a new and realistic circuit then you are not recognizing what this Q and A site is all about. You ask a question and someone (me in this example) provides an answer. An evolutionary training school is not what this site is about. – Andy aka Jul 18 '21 at 20:13
  • if you are just going to be salty, then please go be salty somewhere else. Your solution of an H bridge is to drive a motor forwards and backwards is not the same as using a motor as a generator. I get it you don't want to answer this, then don't, but don't go making snarky comments to someone who is genuinely interested to learn. – PurpleTurtle Jul 19 '21 at 19:09
  • You have a lot to learn. – Andy aka Jul 19 '21 at 19:20