A little Help needed

Thread Starter

darklighterz

Joined Jun 17, 2013
20
Hi, Im thinking about building a pwm controller for a pump i have. I have drawn a circuit out for you guys (a very amateur diagram :p), the bits im not too sure about are the resistor placements and values and the diode placement to prevent damage of my attiny chip.

Also anything else i may have missed.

Thanks
Dan


 

wayneh

Joined Sep 9, 2010
17,498
The diode is directional, and should be in parallel with the pump and not in the conducting orientation. Of course it will do its job and conduct when there is a reverse pulse. What is the 220Ω resistor doing?
 

wayneh

Joined Sep 9, 2010
17,498
Right, the diode helps mitigate that effect. The high voltage on the low side of the coil is routed through the diode to the positive rail of the battery instead of onto the transistor.
 

wayneh

Joined Sep 9, 2010
17,498
BTW im a novice with electronics
Check and double check when you wire up the transistor. It's very easy to confuse the pins and get it wrong, novice or expert. The expert is the guy that knows he may have it wrong, and checks again to be sure. And then again.

You should show on your drawing which pin (B, C, E) you intend to use at each point. The 680Ω resistor will be on the base pin, and the emitter connects to ground.

How much current does your pump need to operate?
 

wayneh

Joined Sep 9, 2010
17,498
So the 220Ω resistor can/should be removed?

And is this the correct diode placement?
If your pump is OK to use directly connected to the battery, then I see no need for the 220Ω resistor. But I hate to question someone else's design without more information. Where did the schematic come from?

The diode placement is good, but it needs to point the right direction. If it has a line on the package on one end, that should face the battery.
 

wayneh

Joined Sep 9, 2010
17,498
Sorry wrong pump, this one is 7.5-15amps
The TIP120 won't take that current. Consider using a power MOSFET, one that can use the logic level signal from your controller. A MOSFET will use less current from the controller anyway, and is probably a better choice overall for this application. I use the IRF540N for generic MOSFET stuff, but it needs 10V or more to be turned fully on. You need one with a much lower gate voltage requirement, and one rated to 30A or so, mounted on a heat sink. Or you could consider a relay.
 

Thread Starter

darklighterz

Joined Jun 17, 2013
20
Its my schematic, basically a mish mash of other pwm controllers for different things i found online, and yeah the pump can be wired up directly to the power.
 

wayneh

Joined Sep 9, 2010
17,498
I dont know much about relays, would that simply be a switch controlled by the tip120 which controlls the pump circuit?
Yup, you would use the TIP20 to control the current through the relay's coil, on or off. The relay could then control a much larger load, and even an AC load, since the power circuit is completely isolated from your control circuit.
 

Thread Starter

darklighterz

Joined Jun 17, 2013
20
After doing some research I feel that i would like to modify my design to include a relay. I have a few more questions now tho.lol

On further investigation i finally found the max current of the pump is 10amps.

1. What sort of relay would i require here? Do i need a 12v SPDT that can handle 20 amps+?

1.2 If i do need one rated 20+ amps i can only seem to find relays for cars etc, Would i be able to use these ok?

2. Is it good practice to stick a (10/15amp?) fuse between the relay and power?

3. When using such a relay is the tip120 now suitable or do i need to have a MOSFET with a higher rating?

4. And after reading around i have realised that this forum and its members are awesome and very helpfull.
 
Last edited:

wayneh

Joined Sep 9, 2010
17,498
1. What sort of relay would i require here? Do i need a 12v SPDT that can handle 20 amps+?
More is generally better, but I don't think a 2x safety factor is required when choosing a relay. I'd be curious to hear what other folks recommend. The choice may depend on the service life you expect.
1.2 If i do need one rated 20+ amps i can only seem to find relays for cars etc, Would i be able to use these ok?
I think that would be an excellent choice.
2. Is it good practice to stick a (10/15amp?) fuse between the relay and power?
It's never bad to have a fuse; at worst it adds expense and complexity. The more expensive the component being protected, the more you want to consider adding a fuse. I think if your pump really draws 10A, the fuse needs to be larger than 10A or it will blow too often. A 12A slow-blow might be ideal.
3. When using such a relay is the tip120 now suitable or do i need to have a MOSFET with a higher rating?
The transistor will easily handle the relay's coil current. You should verify this for yourself - current draw will be part of the specification for the relay.
4. And after reading around i have realised that this forum and its members are awesome and very helpfull.
I don't know how we survived without forums such as this.
 

wayneh

Joined Sep 9, 2010
17,498
Looks fine to me. It'd be better if it specified whether it is normally open or closed. It's likely to be normally open, given the applications the ad mentions, but it would be nice to know for sure.
 
Top