MOSFETs, games, and a demonstration of shiny object syndrome

September 9, 2013

Conversation this morning:

Me: You named one of your gadgets MOSFET... 
Him: Yes...
Me: Why? Is it something to do with Star Wars? Boba Fett?
Him: (Uncomfortable silence.) No. They are used in music amplifiers.

I keep coming back to MOSFETs. I keep seeing them in different contexts where they end up being the “oh you just put a MOSFET in there and it will work the way you want” component.

Maybe it is time I learned what this magical component does.

As a pretest, though, I’ll splat out everything I can think of.

  • When I wanted to connect a IO to a motor, the IO pin didn’t have enough current. So the EE (Phil) put in a MOSFET so I could toggle the IO line to get the motor to turn on and off without pulling current through the processor.
  • When I asked Phil about my resistor divider sucking too much power, he said I should put in  a MOSFET so the divider was only on when I needed to measure the battery. I didn’t carefully read the ensuing EEspeak because I don’t have an extra IO pin.
  • A FET is a form of MOSFET. Probably one with less moss… Actually, it is probably that a MOSFET is a form of FET. Probably with more moss. Really though, there is probably no moss, it tends to be damp and that’s bad for electronics.
  • It seems to be a switch that is controlled electronically.
  • They come in n and p varieties. I don’t know the difference.
  • (And this just in!) They are used in musical amplifiers.

So, let’s be clear: I’ve used MOSFETs before. But as I try to design my own hardware, I keep getting smacked upside the head with them, like getting hit with a fish tail as the fish escapes the boat and swims away. That’s always been ok with me: I never really wanted the fish. But now I want to understand MOSFETs. And not just for a few minutes until some shiny other thought comes along.

Let’s go back to what Phil said in my resistor divider email exchange.

To prevent that leakage current you could just put a FET to turn off that voltage divider when you’re not checking the battery voltage. You could use a high-side P-Channel FET, (between VBat and R1) but turning it off solidly would require a voltage equal to (or higher than) the battery, or you could use a low-side N-Channel FET, but then you’d still have the leakage current through the ADC.  Although that 50KOhm is probably only while it is sampling, not when it is not in use.  So that is what I would try for a minimal-part, minimal cost solution, if you have a spare digital I/O to turn that FET on and off…

Ok. Well, I guess I retained enough of that though I suspect Phil copied the paragraph from the last five times I asked him something that required a MOSFET. I suppose what I need to do is use MOSFET in a circuit I design myself.

First, a little more information, courtesy of Wikipedia. Wow, that article is long. Let’s just come back to it, ok?

And since my attention span is tiny this morning, let me tell you about this game I’ve been playing. It is Circuit Coder for the ipad. It gives me little challenges, like build a NAND gate using only NOR gates, then I build what it wants, trying to think through the problem. Here is my half-adder.
Circuit Coder Half Adder solution

I had a decent amount of logic in college, in the CS courses, so this NAND and NOR gates are buried deep in my brain but have a solid foundation. I like the puzzle aspect. I’m a little stuck on SR latches but I have a plan to go read about them and I suspect they’ll fall pretty quickly.

Since some of the puzzles are tricky, there is a walkthrough. I was afraid to look at it for fear of taking away the puzzle aspect. However, the walkthrough is only for the first 3.5 minutes of the game so I am more likely to cheat using a computer engineering text book. And a game that can get me to look up how components work and demonstrate logic gates so effectively… this is more what I want from learning. Sneaky learning. Though, I wish the game had a little more help and could be a little more competitive (what is the minimum component solution for each?). But completing puzzles is very satisfactory.

I was hoping one of the components I need to make is a MOSFET. But looking around now, I don’t see that in Circuit Coder. (Though I do see a review that rates this game highly and suggests Codea as a good learn-to-code game. Whew, expensive though! And then my appolearning “trial” expired and I am considering whether to buy their (too expensive) app so I could learn about other instructional apps.)

And this is why my quest for MOSFET intuition has, to date, been for naught. I keep looking at the Wikipedia article and then finding something else to do. It is too theoretical and not tactical enough: what should I use a MOSFET for and why?

Getting away from the shiny distractions available in Wiki, I switched to looking at Charles Platt’s Encyclopedia of Components in Safari. (If you write an O’Reilly book, you get a free lifetime subscription to Safari online. Happy perk!)

There was nothing about MOSFETs in the table of contents. That seemed so unlikely for a book titled thusly. I searched for MOSFET, found some entries under Chapter 29. field effect transistor.

I bet “field effect transistor” has been used to sound very sci-fi. If I had a band (made up entirely of light theramin), it would be called “field effect transistor”.

And apparently, I should read chapters 26-28 before proceeding so I understand diodes and transistors because those are related.

I had hoped to share my new-found understanding with you in this post. Instead, I feel like I’ve wandered around in circles until exhausted. I’m going to go sit in a corner with this book and see what I can learn.

Or maybe I’ll do some paying work.

Naw, I think I’ll go run errands.

Or maybe push reload on twitter.