Show Posts
Pages: 1 ... 1006 1007 [1008] 1009 1010 ... 1167
15106  Forum 2005-2010 (read only) / Interfacing / Re: Setting default position of servos on bootup. on: April 20, 2010, 07:13:02 pm
Couldn't you just put servo write commands in the set-up part of your sketch, placing the servos in your desired starting position?

15107  Forum 2005-2010 (read only) / Interfacing / Re: Why won't my piezo shut up? on: April 19, 2010, 07:18:03 pm
Why don't you first try using your existing pot as a voltage divider and see if it controls the piezo better. Wire the fixed terminals of the pot to the Arduino output pin and ground, and the wiper terminal to the piezo and ground the other side of the piezo.

15108  Forum 2005-2010 (read only) / Interfacing / Re: Trouble with MOSFET on: April 18, 2010, 03:58:17 pm
Its been hard for me to find a "logic-level mosfet" as this search term doesn't seem to come up with much, is this a logic level mosfet?:

What terms do you suggest I search for when looking for a logic level mosfet?

It appears that the MOSFET I linked to above will work for my 12V / 2.5A motor, but what if I want to drive a 120V motor that takes A/C power?  Is there a limit to how much current a logic level mosfet will tend to drive?  Can I use pulse width modulation (PWM) on the AC motor?  If not, how do you control power to an AC motor?

Many MOSFET manufactures will have the letter L in their part number to show that it's a logic level mosfet. The best method is to learn to read the datasheet for the device. That advice applies to all semiconductors, it's how you learn to select and utilize transistors and diodes.

As far as how much current can a mosfet handle, again that is specific to each and every mosfet part number, they come in all current values from too small to way to large.

 Mosfets can only be used with DC loads (motors). AC motors are a whole different animal and have to be controlled with SCR or Triac devices, sometimes intergated inside what's called a solid-state AC relay. Controlling speed for a AC motor is even more complex and expensive to implement.

15109  Forum 2005-2010 (read only) / Interfacing / Re: Trouble with MOSFET on: April 18, 2010, 11:44:01 am
Maybe someone can answer this, but I'm not exactly clear on why MOSFETs tend to have very high amperage ratings.  When I first heard of MOSFETs and saw some pictures, I said there is no way they can carry the load that they are rated at, it takes thick wire to carry significant amounts of power, not these tiny little pins... turns out I was right.

So my next question is what is the proper method for giving a motor more and less power?  Do you do what I did and turn the power on and off really fast?  If so, what are proper components to use?  If not, what do you do, and again, what are the proper components to use?

Max current rating for a mosfet depends totally on the specific mosfet you are dealing with. The pins will handle the rating for the device, and of course you do require circuit traces and wiring to be rated for the current you wish to draw.

 Most of your problem has to do with not using the best mosfet for the job. A logic level mosfet will turn on the mosfet fully at it's rated current with the 4.5-5volt level that an Arduino can supply. You are NOT using logic level mosfets. You are using mosfets that are not fully turning on and by connecting them in parallel you are increasing current by sharing between them, not a good practical solution.

 There are a lot of specifications for any specific power mosfet and it determines how much current and if you will need a heat sink or not. By using a very overrated high current mosfet but drawing well less then it's max rated current you can get by with no heatsink. It's all in understanding the mosfet's datasheet.

As far as how to control a motor with an Arduino, it depends on what you want the motor to do. If just on and off in one direction then controlling it with a simple digitalWrite() command will work. If you wish to control it's speed then using analogWrite() using a PWM output pin will allow from 0-100% speed control. If you want the motor to be able to turn in both directions, then a simple mosfet will not be sufficient, but rather a full H-drive motor controller circuit is required.

15110  Forum 2005-2010 (read only) / Interfacing / Re: Trouble with MOSFET on: April 17, 2010, 01:59:59 am
Two problems:

1. You need a logic level MOSFET to fully turn on with the +5vdc of a Arduino output pin.

2. When you get the correct MOSFET you then have to have a ground wire from the external power source ground to the Arduino ground pin.

15111  Forum 2005-2010 (read only) / Interfacing / Re: Arduino Mega - output/input voltages? on: April 18, 2010, 03:46:53 pm
So they can essentially be used as digital pins and function in exactly the same way?

Yes, however a Mega has so many pure digital I/O pins, why would you have to utilize a analog input as a digital pin?

My only problem now is outputting to the alarm.  The alarms inputs reads resistance to see whether it is open/closed.  For example, a PIR or reed switch simply opens/closes a circuit and in series with a resistor allows the alarm to read an input.  I'm thinking a relay may be required (as mentioned in the second post).  What do people think?

A low coil current +5vdc reed relay would be the simplest method:

That one only requires 10ma of coil drive current, so a Arduino digital output pin and drive the coil directly. One should still wire a reverse connected diode across the relay coil terminals for spike suppression. The contacts of the relay would then wire to your alarm input.

15112  Forum 2005-2010 (read only) / Interfacing / Re: Arduino Mega - output/input voltages? on: April 18, 2010, 11:27:56 am
Do the analogue input pins simply require a dry contact?  As mentioned in my first post, my alarm will output 5V (or 12V) to a relay card that will open/close a dry contact to the Arduino.   Therefore i want the inputs (both analogue and digital) on the Arduino to register a dry contact.

All Arduino I/O pins usually require a source voltage to sense. Your application would normally utilize digital pins rather then analog pins, however the analog pins can be programmed to be digital input pins, but that's another story.

 Anyway to be able to detect 'dry contact' inputs to a digital input pin requires a 'sense voltage' on the Arduino side. This can be either done with a external pull-up or pull-down resistor connected to +5vdc or ground respectively. However even simpler if you enable the digital input pins internal programmable pull-up then you need no external resistor.

  One side of the alarm contacts will wire to the digital input pin and the other contact wire to Arduino ground. When the contacts close the digital input pin will read as a LOW, and HIGH when the contacts are open.

That make sense?

15113  Forum 2005-2010 (read only) / Interfacing / Re: How to manage 120v AC motor on: April 16, 2010, 09:52:03 pm
Well I think you will need to tells more about what you mean to "manage" the motor. Do you need to just be able to turn it on and off via the Arduino? If so a solid-state relay should work. How do you plan to power the motor? With household 120vac?


15114  Forum 2005-2010 (read only) / Interfacing / Re: Small motor control without external power on: April 17, 2010, 09:14:35 pm
What are the chances that it will be under 30?

Nil most likely.

Yes on using a transistor. However you still need to know the worst case current so you can select the proper transistor.

15115  Forum 2005-2010 (read only) / Interfacing / Re: Small motor control without external power on: April 17, 2010, 08:24:39 pm
Sure just measure current draw of the motor with a multimeter when wired directly to the voltage you will be using. However the motor should be suppling the mechanical torque required for actual application, not just freerunning.

15116  Forum 2005-2010 (read only) / Interfacing / Re: Small motor control without external power on: April 17, 2010, 08:08:51 pm
Summary: All motors SHOULD work at 5V. Can I just connect them to the 5V pin on the arduino and the appropriate digital inputs according to the specific motor?

All motors is too wide a statement to make. Any motors driven directly from an Arduino output pin is only possible if the motors draw less then 40ma at 5vdc, safer if under 30ma. Otherwise a switching device is required between the Arduino output pin and the motor.
 After that the limit is how much current the Arduino board can supply, which is in the 500ma range if on USB power and maybe
700ma if using the Arduino external power connector.

 I always recommend using external independent power for servos and motors, the basic Arduino board was not designed to power higher current devices.

15117  Forum 2005-2010 (read only) / Interfacing / Re: Using arduino to control a DC motor with rocker on: April 17, 2010, 12:44:45 pm
be sure to put a diode to clamp reverse EMF spikes, or take other protective measures.

Not a viable method when using H-drive or DPDT switch to reverse motor as current can flow in either direction.


15118  Forum 2005-2010 (read only) / Interfacing / Re: Another Arduino pH question on: April 08, 2010, 09:42:51 pm
Well one big fundamental problem with the circuit you have shown is due to the C1 capacitor, it is a AC only amplifier. A Ph probe generates a DC voltage that can vary over a range of DC values, but has no frequency and must be treated as a DC voltage. A capacitor can pass AC voltage, but will block any DC component of the signal.

Your application requires a DC amplifier circuit.

15119  Forum 2005-2010 (read only) / Interfacing / Re: Another Arduino pH question on: April 07, 2010, 06:09:12 pm

All glass pH electrodes have extremely high electric resistance from 50 to 500 M[ch937]. Therefore, the glass electrode can be used only with a high input-impedance measuring device like a pH meter, or, more generically, a high input-impedance voltmeter which is called an electrometer.

Having worked with pH probes in a refinery, I can tell you that they always have to have external very very high impedance buffering and DC gain amplifiers, with manual drift adjustments. Drift is a constant battle, as well as cleaning of the probe on a regular basis and calibrating with a buffering solution. Also the pH scale is a logarithmic scale and the 10 bit A/D converter in the Arduino is probably not a good match if reasonable accuracy is needed. And last, any analog measurement that can have a valid negative value cannot be measured by an Arduino, as it is strictly a 0 to some positive voltage value (depending on reference used), no negative values allowed.

 Ok to play around with, but if it's at all a serious application I think the Arduino needs lots of external circuitry help for pH measurement.

15120  Forum 2005-2010 (read only) / Interfacing / Re: power supplies on: April 14, 2010, 03:05:50 pm
voltage input spec for the Pro-Mini is:

"3.35 -12 V (3.3V model) or 5 - 12 V (5V model)"

So a unregulated DC power module that maintains it's voltage between those limit will work fine for the Mini. However servos that their own voltage spec and you would have to check the datasheet for the specific ones you own, but generally +6vdc is the maximum recommended voltage for the servos.

So bottom line is that a pro-mini has an on-board voltage regulator so feeding it with an unregulated DC is OK, but servos may have problems using a unregulated DC supply.

Pages: 1 ... 1006 1007 [1008] 1009 1010 ... 1167