Sunday, August 09, 2009

A little knowledge

I found out that a lot of the sites I had visited in relation to MOSFETs were overly complicating the issue. The diagram above from this site translated into a good solution for me, but at the head of the page it says that there is an error in the circuit. I must find out what that means before I start soldering.
The essential points are that all the MOSFETs are N channel and that the ground for both the Test Circuit in the blue box and the 12v area being switched must be common.
The pull down resistors are also vital, I am using ones valued at 100Kilo ohms, which work fine. I was getting bad results because I didn't have those essential pieces of information laid out in plain English and my knowledge is very limited. One exceedingly annoying thing is having positive and negative so jumbled by the world. Everything runs on electrons and they are negative, so all that time you think of positive as the power source you are wrong, the electrons are obviously coming out of the negative and flowing to the positive. This makes the labels on the MOSFET of Drain and Source perfectly reasonable, but why convention has us thinking of things the other way round I am not sure. Even here the arrow over the motor shows the flow in that direction, which is wrong. I guess it all keeps electricians up with their boat payments. This kind of deliberate loopiness in general knowledge can drive one nuts.
The positive field created in the MOSFET when it is connected to the switched 9v supply does not dissipate quickly, it will gradually fade, but having the resistor in place to give it somewhere to run to once the power is turned off makes it a predictable and spontaneous reaction. The MOSFETs I have will switch fine on 2-4volts, so my little operational amplifier circuit could get them running properly on its own, but I want to incorporate more functionality, so my next step is to replace the "switch" in the test circuit with output from the Arduino microcontroller.
The diagram shows the motor powered in one direction, reversing the switch will cause it to rotate in the other direction. With the black line lit up. I need to control two motors in this way, so I will use a relay to switch between them having them operate one at a time so that I don't need to send off for four more MOSFETs to make an independent H-bridge for each motor.