I apologize if this type of question doesn't belong here, but I recently completed a circuit diagram for an upcoming project, and realized upon review that I didn't include any resistors... There didn't seem to be anywhere in the circuit that required resistors.

Here is the diagram in question:

Circuit Diagram

Long story short, did I omit something obvious?

  • 2
    \$\begingroup\$ Style guide for drawing schematics. Check it out. \$\endgroup\$ – Nick Alexeev Jul 29 '13 at 6:17
  • \$\begingroup\$ A small issue: Instead of feeding the positive supply rail for the transistors from the 5 Volt regulator that also feeds the RPi, supplying those transistors (i.e. the C+ contacts in the relays) from the 6 Volt regulator that supplies the motors would prevent (or significantly attenuate) relay switching noise appearing on the RPi's supply. With common ground, there is no benefit to using the 5 Volt regulator for the transistors, unless the relay coils cannot handle voltage greater than 5 Volts. \$\endgroup\$ – Anindo Ghosh Jul 29 '13 at 6:24
  • 1
    \$\begingroup\$ Do you realize that both voltiage regulators will need cooling? IIRC a PI draws some 500 mA, so the regulator will dissipate 0.5 * 7 = 3.5W. When the motors realy draw 3A that regulator will dissipate 3 * 6 = 18W !! \$\endgroup\$ – Wouter van Ooijen Jul 29 '13 at 7:21
  • \$\begingroup\$ @WoutervanOoijen That's only if you assume those are linear regulators and not switching regulators. There are many 3 pin drop-in switching reg modules. \$\endgroup\$ – Passerby Jul 29 '13 at 7:27
  • \$\begingroup\$ if you use a solid-state H-bridge you can dispense with the regulator for the motors and probably save some money over mechanical relays. \$\endgroup\$ – Phil Frost Jul 29 '13 at 12:15

You need resistors in series with the base of each transistor. Right now, you're abusing the current-limit of the GPIO pins in the broadcom MCU to limit the base-current to the transistors. This may damage them (it may already have done damage, too).

Also, assuming the relays you are using are mechanical, you really should have clamp diodes across the relay coils. As it is, when you turn the relay off, the collapse of the magnetic field will cause a high-voltage spike that may get back into the rPi and damage something, or cause a spontaneous reset/wierd unpredictable issues.

Lastly, I don't know if your voltage regulators are a assembly, or just a bare device. If they're a bare device, you probably need bypass capacitance on the output of the 5V regulator.

Re: The relay diodes:

Take a look at these questions.

  • \$\begingroup\$ Would a 1K resistor work for the transistor bases? I've never heard of a "clamp diode" before... Is it anything like a transient voltage suppressor? As far as the voltage regulator goes, I've been following the datasheet, and the 5v regulator didn't require a capacitor between V(out) and ground. \$\endgroup\$ – Soviero Jul 29 '13 at 6:18
  • \$\begingroup\$ @KevinSoviero Links to the two voltage regulator datasheets, please? \$\endgroup\$ – Anindo Ghosh Jul 29 '13 at 6:19
  • \$\begingroup\$ @AnindoGhosh 5V regulator datasheet: jameco.com/Jameco/Products/ProdDS/876221.pdf \$\endgroup\$ – Soviero Jul 29 '13 at 6:22
  • 1
    \$\begingroup\$ @KevinSoviero From the datasheet: "Co is not needed for stability; however, it does improve transient response. Values of less than 0.1 F could cause instability." The load is being switched, hence transients will be significant. An output capacitor is rather strongly recommended in such case. \$\endgroup\$ – Anindo Ghosh Jul 29 '13 at 6:26
  • \$\begingroup\$ @AnindoGhosh Ok, thank you for your help, would a 0.1 uF work? \$\endgroup\$ – Soviero Jul 29 '13 at 6:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.