SparkFun Forums 

Where electronics enthusiasts find answers.

Questions relating to designing PCBs
By Buzzen812
#160659
I did this layout last night. I used the mosfet amps from radio shack and a regulator I had around.
I have attached the board and an image of what the pins connect to.
The only issue currently is the RGB strip lights up when the motor is running.
I added a diode to keep my self from blowing up stuff when I'm tired and do something stupid and the resistor if for the i/o pin that was never sure if it was high or low.

First problem is the RGB strip light up a little when the motor runs. Other than that everything seems to work great.
Image
Image
#160679
The pictures aren't showing up here (but do if you go to Dropbox).
It's very hard to say anything about the board since we don't have a schematic and we have no clue about what it does, other than something with a motor and RGB lights. A few notes, however:

- TIP120 isn't a MOSFET, it's a Darlington transistor
- TIP120 comes in a TO220 package, not a TO92
- I don't see any resistors in series with the bases, nor any pulldowns on the I/O inputs (those are good for the default case when the GPIO hasn't been set to output yet...)
- I don't see any bypass capacitors on the regulator
- TIP120 is an NPN Darlington, but the three left ones are wired as high-side drivers
- There are no flyback diodes across the motor. No clamping zeners either (if there's any chance of them being driven while off)
- The diode needs a polarity mark (usually a stripe on the cathode end)
- Text is in top copper, not top silk (this may be OK if you are making a board without silkscreen)
- The pin 1 indicators on the connectors, outside of the connector footprint, is a very good idea
- There are no mounting holes
- In general, it is better to make two 45-degree bends rather than a 90-degree bend,

/mike
By Buzzen812
#160683
https://www.dropbox.com/s/8ipmos6a898j5 ... .54.37.jpg
https://www.dropbox.com/s/5o5t9wueg7hpswe/Layout.JPG

I tried to put them in an image but i guess it failed. Ive been on a lot of forums (mostly for cars and helicopters) must not work exactly the same.

First of all mike you just blew my mind. Im come from the mechanical side BSME. I can make everything work on a circuit board and program high low on a basic stamp. Just takes me a little longer on the electrical side. Thank you for all the input. I will start going though your list.

- TIP120 isn't a MOSFET, it's a Darlington transistor
K i will do some reading
- TIP120 comes in a TO220 package, not a TO92
Will read more also.
- I don't see any resistors in series with the bases, nor any pulldowns on the I/O inputs (those are good for the default case when the GPIO hasn't been set to output yet...)
I had one pull down on the board. This was because the "start" button was randomly triggering. I think i have the programing backward. I believe I was supplying 12v through a 10kohm resistors to prevent random low voltage and when the switch is closed The pin would drop to 0 volts. Bad Practice?
As for the bases when I added resistors to those, the led would light up on the RGB strip. Do I need a high ohm resistor?
- I don't see any bypass capacitors on the regulator
Will do some caluclations to see how large of one i need. But i think i was using a 47nFs on my bread board. Do I need one for high and low frequencies.
- TIP120 is an NPN Darlington, but the three left ones are wired as high-side drivers
- There are no flyback diodes across the motor. No clamping zeners either (if there's any chance of them being driven while off)
Do I need to add a inductor or does the motor act as one?
- The diode needs a polarity mark (usually a stripe on the cathode end)
Silk screen on the board?
- Text is in top copper, not top silk (this may be OK if you are making a board without silkscreen)

- The pin 1 indicators on the connectors, outside of the connector footprint, is a very good idea
- There are no mounting holes
Would be Usefull.
- In general, it is better to make two 45-degree bends rather than a 90-degree bend,
I will read about that too. Sounds interesting.
#160689
A real schematic (showing the whole circuit) would help a lot.
- The LEDs and drivers look like they just need a 1K or so resistor in series with the base of the transistor, and they should be fine
- Check to see if the LM33 has enough current to drive the motor, especially if it stalls.
- The motor circuit doesn't look right at all. What voltage are you trying to drive it with? What is the "Motor switch" supposed to do? What are the two transistors supposed to do?
/mike
By Oregonerd
#160698
A full complete schematic would be in order.

1) I recommend downloading the free version of Eagle from Cadsoft and learning to use it. A wealth of online help for Eagle. Eagle will give you are great library of parts and excellent schematic and board drawing capabilities.

2) The trace coming in on the GND is feeding the emitters of a bunch of TIP120s. I would suggest making that trace be a "poured polygon" power plane and a bit heavier than it is. Calculate the amount of total current draw of you expect in all the TIPs at any given time. Design for %150 of that to be safe. For example, the TIP120 is a 5Amp part. Your current expected current draw might only be 3 Amps, but at any given time all the TIPs may be running? That's 15 Amps (WOWSER!). Learn to calculate your current loads on traces and use a trace width calculator: http://www.4pcb.com/trace-width-calculator.html (I use these guys for my protos/no affiliation). So, if you could hit 15 Amps feeding those TIPs, I would design for 20 Amps potential on that trace to be safe. Put simply, estimating your total trace length looking at the image, 2 inches long, with 1 ounce copper board, that would mean your trace needs to be nearly 750 mils (3/4 inch) wide to be safe. With a 2 ounce copper board, 375 mils (3/8 inch). The puny trace you have connecting all those TIPs might not be up to it.
Oregonerd
By Oregonerd
#160707
Buzzen812 wrote:https://www.dropbox.com/s/d85g1bgr313gy36/Drawing1.pdf
Here is a schematic of the whole system. I think I am using the proper symbols.
Have a look at my FET drive circuits in the picture. The top one is a low side N-channel Fet driver. Notice that the gate has a pull down resistor? A weak pull-down resistor is necessary to keep the FET from switching on unexpectedly.

The bottom circuit is a high side FET driver. The extra circuitry protects the sensitive gate of my P-channel FET

The BAS40-04 and capacitor are not needed in your design. I have it in my design because I expect EMI from a high voltage spark ignition created on the board or in close proximity.

http://s459.photobucket.com/user/Slippe ... s.jpg.html
By Oregonerd
#160761
Buzzen812 wrote:Do I need a pull down on all of the N-Channels to keep them from switching? I think i need to reverse my programing and wiring for a pull down. I think I have it in reverse.
It's a good idea to have them. Not enough info. What is the "BS Board"?
#160791
Looking at the schematic, there are a few issues, but otherwise it's almost there

- As you mentioned, weak pulldowns on the gates would make sure the FETs are always in a known state
- The pullup on the start switch is wired wrong. GND --- SWITCH --- BS and RESISTOR --- 5v. As drawn, it will likely burn out the input on the processor by feeding it 12v
- Don't forget the bypass caps on the regulator, both input to ground and output to ground

/mike