Auto Grow Project - Basic current questions

Hi,
I've started a new project: Auto Grow.

Here is my current status:

Fritzin source

This is my first ever project in electronics and I have several questions, before I'll start, some background:
I'm going to use this 12V 2A DC power supply.
I need to split the current into 5V (once I'll migrate to Arduino pro mini I'll switch to 3.3V) and keep current at 12V for motors.
So the power supply will power the motors directly (Using mosfets - see picture) while using this Step-down-converter to reduce the voltage into 5V which I'll use to power the following items:

So.. My questions are:

  • Am I doing right by using the Step down converter? Or should I just plug the 12V directly to the arduino (take into account that later I'll switch to Pro mini which will require 3.3V..
  • Any idea if the motor current is really 80mA (I've checked several sources - and all the same)..
  • Is there any issue I should expect while running the morots (i.e noise in the system)?
  • Do I need a bigger (3A, 4A etc.) Outlet Power supply?
  • Do I need a bigger (3A, 4A etc.) step-down?
  • Is there anything I should worry while working with Outlet power supply (electric shock or similar)?
  • Based on the image, Did I plugged things right (so far)?

Thanks in advance!

74HC595 needs to be powered from Arduino's 5volt pin. 12volt will instantly fry it. V-in is the input of the Uno's onboard 5volt regulator. V-in needs a minimum of 6.5volt for the onboard regulator to make a stable 5volt. If you are going to use a (reliable) external 5volt supply, connect it into the 5volt pin.

RTC/SDcard/Wifi/LCD/595 Migh all be possible with a single ESP8266-12 based Arduino (Wemos and others). TIP120 darlingtons might be easier than fets with 3.3volt Arduinos. Leo..

Edit: Cross-posting (spreading the same problem over different locations) is a bad idea, and is not tolerated here. https://forum.arduino.cc/index.php?topic=492472.0

Wawa: 74HC595 needs to be powered from Arduino's 5volt pin. 12volt will instantly fry it. V-in is the input of the Uno's onboard 5volt regulator. V-in needs a minimum of 6.5volt for the onboard regulator to make a stable 5volt. If you are going to use a (reliable) external 5volt supply, connect it into the 5volt pin.

RTC/SDcard/Wifi/LCD/595 Migh all be possible with a single ESP8266-12 based Arduino (Wemos and others). TIP120 darlingtons might be easier than fets with 3.3volt Arduinos. Leo..

Edit: Cross-posting (spreading the same problem over different locations) is a bad idea, and is not tolerated here. https://forum.arduino.cc/index.php?topic=492472.0

Hi @Wawa and thank you for your replay. The other thread is to describe the project progress while this thread is for technical questions - is it ok?

74HC595 - you're right, I'll switch it to the 5v power line.

ESP8266-12 - NodeMcu/WeMos is a different board based on the ESp8266 chip instead of the Atmel one which sound promising. I will buy several units. But that will be discussing it probably on other forum (or it's ok to keep discussing it here?).

Back to our discussion, so in your opinion: 1. What will be the best approach to use 3 volt values (12v motors, 6.5v arduino and 5v RTC/SD/ESP)? 2. Maybe I should consider moving the current down to 3.3V and use it to power both Arduino and it's extension (RTC/SD/ESP/Arduino) and 12V for motors? 3. Which regulator/step down should I use (any recommendations for a good/cheap ebay one)? 4. Is there any other (better) approach for building such application? 5 I didn't fully understood how just changing to TIP 120 will do the job (lacking some knowledge probably). I think of purchasing: 1. TIP120 or IRF3708pbf 2. SN74AHCT595 or TLC 5940 What do you think?

Thanks again!

There are plenty of 3.3V logic level FETs out there, no problem there. Just make sure you have the correct parts.

eldad87: - Am I doing right by using the Step down converter? Or should I just plug the 12V directly to the arduino (take into account that later I'll switch to Pro mini which will require 3.3V.. - Any idea if the motor current is really 80mA (I've checked several sources - and all the same).. - Is there any issue I should expect while running the morots (i.e noise in the system)? - Do I need a bigger (3A, 4A etc.) Outlet Power supply? - Do I need a bigger (3A, 4A etc.) step-down? - Is there anything I should worry while working with Outlet power supply (electric shock or similar)? - Based on the image, Did I plugged things right (so far)?

1) 12V can be plugged in directly, but your Arduino can't produce much power for other devices such as LEDs any more or it will overheat. I'm very far into building a similar system and doing it in a two-step: 12V-5V buck converter, then 3.3V regulator with capacitors to get nice and clean power for the ESP8266.

2) No idea. Sounds like a very low number to me. Check the spec sheet or connect it to an amp meter. Mind that stall and startup currents will be a lot higher.

3) Try it out. Motors tend to make noise.

4), 5) Calculate how much peak power you expect to draw and size accordingly.

6) Yes, mains power can kill. Disconnect everything before working on mains related things. Using only 12V for anything that goes in the water (such as your pumps) is also a good safety measure.

7) Does it work? Then it's correct. It's a low-res fritzing. Not even trying to figure out what you really try to do there. Draw a proper circuit diagram first.

Looks like you want to bite off more than you can chew. My advise is to try to get each individual sensor/motor/etc. to work on it's own. Make sure you understand it's workings and limitations before you move onto the next item. Then try to combine two or more.

RTC or not? The ESP can pull time of the internet. Just like you laptop. The ESP also has plenty of flash onboard, so why an SD card. The ESP is more powerful than most Arduinos, but has limited I/O (pins).

A 5volt cellphone charger can power an Arduino through the USB socket.

Darlington or mosfet? Not many through-hole mosfets work well on 3.3volt. The IRF3708 might be just ok for small loads.

The 595 is a shift register, the 5940 is a LED driver.

Use the search box on top of this page. Many people before you have done projects like this. Leo..

Wawa: The ESP is more powerful than most Arduinos, but has limited I/O (pins).

The ESP32 solved that part quite nicely with 32 IO pins. Does cost about four times as much.

wvmarle: There are plenty of 3.3V logic level FETs out there, no problem there. Just make sure you have the correct parts.

I'll appreciate if you can list some or (even better) guide me on how to search for them.

wvmarle: 1) 12V can be plugged in directly, but your Arduino can't produce much power for other devices such as LEDs any more or it will overheat. I'm very far into building a similar system and doing it in a two-step: 12V-5V buck converter, then 3.3V regulator with capacitors to get nice and clean power for the ESP8266.

I need to connect additional components like SD reader, RTC and Camera which will consume around 250mA each (Including the controller it sum around 1000mA). Any suggestion there?

wvmarle: 6) Yes, mains power can kill. Disconnect everything before working on mains related things. Using only 12V for anything that goes in the water (such as your pumps) is also a good safety measure.

How about a 12V 2A outlet power supply? Or I should got with battery only?

Thank you for your assistance!

Wawa: Looks like you want to bite off more than you can chew.

Yes I am. That's the only way for me to learn new stuff. I'm a software engineer, I used to work with small "working" building blocks - which I "glue" together into a platform. which I hope will be the same with electronics.

Wawa: My advise is to try to get each individual sensor/motor/etc. to work on it's own. Make sure you understand it's workings and limitations before you move onto the next item. Then try to combine two or more.

Will do.

Wawa: RTC or not? The ESP can pull time of the internet. Just like you laptop. The ESP also has plenty of flash onboard, so why an SD card. The ESP is more powerful than most Arduinos, but has limited I/O (pins)

The device will not necessarily connect to the internet. I'm going to use the WiFi connection in order to communicate with other devices in range (i.e a "brain" that collect information from all probs or instruct all dosers to add a nutrition into the water etc.).

Wawa: Darlington or mosfet? Not many through-hole mosfets work well on 3.3volt. The IRF3708 might be just ok for small loads.

@wvmarle just said the opposite... Regarding the TIP120 you mentioned before, just to make sure I got things right, according to this datasheet I'll need 1mA in order to open the gate (hFE 1000)?

Anyway, The whole problem is not just around the mosfets, its also in regards to the shift register. I'm looking for a combination of fet+register that will work with a 3.3V controllers such the Arduino pro mini, ESP32 etc.

Thank you for your assistance!

If your motors really are only 80mA, you may be able to replace the 74hc595 and the 8 MOSFETs with a single chip, tpic6b595. It works just like the 74hc595 (and will work fine with 3.3V input signals, although it needs 5V itself to run), but unlike that chip, the tpic can sink 150mA into each of its 8 outputs.

If the motors turn out to be higher current, there is also the tpic6595 and tpic6a595, which can handle 250mA and 350mA per output.

PaulRB: If your motors really are only 80mA, you may be able to replace the 74hc595 and the 8 MOSFETs with a single chip, tpic6b595. It works just like the 74hc595 (and will work fine with 3.3V input signals, although it needs 5V itself to run), but unlike that chip, the tpic can sink 150mA into each of its 8 outputs.

If the motors turn out to be higher current, there is also the tpic6595 and tpic6a595, which can handle 250mA and 350mA per output.

I have no idea if the motors are going to take 80mA simply because I cannot find a datasheet:

That been said, perhaps ULN2803 (or ULN2003A but it has 7 channels..) will do the job with 1 drawback - I cannot run the motors parallel (probably just 2-3 parallel top).

I will need to wait for the motors to arrive and see for myself. Thanks for the info, it help me a lot and probably will be used in the future.

Thanks!

PaulRB: If the motors turn out to be higher current, there is also the tpic6595 and tpic6a595, which can handle 250mA and 350mA per output.

I just checked the pricing on those things... The tpic6A595 is... expensive... around $10 each.

I'll go with the simple approach using shift register and TIC120 OR hack my way using TIC120 and a FET in order to avoid voltage drop (Arduino -> Shift register -> TIC120 -> IRLZ44N)

eldad87: I just checked the pricing on those things... The tpic6A595 is... expensive... around $10 each.

A quick search on eBay gave me a range from £18 to £0.80 per chip. £4~£5 was typical, so much more expensive than 74hc595, yes.

eldad87: I'll go with the simple approach using shift register and TIC120 OR hack my way using TIC120 and a FET in order to avoid voltage drop (Arduino -> Shift register -> TIC120 -> IRLZ44N)

"Simple"? Take a minute to add up the costs of all those extra components, plus the larger circuit board you will have to make, and your own time and sanity soldering it all up.

In the end, as you say, it all depends on the actual current those motors draw (especially at startup, which is difficult to measure without a scope, and during stall). If it's even close to 350mA, you will have to take the discrete MOSFET route.

And forget uln chips. They are an older design and would soon overheat and fail. The tpic chips use MOSFETs for their output stages. Uln chips use Darlingtons, which have a much higher voltage drop and therefore heat dissipation.

Ok, Here is my suggestion based on TIP120 and SN74HC595N (see attachment).

I’ve based the design upon:

The Instructables guide left left some open questions:

  • Why he added 1N4004 on the collector and Emitter?
  • I’m used to MOSFET, Why in TIP120 didn’t heconnected the Emitter to GND, Collector to Motor negative (-) and Base to arduino pin with a pull down resistor?
  • Whats the optimal resistor I should use between the SN74HC595N and TIP120?

So what do you think?
Thanks!

2017-08-08_17-35-28.jpg

.

larryd:
2017-08-08_17-35-28.jpg

Hi @larryd,
Thank you for your input. I’ve uploaded v2 image with the change.
Can you please explain why I had to remove the diode? I thought it should serve as a flyback diode and protect the TIP120.

please advise,
Thanks!

The diode goes across the motor, not across the transistor. Leo..

The 1N4001 diode in post 13 should be turned around.

.

Ok, I've flipped the 11N4001 around and added additional 7 motors:

Q1: since the Base is so sensitive to current, wouldn't it be a good idea to use a pull-down?

As I've mentioned before, I've based the design on this guide on Instructables.
Q2: Why there is a 1N4004 diode between the Emitter and Collector is needed?

Thanks!

A1. No need for pull-down resistors with Darlingtons. The base won’t float like the gate of a MOSFET would. But I strongly suggest you forget old-fashioned Darlingtons in favour of MOSFETs. They are much more modern, efficient, and less likely to overheat.

A2. That extra diode is not needed, with either MOSFETs or Darlingtons. The important one is across the motor terminals. Don’t trust Instructables. 19 out of 20 are written by people who don’t know what they are talking about. On the other hand, it is a good idea to have a noise suppression cap across the motor terminals as shown in that Instructable, especially if the motor is the type with brushes. They create a lot of interference that the cap will help absorb. Less important for brush-less motors.

PaulRB:
I strongly suggest you forget old-fashioned Darlingtons in favour of MOSFETs. They are much more modern, efficient, and less likely to overheat.

Not easy to find mosfets with a Vgs(th) <1.5volt in through-hole package.
That’s why I suggested a darlington.
Not a big problem to “loose” 1-1.5volt on a 12volt supply for a small motor.
If OP can work with smd, then yes. Use n-channel mosfets.

The diodes across the TIP120 are like tits on a bull. Remove.
Lower the base resistor to 1k for motors <250mA.
Use even a lower value if motors are >250mA.
Base:collector current for a TIP120 should be about 1:250 for saturation.
Leo…