Thursday, July 25, 2013

So I haven't blogged in a while because I really wanted my next post to be a success story but I really should post all the failures because you learn just as much from them. So here we go:

What I've learned from my earlier H Bridge failures is I can't use 4 N Channel MOSFETs like I was doing without something called a high side driver. Basically, the source of an N Channel MOSFET needs to be directly connected to ground. In my H Bridge design the source of the top two MOSFETs led to the motor and then the bottom MOSFETs. In order for that to work I would need to drive the top two with a higher voltage using a high side driver. In order to fix that I would need to replace the top two N Channel MOSFETs with P Channel MOSFETs. Also, to protect my MOSFETs from voltage spikes when switching (which have destroyed a few of my MOSFETs) I would need to use protection Schottky diodes (just diodes that switches very fast) on the MOSFETs with the cathode at the source and the anode at the drain for the P Channel MOSFETs and vice versa for the N Channel MOSFET. So that design will look a little bit like this:

^^don't mind accidental gate wiring error (crossed)^^
or this:


...which better illustrates where the problem in this design was. See, since we are using P Channel MOSFETs now, we need to use pull up resistors instead of pull down, and if the Arduino were to come into contact with that 12V wire it would destroy the chip. So now we need to use NPN transistors to ensure there is no direct contact. It'll look like this, except on both side sides:

or this:

However, it doesn't spin the motor and now I'm have this problem where the P Channel MOSFET that's getting power starts smoking which I assume is bad. I'll keep updating if anything changes. In the meantime I've been learning Java in preparation for getting the line following to work which is also why I haven't been posting too much. Anyways, back to work.

Update: So I was looking at the breadboard in the above picture and realized I wired something wrong so I changed that and tested it. Now instead of smoke, nothing happens. I guess that's better but I would really like for the motors to spin.

No comments:

Post a Comment