Auto Grow Project - Basic current questions

PaulRB:
That extra diode is not needed

Thanks!!! I didn’t make any sense to me.

PaulRB:
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.

So you suggest to add one in addition to the D1N40001?

A 100n (0.1uF) ceramic cap across a brushed motor is commonly used to minimise stray RF from the sparks of the brushes. Like the back-emf diode, it goes across the motor terminals.
1uF, as on the Fritzing, is an unusual high value.
Leo..

Wawa:
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.

I’ll probably have it made into a PCB. so if there is anything you’d like to suggest, now is the time :slight_smile:

Wawa:
The diodes across the TIP120 are like tits on a bull. Remove.

LOL

Wawa:
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.

I would appreciate if you can explain how you did the match, I tried to google for it and I came up with different results.

Lets use the following details:
Motor is 12V 300mA Inrush and 80mA on regular load.
Based on this datasheet.

  • VBE should be ~1.4@300mA.
  • DC gain is ~2000@300mA.

Result #1:
Based on this post #9 from pito.
Ib = Ic / DC gain = 0.3A/2000 = 150uF (we should use x5) = 0.75mA
Rb = (3.3V - Vbe) / Ib = (3.3-1.4) / 0.75 = 2.53333333/ 2k5
so actually 2K2 seems ok.

Result #2:
I also came across this video (formula discussed at 4:15) and this, based on it the result is different (using same value for Vbe of 1.4@300mA):
R = (3.3-Vbe)/I = (3.3-1.4)/0.003 = 633.333333. //Or 1266.66667 if I use 2000 DC gain instead of 1000
So Need to use a resistor of 560…

Added the 0.1uF to motors:

wvmarle:
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.

Perhaps now, after all that research, maybe it worth looking back and trying @wvmarle's (or this) approach.

Any suggestion?

An amplification factor of 2,000 sounds very high, 250 sounds much more realistic to me. So 300 mA would require a base current of 1.2 mA, times five Darlingtons makes 6 mA, and the maximum value for the base resistor (at 3.3V) would be 550 Ohm. 470 Ohm should do, 330 Ohm is safer.

Being allowed a little more base current won't hurt the darlington. Having too little base current will cause overheating (or it simply not working at all).

Still probably better to use a MOSFET. No issues with heat and so.

The TIP120 is not used as an amplifier but as a saturated switch.
DC gain is irrelevant here.
Look at page 6, fig. 10 right: VCE(sat) @ IC/IB = 250

In the diagram you still have one diode across a TIP120.

With 300mA stall and 80mA regular I still would keep the TPIC6B595 in the picture ($0.50 on ebay).
Nothing else needed than a 100n cap across the supply.
Leo..

wvmarle:
An amplification factor of 2,000 sounds very high, 250 sounds much more realistic to me.

A darlington is two transistors stacked. DC gain = Tr1 x Tr2.
A gain of >=1000 is normal. If... collector voltage is high enough,
The TIP120 datasheet list a minimum DC gain of 1000 at a collector voltage and current of 3volt and 0.5A.
Leo..

Hi Wawa,
Thanks you again!

Wawa:
The TIP120 is not used as an amplifier but as a saturated switch.
DC gain is irrelevant here.
Look at page 6, fig. 10 right: VCE(sat) @ IC/IB = 250

Q: So the links I've provided before (video + link to pipo's answer) are wrong?

Keep in mind that I still have a lot to learn, using referrences from the diagram will work best for me (rather then "diode across a TIP120") .

Wawa:
In the diagram you still have one diode across a TIP120.

If you refer to D2-D9.. this is what you and @larryd advices me to do (I turned it around).
Then I added the cap like you and @PaulRB suggested...
Q: should I remove it and keep the cap only?

Wawa:
keep the TPIC6B595

But it's max current is 250mA and the motor Inush is around 250mA-300mA.
Q: It won't get damaged?

Q: What about mixing it with @wvmarle's suggestion?

  • Have a 12v-5v buck + 5v-3.3v buck (or a volt regulator)
  • Use TPIC6B595 (or SN74HC595) and IRL44N

The price will go up $3 (additional Buck and TPIC6B959), but It will make the design more flexible:

  • Capable of handling >250mA motors
  • Controllers of 5v/3v can be used.
  • Motors can run parallel if needed (limited only by the max current of the VCC).

Q: What do you think, is it a good idea (with SN74HC594 or TPIC6595)?

eldad87:
So the links I've provided before (video + link to pipo's answer) are wrong?

Sort of. Calculating with Hfe only works if there is some voltage left on the collector.
To get the lowest volt drop across a "transistor switch" when "on", more base current is needed.
Then collector voltage can even drop below base voltage (not for a darlington though).
If you lower base current too much, the transistor switch is not fully "on", and heats up more.
Get the optimum switch collector:base current ratio from the datasheet.
That is e.g. 1:10 for a 2N2222, and 1:250 for the TIP120.

eldad87:
If you refer to D2-D9..

No, seven TIP120s are drawn right, one still has the diode across.

eldad87:
But it's max current is 250mA and the motor Inush is around 250mA-300mA.

TPIC6B595 is 150mA continuous and 500mA peak.
TPIC chips need to run on 5volt. Not sure if it will like 3.3volt drive logic.
74HC595 can run on 3.3volt. IRL44 might work with 3.3volt logic (and a light load).

Make a test setup, and try things out.
You have to make the decisions.
Leo..

Wawa:
Sort of. Calculating with Hfe only works if there is some voltage left on the collector.
To get the lowest volt drop across a "transistor switch" when "on", more base current is needed.
Then collector voltage can even drop below base voltage (not for a darlington though).
If you lower base current too much, the transistor switch is not fully "on", and heats up more.
Get the optimum switch collector:base current ratio from the datasheet.
That is e.g. 1:10 for a 2N2222, and 1:250 for the TIP120.
No, seven TIP120s are drawn right, one still has the diode across.
TPIC6B595 is 150mA continuous and 500mA peak.
TPIC chips need to run on 5volt. Not sure if it will like 3.3volt drive logic.
74HC595 can run on 3.3volt. IRL44 might work with 3.3volt logic (and a light load).

Make a test setup, and try things out.
You have to make the decisions.
Leo..

I've ordered the TPIC6B595 and all other chips. So I'll try the 3 combinations:

  1. Current diagram.
  2. TPIC6B595 alone, without the TIP120/shift register.
  3. Use buck for 12v-5.5v and buck for 5.5v-3.3v with IRL44N and SN74HC595.

The questions are

  1. Which is more efficient?
  2. Which is more versatile (more demanding motors or other devices)?
  3. And of course is how to check those things (#1 & #2)?

Thanks

As you have said yourself, the solution will depend on those motors. You need to know what their startup/stall current and running current is. Only once you have measured this can any of us say what the solution should be.

eldad87:
...Use buck for 12v-5.5v and buck for 5.5v-3.3v

I would use a buck converter for 12>5, and a linear one for 5>3.3
ESP8266 boards (Wemos etc) already have that 3.3volt linear regulator fitted.
Leo..

Wawa:
Not easy to find mosfets with a Vgs(th) <1.5volt in through-hole package.
That’s why I suggested a darlington.

Hi,
I just got those 2 items:

  • SOP-8 to DIP-8: Link
  • SOP-16 to DIP-16: Link
    So maybe that can help. If you have a different mounting option that I should buy DIP adapter - please let me know.
    So now you have more options to suggest :slight_smile:

Thanks!

Wawa:
I would use a buck converter for 12>5, and a linear one for 5>3.3
ESP8266 boards (Wemos etc) already have that 3.3volt linear regulator fitted.
Leo..

I just ordered this one one.
Any good tutorial for linear regulator?

eldad87:
Any good tutorial for linear regulator?

Here you go:
Vin to power supply, Vout to your project, gnd to ground, and read the datasheet for current/ power/ input voltage limitations. Power dissipation = current * voltage drop.
That's about it, unless you really want to know the inner workings of the device.

wvmarle:
Here you go:
Vin to power supply, Vout to your project, gnd to ground, and read the datasheet for current/ power/ input voltage limitations. Power dissipation = current * voltage drop.
That's about it, unless you really want to know the inner workings of the device.

What do you think of the following:
Use buck to get it stable on 5 or 5.5v?
Then one-or more of those in parallel to get 3.3v:

  1. HT7333 8uA quiescent current, run parallel circuits per each item (1 for arduino, 1 for SD card reader, 1 for ESP8266 01 etc2.) - I just worry about ESP32 high current.
  2. MCP1700-3320E
  3. LM1117 which lose a lot to heat - which I worry because I'd like to use a water proof enclosure which will limit the cooling options.

I'm not sure which one will work best for:

  1. Arduino (+ESP8266 01 for Wi-Fi ~250mA) or ESP8266 12E (~300mA) or ESP32 (~600mA)
  2. SD Card reader (~250mA)
  3. Other sensors (10mA - 300mA) will run serial (one at a time)
    So total peak can be ~1150mA.
  • I probably will remove the SD when using ESP module with more then 4MB so it can go down to 850mA.

Please advise,
Thanks!

Peak is what your power supply must be able to deliver - average supply gives you the amount of heat you have to dissipate.

ESP-01 & 12E use much less than this when not transmitting on WiFi. I suppose the ESP32 is the same, don't have the numbers of that one. Same for your sensors, if you take one reading every 10 minutes and it takes a few seconds, you produce very little heat.

wvmarle:
Peak is what your power supply must be able to deliver - average supply gives you the amount of heat you have to dissipate.

ESP-01 & 12E use much less than this when not transmitting on WiFi. I suppose the ESP32 is the same, don't have the numbers of that one. Same for your sensors, if you take one reading every 10 minutes and it takes a few seconds, you produce very little heat.

So what is your opinion, Which option seems better to you (or you can suggest other approach/regulator)?

Although the esp's current can peak over 200mA, these peaks are very short and can only be seen with a scope. The average current is around 80mA when transmitting.

There is a low power mode that consumes around 20mA, with peaks of 80+mA every few seconds, while still connected to WiFi and able to respond to connection requests.

There is a "modem sleep" mode which uses a steady 20mA but without WiFi connection. The sketch is still running and can monitor sensors etc and reconnect to WiFi whenever you tell it to.

There is also deep sleep mode which uses around 180uA. But in deep sleep the esp looses is WiFi connection and cannot respond to inputs or perform any tasks. But it can wake itself up after a timed period, reconnect to WiFi etc. This is how most of my esp based projects work.

You can't really use deep sleep with esp-01 because it requires use of a particular pin which isn't broken out on esp-01. I have seen hacks that enable it to be used, but my soldering skill & equipment is not up to that.