Circuit & Component Check

D

Danny T

Jan 1, 1970
0
Hi all,

Following on from the "Calculating Resistors Required" thread, which
went off on a tanget (cos I'd no idea what I was doing!), could you see
if all looks ok with the following (inc. resistor values etc.).

I've posted the specs for motor/led/etc. I think might be useful at the
bottom.

Thanks :)


VCC
+ 6V
'--------------------o------------------------------o-----------o----
| | | | |
.-. .-.Resistor .---. | |
| | | |10K | | | Diode 1x .'. .'.
10K | | | | | | 1N4148 | | | |
'-' '-' | | | (5.3V?) | | | |
| '--------. '---' | | | |
| | | | Diode 4x | | Diode 4x| |
| o | | | PIC 1N4148 | | 1N4148| |
| |=| | | VDD __ VSS (3.2V?) | | (3.2V?) | |
| o | | '----o| |o---. '-' '--.
| | Switch | '----o| |o---)---------. | |
| | '---------o| |o---)---------). | |
o----)------------------o|__|o---)---- || _-_ _-_
| | | | || |___| |___|
o | | | .-. || - -
|=|| MCLR connected | |160R || | Motor Motor
o | | to VDD | | | || | |
| | | '-' || | |
|Switch | | || | |
| | | | ')-----)----. |
| | | ,---. | | | |
| | | | X | | ||-+ | ||-+
| | | '---' | ||-> | ||->
| | | LED '--||-+ '-----||-+
| | | | N-Type | N-Type |
| | | | MOSFET | MOSFET |
| | | | | |
-o----o---------------------------o----o-----------o--------------
===
GND
(created by AACircuit v1.28.4 beta 13/12/04 www.tech-chat.de)


There's two switch inputs, and 3 outputs - 1 LED, 2 Motors.

MOTORS: 3V DC
No load current 0.13A max.
Rated load current 0.45A max.

LED:
I F (max) 15mA
V F (max) 2.8V

PIC:
Input 3.0 - 5.5V

I took the diodes as dropping about 0.7V, and calculated the LED
resistor as ((6 - 0.7 (voltage to PIC)) - (2.8 (LED voltage))/(15 (LED
current)) * 1000 = 166. The 10K resistors were suggested in the other
thread, to tie the inputs to 5V or 0V. However, it just dawned on me
that I've got 6V, and not 5V! I guess I can stick a diode or two in there?

Also, can the diodes be "shared"? Eg., connect both motors to the same
diodes. And even remove one of them, and connect it to the output of the
diode in place for the PIC? eg.:


VCC
+
| 6V
'---------| 4.4V 3.7V
V Diode Diode Diode
- ->|--->|---.
| 5.3V | |
o--------------' V Diode
| -
| |
|5.3V o------.
| __ | |3V
'--------o| |o- 3V | |
-o| |o- | |
-o| |o- _-_ _-_
-o|__|o- |___| |___|
- -
| |
(created by AACircuit v1.28.4 beta 13/12/04 www.tech-chat.de)
 
A

Andrew Holme

Jan 1, 1970
0
Danny said:
Hi all,

Following on from the "Calculating Resistors Required" thread, which
went off on a tanget (cos I'd no idea what I was doing!), could you
see if all looks ok with the following (inc. resistor values etc.).

I've posted the specs for motor/led/etc. I think might be useful at
the bottom.

[snip: good diagram]

1. As you said: the top of the 10k resistors should go to the PIC Vdd rail
and not to 6V.
2. You need a 100nF decoupling capacitor between Vdd and Vss mounted as
close to the PIC as possible. This smooths out noise and glitches on the
supply; it stops the PIC from crashing when you switch the motors on!
3. You can share power-supply dropper didoes between the motors, but use a
seperate diode for the PIC to reduce noise on the PIC supply rail.
4. You need back e.m.f. protection diodes across the motors. Inductors
(motor, relay ...) generate a large back e.m.f. when you switch them off.
This diode should be connected across the motor with the cathode pointing
upwards. The diode short-circuits the back e.m.f. to protect other
components.

Otherwise, that looks like it should fly!
 
D

Danny T

Jan 1, 1970
0
Andrew said:
2. You need a 100nF decoupling capacitor between Vdd and Vss mounted as
close to the PIC as possible. This smooths out noise and glitches on the
supply; it stops the PIC from crashing when you switch the motors on!

Righto. Just Googled about this, I understand now :)
3. You can share power-supply dropper didoes between the motors, but use a
seperate diode for the PIC to reduce noise on the PIC supply rail.

Right. So am I right in believing 2x3V motors in parallel still only
require 3V supply, but probably double the current?

4. You need back e.m.f. protection diodes across the motors. Inductors
(motor, relay ...) generate a large back e.m.f. when you switch them off.
This diode should be connected across the motor with the cathode pointing
upwards. The diode short-circuits the back e.m.f. to protect other
components.

Right, I think I understand that (when stopped, the motor is still
spinning, and will cause a spike of power the wrong way?), but don't
understand how to wire it. I've already got a string of diodes
connecting to the motors - any chance of a quick diagram? Can it be the
same diode as I've labelled for the drops?

Thanks again,
 
A

Andrew Holme

Jan 1, 1970
0
Danny T wrote:

[snip]
Right. So am I right in believing 2x3V motors in parallel still only
require 3V supply, but probably double the current?
Correct.


Right, I think I understand that (when stopped, the motor is still
spinning, and will cause a spike of power the wrong way?), but don't
understand how to wire it. I've already got a string of diodes
connecting to the motors - any chance of a quick diagram? Can it be
the same diode as I've labelled for the drops?


+6V ---->|-->|-->|-->|---+
4 Diodes |
|
|
3.2V +-----+-------+-----+
| | | |
| | | |
| _-_ | _-_
- |___| - |___|
^ - ^ -
| | Motor | | Motor
| | | |
+-----+ +-----+
| |
| |
||-+ ||-+
||-> ||->
----||-+ -----||-+
N-Type | N-Type |
MOSFET | MOSFET |
| |
=== ===
GND GND
created by Andy´s ASCII-Circuit v1.24.140803 Beta www.tech-chat.de

All inductors (not just motors) produce a "spike the wrong way."

When the battery is running low, and it's internal resistance is higher, the
motor will create more noise on the power supply rails. A low-dropout
regulator would better isolate the PIC from this than a simple dropper
diode; however, I'm 99% sure the diode will work - as long as your not
designing life support systems.

Dropper diodes are fine for the motor supply.

The 1N4148 is only rated for a maximum forward current of 300mA. Use the
1N4001.
 
A

Andrew Holme

Jan 1, 1970
0
Danny said:
Danny T wrote:
<snip>

I don't understand the column headings given here:

http://www.rapidelectronics.co.uk/r...CAT_CODE=30400&STK_PROD_CODE=M28648&XPAGENO=1

Anyone?

I need my PIC to drive 2x 3V motors... I've got two sets of motors -
one set are .45A, the other 1.07A (5240rpm and 13100rpm - I don't
know which will suit me best yet!)

VDS V = Maximum drain source voltage. They're all well above 3V so any will
do!

N chan / P chan = You want N channel.

RDS (on) = Equivalent resistance when FET is on. Ideally, as low as
possible. There will be a small voltage drop across the FET due to this
resistance. Knowing motor current, you can calculate what the voltage drop
will be using Ohm's Law.

ID cont = Maximum current. You need at least .45A or 1.07A depending on
which motor you choose.

PD = Maximum power dissipated by the MOSFET ( = V*I). You know the voltage
drop across the MOSFET, and the current. Multiply them together to
calculate the power.
 
D

Danny T

Jan 1, 1970
0
Andrew Holme wrote:
<snip diagram>

Excellent. Thanks :)

When the battery is running low, and it's internal resistance is higher, the
motor will create more noise on the power supply rails. A low-dropout
regulator would better isolate the PIC from this than a simple dropper
diode; however, I'm 99% sure the diode will work - as long as your not
designing life support systems.

Bummer! ;-)

The 1N4148 is only rated for a maximum forward current of 300mA. Use the
1N4001.

For all 6 diodes? Those dropping the voltage, and the ones connected
back over the motors?

Thanks again :)
 
D

Danny T

Jan 1, 1970
0
Andrew said:
The 1N4148 is only rated for a maximum forward current of 300mA. Use the
1N4001.

That's 1A, correct?

One set of my motors (much higher RPM than the other) have a max current
of 1.07A... If I need to use them, am I still ok with these? What about
if I use a lower voltage than the max? Or should I find something rated
higher just to be safe?

(It's not a life support system ;))

If I destroy up (a diode, resistor, MOSFET etc.), is it easy to detect?
Will they stop conducting, or could they potentially blow other things
along the way (eg. if a resistor stopped resisting!!!)
 
D

Danny T

Jan 1, 1970
0
Andrew said:
http://www.rapidelectronics.co.uk/r...CAT_CODE=30400&STK_PROD_CODE=M28648&XPAGENO=1

VDS V = Maximum drain source voltage. They're all well above 3V so any will
do!

N chan / P chan = You want N channel.

RDS (on) = Equivalent resistance when FET is on. Ideally, as low as
possible. There will be a small voltage drop across the FET due to this
resistance. Knowing motor current, you can calculate what the voltage drop
will be using Ohm's Law.

ID cont = Maximum current. You need at least .45A or 1.07A depending on
which motor you choose.

PD = Maximum power dissipated by the MOSFET ( = V*I). You know the voltage
drop across the MOSFET, and the current. Multiply them together to
calculate the power.

You're a star! Thanks (again) Andrew :)

Gonna order the things I don't have from Rapid and no doubt I'll be
posting here in the week complaining! ;)
 
A

Andrew Holme

Jan 1, 1970
0
Danny said:
That's 1A, correct?

One set of my motors (much higher RPM than the other) have a max
current of 1.07A... If I need to use them, am I still ok with these?
What about if I use a lower voltage than the max? Or should I find
something rated higher just to be safe?

The 1N4001 is fine for 1.07A as long as you only run one motor at a time.
You should find something heftier, or use seperate dropper chains, if you
need to run two 1A motors at once. The .07 is negligible.
(It's not a life support system ;))

If I destroy up (a diode, resistor, MOSFET etc.), is it easy to
detect? Will they stop conducting, or could they potentially blow
other things along the way (eg. if a resistor stopped resisting!!!)

Resistors can go short circuit if you subject them to enough abuse, but they
tend to smoke and become discoloured in the process - which is a bit of a
giveaway. You can test diodes with your multimeter. The best way to tests
the MOSFETS would be in-circuit: disconnect the gate; connect a 1M resistor
from gate to ground; lick your fingers; put a wet finger on the gate; put
the other finger on +5V or GND: you should be able to switch the motor on
and off.

BTW some MOSFET gates are static sensitive - observe handling precautions.

I forgot to mention - on rapidelectronics - you want a MOSFET marked * for
"Logic level device with optimised design for 5V drive"
 
D

Danny T

Jan 1, 1970
0
Andrew said:
The 1N4001 is fine for 1.07A as long as you only run one motor at a time.
You should find something heftier, or use seperate dropper chains, if you
need to run two 1A motors at once. The .07 is negligible.

Of course, I should've realised that!

Motors will run together most of the time (when I get to it, it'll be a
little "robot" on 3 wheels, two driven, like a trike) except for
turning, so I'll just do two chains of diodes from the power :)

Resistors can go short circuit if you subject them to enough abuse, but they
tend to smoke and become discoloured in the process - which is a bit of a
giveaway.
LOL!!


I forgot to mention - on rapidelectronics - you want a MOSFET marked * for
"Logic level device with optimised design for 5V drive"

Yep, I figured that :)

Thanks!
 
D

Danny T

Jan 1, 1970
0
Final question....

http://www.rapidelectronics.co.uk/rkmain.asp?PAGEID=80010

Would that allow me to test without using batteries? It does 6V, which
is about the same as 4AA batteries. I don't entirely understand the
current though - does 3A mean it can produce 3A without blowing a fuse,
but it'll run small things fine, or will this just fry things that don't
need such a high current?

Thanks,

Danny
 
A

Andrew Holme

Jan 1, 1970
0
Danny said:
Final question....

http://www.rapidelectronics.co.uk/rkmain.asp?PAGEID=80010

Would that allow me to test without using batteries? It does 6V, which
is about the same as 4AA batteries. I don't entirely understand the
current though - does 3A mean it can produce 3A without blowing a
fuse, but it'll run small things fine, or will this just fry things
that don't need such a high current?

That link doesn't work for me but I assume it's some sort of mains power
supply.

You need a REGULATED 6.0V supply. A wallwart may *not* be suitable
(excessive ripple, peak > 6V).

Yes, it means you can draw anything from zero up to a maximum of 3A.

Power supplies can regulate the voltage or the current - but not both at
once.
 
A

Andrew Holme

Jan 1, 1970
0
Danny said:
Final question....

http://www.rapidelectronics.co.uk/rkmain.asp?PAGEID=80010

Would that allow me to test without using batteries? It does 6V, which
is about the same as 4AA batteries. I don't entirely understand the
current though - does 3A mean it can produce 3A without blowing a
fuse, but it'll run small things fine, or will this just fry things
that don't need such a high current?

Thanks,

Danny

If you mean order code 85-1820 then, yes, that would be fine.
 
D

Danny T

Jan 1, 1970
0
Andrew said:
That link doesn't work for me but I assume it's some sort of mains power
supply.

Nor me!

You need a REGULATED 6.0V supply. A wallwart may *not* be suitable
(excessive ripple, peak > 6V).

Yep, guessed this. I had to buy an unregulated 300mA supply for my pic
programmer (why, I don't know!), but this one has regulation figures, so
I assume it is. It is the one you found (85-1820), but before I order my
stuff, I'd like to ask you to check "Miles Harris" reply in my
"Calculating resistors required" thread :-\

Ta,

Danny
 
D

Danny T

Jan 1, 1970
0
John said:
Keep in mind that motors do not have to run at exactly the specified
voltage, but that the speed will be roughly proportional to the
voltage (torque held constant) and the torque will be roughly
proportional to the current (speed held constant). Picking the right
motor is a lot like picking the right gear in a car that matches the
motor (speed-torque and efficiency curves) to the driving conditions
(speed, climb, weight carried, wind, acceleration needed, etc.)

Yep. Either will do for now, but until I put wheels on carpet, I won't
know if the weedy one has enough power to move it. Got some cogs (a worm
thing?), so I don't imagine it'll be a problem - can sacrifice speed for
mobavility !
 
J

John Popelish

Jan 1, 1970
0
Andrew said:
Danny said:
Hi all,

Following on from the "Calculating Resistors Required" thread, which
went off on a tanget (cos I'd no idea what I was doing!), could you
see if all looks ok with the following (inc. resistor values etc.).

I've posted the specs for motor/led/etc. I think might be useful at
the bottom.

[snip: good diagram]

1. As you said: the top of the 10k resistors should go to the PIC Vdd rail
and not to 6V.
2. You need a 100nF decoupling capacitor between Vdd and Vss mounted as
close to the PIC as possible. This smooths out noise and glitches on the
supply; it stops the PIC from crashing when you switch the motors on!
3. You can share power-supply dropper didoes between the motors, but use a
seperate diode for the PIC to reduce noise on the PIC supply rail.
4. You need back e.m.f. protection diodes across the motors. Inductors
(motor, relay ...) generate a large back e.m.f. when you switch them off.
This diode should be connected across the motor with the cathode pointing
upwards. The diode short-circuits the back e.m.f. to protect other
components.

Otherwise, that looks like it should fly!

5. You should also have a capacitor between each motor driver fet
source and the positive end of its motor, to act as a small local
supply, so those high frequency on-off edges don't get back to the
battery and then into the PIC.
A .1 uf film or ceramic in parallel with a few hundred microfarad
electrolytic might be enough. A 1 uf film or ceramic in parallel with
a 1000 uf electrolytic would be better.

My favorite kind of film capacitors for this service are the very low
inductance, stacked V series from Panasonic, sold by digikey:

http://rocky.digikey.com/WebLib/Panasonic/Web data/ECQV.pdf
 
D

Danny T

Jan 1, 1970
0
John said:
5. You should also have a capacitor between each motor driver fet
source and the positive end of its motor, to act as a small local
supply, so those high frequency on-off edges don't get back to the
battery and then into the PIC.
A .1 uf film or ceramic in parallel with a few hundred microfarad
electrolytic might be enough. A 1 uf film or ceramic in parallel with
a 1000 uf electrolytic would be better.

Which leg of the MOSFET should it connect to? Not sure I understand its
purpose :-\
 
J

John Popelish

Jan 1, 1970
0
Danny said:
Danny T wrote:
<snip>

I don't understand the column headings given here:

http://www.rapidelectronics.co.uk/r...CAT_CODE=30400&STK_PROD_CODE=M28648&XPAGENO=1

Anyone?

I need my PIC to drive 2x 3V motors... I've got two sets of motors - one
set are .45A, the other 1.07A (5240rpm and 13100rpm - I don't know which
will suit me best yet!)

Keep in mind that motors do not have to run at exactly the specified
voltage, but that the speed will be roughly proportional to the
voltage (torque held constant) and the torque will be roughly
proportional to the current (speed held constant). Picking the right
motor is a lot like picking the right gear in a car that matches the
motor (speed-torque and efficiency curves) to the driving conditions
(speed, climb, weight carried, wind, acceleration needed, etc.)
 
A

Andrew Holme

Jan 1, 1970
0
Danny said:
Nor me!



Yep, guessed this. I had to buy an unregulated 300mA supply for my pic
programmer (why, I don't know!), but this one has regulation figures,
so I assume it is. It is the one you found (85-1820), but before I
order my stuff, I'd like to ask you to check "Miles Harris" reply in
my "Calculating resistors required" thread :-\

Ta,

Danny

Miles is mistaken. The forward voltage drop of a silicon diode is
approximately 0.7V except at very very small currents.

I second the suggestion made by John P about adding decoupling & reservoir
capacitors for the motors. These should be connected between the 3.2V power
rail and ground, as close as possible to the motor +ve and FET source
terminals. These act like small downstream batteries, absorbing and
satisfying the transient (spikey) current demands of the motors, so the rest
of the circuit (upstream) sees fewer glitches. Circuit layout is critical
for these to be effective.
 
Top