Connect with us

Circuit & Component Check

Discussion in 'Electronic Basics' started by Danny T, Jan 2, 2005.

Scroll to continue with content
  1. Danny T

    Danny T Guest

    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)
     
  2. Andrew Holme

    Andrew Holme Guest

    [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!
     
  3. Danny T

    Danny T Guest

    Righto. Just Googled about this, I understand now :)
    Right. So am I right in believing 2x3V motors in parallel still only
    require 3V supply, but probably double the current?

    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,
     
  4. Danny T

    Danny T Guest

  5. Andrew Holme

    Andrew Holme Guest

    Danny T wrote:

    [snip]

    +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.
     
  6. Andrew Holme

    Andrew Holme Guest

    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.
     
  7. Danny T

    Danny T Guest

    Andrew Holme wrote:
    <snip diagram>

    Excellent. Thanks :)

    Bummer! ;-)

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

    Thanks again :)
     
  8. Danny T

    Danny T Guest

    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!!!)
     
  9. Danny T

    Danny T Guest

    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! ;)
     
  10. Andrew Holme

    Andrew Holme Guest

    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.
    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"
     
  11. Danny T

    Danny T Guest

    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 :)

    Yep, I figured that :)

    Thanks!
     
  12. Danny T

    Danny T Guest

    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
     
  13. Andrew Holme

    Andrew Holme Guest

    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.
     
  14. Andrew Holme

    Andrew Holme Guest

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

    Danny T Guest

    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
     
  16. Danny T

    Danny T Guest

    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 !
     
  17. 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
     
  18. Danny T

    Danny T Guest

    Which leg of the MOSFET should it connect to? Not sure I understand its
    purpose :-\
     
  19. 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.)
     
  20. Andrew Holme

    Andrew Holme Guest

    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.
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-