Go Down

Topic: Beginer : Transistor NOT gate? (Solved) (Read 1 time) previous topic - next topic

empereuri

Then you are both drawing too much current from the Arduino and overdriving the transistor.
should a transistor be able to handle one servo motor? (as i said, the on/off gate kind off give coordinate to each servo so that only one is open at time) they are small 5V servo

kenwood120s

Why do you need to switch the servos' power anyway?

Just servo.detach() and the servo library will stop commanding it. I've never measured the current draw of a servo.detach()'d servo: I suppose there may be some current drawn by the electronics, but negligible compared to the current drawn while it's moving and even when it's idle but servo.attach()'d.

(I'd measure it for you but my best dmm is out on loan and the cheap one I have at hand doesn't measure current.)

[gumby]I've got my head stuck in the cupboard[/gumby]

TomGeorge

Hi,
Quote
Basicly, i will have to control like 16 servo motor (but only one at once), and i'm planning to had input from moisture sensor (like 16 of teem) so the number of pin used is limited.
What do the servos control?
Servos might not be the appropriate control to use.
What is your project?

Tom... :)
Everything runs on smoke, let the smoke out, it stops running....

empereuri

It's the classique auto-watering for plants... but i want all my indoor plante (like 12-14) to be watered independently.

Instead of pump, i use a syphon syteme with on-off valve, the valve are actionned by servo motor (really diy, i bought cheap valve and glued teem to cheap servo motor). I did the set-up for on plant (with one diode to turn on-off the power to the servo-motor) wich is working fine...

I am working in parallele to do capacitive moister probe to automatise everything. Once it will be working for one plante, I would like to do all of teem but on the same arduino bord (Why can't I take two or three board? I don't know, I like to give me some hardtime?) So to mesure and water 12 different plant independently, i'll need a way to rationalise my arduino pin... (hence the "array" of on off switch, to be able to tell the programme to speak to a single servo or read a single probe at a time.)

I'm all open to suggestion/advice or warning about dumb thing i'm about to do!

empereuri

Why do you need to switch the servos' power anyway?

Just servo.detach() and the servo library will stop commanding it. I've never measured the current draw of a servo.detach()'d servo: I suppose there may be some current drawn by the electronics, but negligible compared to the current drawn while it's moving and even when it's idle but servo.attach()'d.

(I'd measure it for you but my best dmm is out on loan and the cheap one I have at hand doesn't measure current.)


Sorry! I missed your anser. I will use only one pin to commend ALL the servo motor, so the only way that they don't all move at the same time is to have only one servo powered at once.

But thanks for the servo.detach command! My cheap servo do move the valve, but they can't get exactly where the code tell teem, so they move to aproximate location and then they "rush", I was cuting the power with a transistor after 1 sec, but with servo detach, it's going to be way easyer!

kenwood120s

#20
Sep 29, 2017, 11:46 am Last Edit: Sep 29, 2017, 11:47 am by kenwood120s
Just so you're clear, servo.detach() doesn't cut the power, it just stops the repeat sending of the position pulse. By default, the servo library "reminds" an attach()'d servo where it's supposed to be, every 20ms.

See this line from servo.h:

Code: [Select]
#define REFRESH_INTERVAL    20000     // minumim time to refresh servos in microseconds

And once it's detach()'d, there's nothing to cause the servo to hold its position, except friction.



[gumby]I've got my head stuck in the cupboard[/gumby]

empereuri

#21
Sep 29, 2017, 12:08 pm Last Edit: Sep 29, 2017, 01:57 pm by empereuri
Hum... so i'll leave the code as is... I just completed the first part of the projet, so i can show a pic (it's going to be clearer i guess)

I still have to calibrate the capacitor to know when to water or not (DIY with aluminum can, so far can make the difference betwen air, dry soil, wet soil, and water...)

https://drive.google.com/open?id=0B1Pjf2uN2CxAam5BOHp5ZGRIVkVNQVVJMFdtbHl6ZVgxcko0

https://drive.google.com/open?id=0B1Pjf2uN2CxATFdCcnBNOU9OSGoxSlU0Nl9FTkUwR1p1M1Vz


So I plan to have 12 of those plug on the bord (i have to order the servo on ebay, so it won't be to soon...)

here is the code so far Still under calibration for the specific time/capcitance!


TomGeorge

Hi,

If you read the forum instructions again, you will find out how to attach and display you images.

Tom... :)
Everything runs on smoke, let the smoke out, it stops running....

empereuri

Hi,

If you read the forum instructions again, you will find out how to attach and display you images.

Tom... :)
I did read teem, when I try to insert the url, the immage are not showing, and when i try to attach teem, for a reason i don't know, it saw the file did not past security cheak and are rejected.....

TomGeorge

#24
Sep 29, 2017, 02:35 pm Last Edit: Sep 29, 2017, 02:40 pm by TomGeorge
Hi,
OPs Pics.




Tom... :)
Everything runs on smoke, let the smoke out, it stops running....


TomGeorge

#26
Sep 29, 2017, 02:43 pm Last Edit: Sep 29, 2017, 02:44 pm by TomGeorge
Hi,
Have you got a power supply for the servos?

The UNO cannot supply the current needed to operate them under load.

Tom.. :)
PS, Your pics were bigger than 1M each which is the upload limit.
Everything runs on smoke, let the smoke out, it stops running....

empereuri

Hi,
Have you got a power supply for the servos?

The UNO cannot supply the current needed to operate them under load.

Tom.. :)
PS, Your pics were bigger than 1M each which is the upload limit.
No external power supply yet..., just the arduino, the servo motor only work for about a sec.... and only one at a time.... the arduino starter kit have a demo with servo and power them whith just the arduino.... =7 So far it as been working... Do I risk to burst anything leaving it that way or is it just that the servo are "weak"??

Also, the arduino starter kit use a Transistor whitout a resistor (wich is what i did to) but all the projet i see ad a resitor to the signal to the transistor, i added one and it stoped working (1kohm). Should i follow the starter kit? Or i risk burning the transistor?

Thanks to all of you for your input and time... the treat as kind of deviated a lot from my original question!

P.S After I saw it wasent working with the direct link on GDrive, i dowloaded them and reduce them and then try uploading... the error was really stating failed security cheak...wich is kind of odds... does the limits on size apply tho direct link also? (it's a bit late/early here... i probably did something trivial wrong...

empereuri

#28
Sep 29, 2017, 07:26 pm Last Edit: Sep 29, 2017, 07:49 pm by empereuri
hummm =7 I have been looking a bit, seem like peak curent can be up to 700mA but average at around 200mA...

if I am right, the contrĂ´ler can push maximum 500 before risking big damage... Is it avarage or peak?

is there is a ways to mesure on my stetup wath is the current draw witout multimeter?
(the motor is in parallèle with a 100uF capacitor, does it help to smoth it out??)

Go Up