1
\$\begingroup\$

Newbie here, trying to learn electronics (Iam from SW background). Looking for someone to review the initial schematic and advise. Haven't ordered the parts yet, so appreciate any tips in finalising the design.

GOAL:

  1. To build an automatic watering system for indoor potted plants
  2. The potted plants are split into five zones, each zone having its own watering schedule Watering schedule should be defined by the amount of water to be delivered (in litres) at a specific point in time

DESIGN:

  1. One submersible water pump is installed per zone (total five pumps)
  2. A raspberry pi is used to control the pump according to a preset schedule (coded in software)
  3. Only one pump is to be active at any point in time. This is to ensure that only one manufacturer provided power supply (12v) is used to power the system Pump specs: Rated Voltage: DC 12V Rated Current: 1.2A Power Consumption: 14.4W Driven: Brushless Magnetic Submersible: Yes
    Flow Rate: 780L/H
    Details: http://www.aliexpress.com/store/product/Brand-New-12V-Micro-Pump-with-DC-Plug-Strong-780LPH-4M-Black-230g-Electric-Power-Drop/912512_1739623777.html
  4. opto-coupler to decouple the 5V and 12V circuits
  5. Combination of transistors and NOT gates to implement the required logic

DESCRIPTION OF SCHEMATICv3:

  1. VCC2 & 3 are wall-adapter DC power supplies
  2. VCC3 is from the pump manufacturer
  3. M1, M2, M3, M4, M5 are pumps as per specs mentioned earlier
  4. U1, U2, U3, U4, U14, U15, U18, U19, U22, U23 are BJT’s
  5. R1 - R11 are resistors
  6. U12, U13, U17, U21 are opto-couplers
  7. U9, U11, U16, U20, U24 are logic NOT gates
  8. D1-D5 are diodes for flyback protection
  9. Color codes: RPI GPIO output wires are in green, 5V power supply wires are in red, 12V power supply wires are in blue

SCHEMATICv3: [![schematic][1]][1] QUESTIONS ON SCHEMATICv3:

  1. Will the high level schematic work? (For e.g. am I missing any components OR are any components wrongly connected)
  2. Please suggest ratings of parts a. Value of R1, R2, R3, R4, R9 and R11 (resistors protecting the RPI) b. Part number for the NOT gate that I found is TC7SU04F. Will this work? Alternatives? c. Value of R5, R6, R7, R8 and R10 (resistors protecting the transistors) d. Part number for the OPTOCOUPLER I found is TLP621 (U12, U13, U17, U21). Will this work? Alternatives? e. Part number for the BJT transistor (U1, U2, U3, U4, U14, U15, U18, U19, U22, U23) I found is MPS2222A. Will this work? Alternatives? f. Part number for the Diodes (D1,D2, D3, D4, D5) I found is 1N5817. Will this work? Alternatives?

  3. Does it make sense to use MOSFET’s instead of OPTOCOUPLER?

  4. Are any pull-down resistors required for the RPI GPIO pins to protect during reboot?
  5. Is this safe HW design? Will the components blow-out due to multiple GPIO pins being held high briefly at RPI boot? For e.g. if GPIO21 and GPIO20 are both held high, then both U12 and U13 will get activated and consequently both M1 & M2 will turn on drawing more than what the 12v power supply can deliver.

Aug 4, 2015: Updated schematic based on modifications suggested by @WhatRoughBeast [![Updated Schematic v4.2][1]][1]

Aug 5, 2015: v4.3, based on modifications suggested by @WhatRoughBeast Updated Schematic v4.3

\$\endgroup\$
7
\$\begingroup\$

Well, the quick answer is no. That won't work.

1) Your flyback diodes are pointing the wrong way, and will always be ON, shorting out the power supply. They are also not rated for 1.2 amps.

2) Your optocouplers, while not a bad idea, cannot possibly handle the current required.

3) It's not at all clear what your logic function is, and I suspect you intended U1,U3,U14,U18 and U22 to be PNPs.

Since you're willing to use external logic, and apparently don't entirely trust your Pi to provide only one output active at a time, I would suggest you go whole hog on logic (it will only take one IC) and do something like

schematic

simulate this circuit – Schematic created using CircuitLab

D0 to D2 are 3 bits from the Pi, and they form a binary address of the motor you want on. A code of 1 to 5 will select the motor you want, and 0,6,or 7 will result in no motors on.

I've shown the 5 optocoupler inputs as LEDs, and I've only shown one output. The flyback diode should be rated for 2 amps or more. A 1-amp diode such as a 1N5817 will actually work, but whenever a motor is turned off the current through the diode will briefly exceed 1 amp. This is probably OK, but bad practice. MOSFETs are n-type. Almost anything will do, since voltage rating is less than 20 volts, and current is 1.2 amps.

\$\endgroup\$
  • \$\begingroup\$ Wow! Thx for the quick and detailed feedback. \$\endgroup\$ – Vijay Seshan Aug 2 '15 at 16:57
  • \$\begingroup\$ While I try to process this, I have the following questions: 1. Wouldn't I need a pull down resistor on D0-3 to protect against any RPI floating pins at boot 2. Does your circuit work with TLP621 for opto-coupler? (or PC817 sound like a better choice)? \$\endgroup\$ – Vijay Seshan Aug 2 '15 at 17:14
  • \$\begingroup\$ @VijaySeshan - 1) Not a bad idea. 2) I assumed a TLP621. If you've got a GB rank TP621, you ought to have a mimimum gate drive of 7-8 volts, which should be plenty. For insurance against a 50% CTR, you can increase the 2k resistors to 5k. And frankly I don't see anything to choose between a TLP621 and a PC817. \$\endgroup\$ – WhatRoughBeast Aug 2 '15 at 17:42
  • \$\begingroup\$ thanks for taking the time to review my data and answering my questions. Update#1/4: I researched a bit more and got it confirmed that it is possible to initialise the RPI GPIO pins in such a way that all of them can be kept low during boot..and since the GPIO pins itself can provide the 5-8mA driving current for the TLP621, I could have connected it directly. However, your suggestion of IC might help me save the GPIO pins for other purposes. So I’ve decided to keep them in. Updated diagram is uploaded below. \$\endgroup\$ – Vijay Seshan Aug 4 '15 at 19:01
  • \$\begingroup\$ Update#2/4: I’ve selected FQP30N06L N-Channel MOSFET (32A,60V,RDS(on) =35mΩ(Max.)@VGS =10V, ID = 16 A ) for Q1-Q5 and STPS2L60 Schottky Diode (2amp, 60V) for D1-D5. Hope this is ok? \$\endgroup\$ – Vijay Seshan Aug 4 '15 at 19:06

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.