Show Posts
Pages: 1 ... 719 720 [721] 722 723 ... 1169
10801  Using Arduino / General Electronics / Re: Does an OUTPUT require a Pull Down resistor ? on: April 16, 2011, 06:07:59 pm
Thank you floresta. I'm sorry for my attitude. After some searching, I realized tri-stated means the same as High-Z but still it's the property of the gate. The pull-up resistor seems to me to be "not a part of the tri-state gate". P77 is the diagram of a pin. I'll study it more.

"Tri-state" defines a possible enabled state of a digital output pin, not an input pin. Some output types are open collector, open drain, TTL output and TTL Tri-state. Each is electrically different. The output pins on an arduino are not strictly defined as Tri-state output pins as there is no way to have the pin enabled as an output pin and still be in a tri-state mode. Once you use the mode statement to set a pin to output, it will immediately assume either a active high or active low state. Only by redefining the pin as an input pin with the mode statement will the pin assume a Hi-Z mode, assuming the internal pull-up is not enabled. An Arduino I/O pin can be made to mimic a tri-state output but only by changing it's mode from output to input and then back to output depending on what state you need it to be placed in. This is seem in the popular Charlieplexing scanning technique.

http://en.wikipedia.org/wiki/Three-state_logic

Lefty

10802  Using Arduino / Interfacing w/ Software on the Computer / Re: Use serial monitor while COM port is in use? on: April 16, 2011, 04:27:26 pm
For debugging purposes, how can I use the serial monitor for debugging while the COM port is in use by Simulink? I get an "in use" error from either Simulink or Arduino, depending on which application starts first.

This is a restriction from the PC operating system, only allowing one application at a time to connect to a specific comm port.

Also, How can I use serial.read () to interpret a 16 bit signed integer being sent by the PC?

The Arduino serial.read() function can only deal (read) with one byte per read statement. If sending multbyte variables from a PC then your sketch code must read them as a series of individual bytes and then reassemble them into a int or long or float or array variable, as the case my be.

Lefty
10803  Using Arduino / Sensors / Re: Calibrate Temp Sensor on: April 16, 2011, 02:10:36 pm
I am building a controller for a salt water reef aquarium that will turn on and off heaters, lights, fans, etc. based on the temperature of the water.  I'm using DS18B20 sensors and I have three of them.   In bench testing all three of them vary by up to 1 degree.  In addition they all show higher than my standard thermometer on the wall although I can't really vouch for it.

My question is: How do people "calibrate" the sensors?  I can vary the output in code to agree with the wall thermometer.  In practical use the temp should only vary by 3 or 4 degrees.  Is there a practical "known accurate" thermometer to be used for calibration?

One method is to use 'known' temperature sources to validate/calibrate temp sensors. Boiling water (100C or 212F) and crushed ice baths (0c and 32f) are pretty easy standards to calibrate with, if your sensor is rated to the two temp values.

 Other then that it's a "Man with one watch always knows the time, man with two watches never quite sure" situation.  smiley-grin

Lefty

10804  Community / Exhibition / Gallery / Re: RC helicopter UAS on: April 16, 2011, 01:43:38 pm
LOL, watch those fingers !!!!

Lefty
10805  Development / Other Software Development / Re: Arduino PID Library: Out of Beta on: April 16, 2011, 01:31:08 pm
It's almost as bad as things like 'proper time'... but I can live with DIRECT - makes sure people read your documentation smiley

I'll let you know if I find any actual issues with it rather than me nitpicking smiley-wink

Having worked in the process control industry I can state that the concept of direct/reverse acting controller can be hard for newcomers to grasp at first. An example might be a simple level controller for a vessel where there is a pump forcing liquid into a vessel and a PID controller reading the level and manipulating a control valve to keep the vessel level at a fixed level. Now depending on if the valve is on the inlet side to the vessel or on the outlet of the vessel will dictate with control action one requires, direct or reverse.

 Also control valves come in direct and reverse acting versions and that can also require a flipping of the controller action. In the 'old days' it could be quite confusing to see one valve that would move to full open with 100% output and another valve that would move to fully closed with 100% controller output. Most control valves in industrial service have a 'fail safe' requirement defined by the process engineers for each specific control valve in the plant that would determine which way a pnumatic valve would move with a loss of all control power via internal spring force. Modern computer process control systems have kind of eleminated the confusion for the control operators such that it's always clear on the computer screen what the position of a control valve is regardless of it's control action. But of course the complexity is still where, just transfeered to the control system engineers to configure each controller properly.

Lefty
10806  Using Arduino / General Electronics / Re: simple/reliable 48 channel relay? on: April 16, 2011, 01:10:21 pm
Depending on the voltage and current values of the wiring being switched it might be difficult to define a pure electronics method that might be quite complex.

At the refinery I use to work at we used a lot of multipole T-bar relays (we used the 48 SPDT versions) for complex switching requirements. These relays are pretty expensive as I recall (> $100 ?) but perhaps avalible on e-bay as new old stock at bargain prices maybe.

http://www.tbarrelay.com/env-sealed-relay.html

Lefty
10807  Using Arduino / General Electronics / Re: Does an OUTPUT require a Pull Down resistor ? on: April 16, 2011, 01:03:20 pm
Quote
And now for some trivia.  If I remember correctly the term 'tri-state' is specific to one manufacturer and the correct generic term is 'three-state' (I may have this backwards).  This is not unlike the current situation with 'I2C' and 'TWI'.

Like Scotch tape and adhesive tape.  smiley-grin

Lefty
10808  Using Arduino / General Electronics / Re: i have good sky relay! RW-SS-112D but don't know how to connect it!! on: April 16, 2011, 01:06:17 am
Not sure I understand all your asking for, but here is a datasheet for the relay number you gave. It shows the wiring pinout at the bottom of the document:

http://www.rapidonline.com/netalogue/specs/60-4660e.pdf

Lefty
10809  Using Arduino / General Electronics / Re: Does an OUTPUT require a Pull Down resistor ? on: April 16, 2011, 12:04:55 am
One frequent useful application for a external pull-down resistor is when controlling a logic level N-channel MOSFET that is switching an independent load and voltage source. The pull-down resistor will ensure that the mosfet is forced off if the arduino was powered off but the external switched load voltage source is still hot.

And yes, the powerup or reset default for I/O pins is input mode, internal pull-ups disabled.

Lefty

10810  Using Arduino / Installation & Troubleshooting / Re: UNO vs Duemilanove on: April 13, 2011, 08:21:40 pm
One the other hand the Uno board has had firmware problems with both the 8u2 serial converter chip and the bootloader. There is still an issure of if when you buy a Uno today if it comes with the latest bug fixes for both those firmwares. I think even the Uno bootloader hex file in the IDE distrubution for version 22 is not current with the latest fix(S).

Lefty
10811  Using Arduino / General Electronics / Re: MOSFET Power Control Kit on: April 13, 2011, 03:39:34 pm
Quote
My question is, do I need a resistor in circuit with the power source to limit the amount of current?  Using Ohm's law, it seems like if I really want 400mA current to flow through and I'm supplying 12V that I'll need a 30 Ohm resistor.  Would this go inline on the high side of the external power supply?  Also, is there any reason to be concerned that the Digital Pin wont be able to supply enough current to trigger the MOSFET?  Sorry, if a lot of these are beginner level questions, but I would really appreciate any feedback before I test this out.

Well you gave us a spec of 400ma for the wire, but not what resistance the wire has at that current. The memory wire will 'drop' a specific amount of voltage and 400ma, and once you know what that voltage is you then can size the series resistor between the +12vdc and the wire. Resistor size will be calculated as (12vdc - wire drop voltage) /.400A

The mosfet will then just switch the other end of the wire to ground and current can then flow. Also by applying a pwm output to the mosfet gate you can control the amount of current going through the wire from 0ma up to the max of 400ma.

The Mosfet gate draw zero continous current, it only draws current charging and discharging the gate capacitance during transition from on to off and off to on. Generally a 300-500 ohm resistor between the output pin and the gate is all that is required to protect the output pin. Also be sure to wire between a arduino ground pin and the negitive terminal of your +12vdc supply.

Lefty
Lefty

10812  Using Arduino / Interfacing w/ Software on the Computer / Re: 5v and Vin Question on: April 13, 2011, 03:20:29 pm
Hi Lefty,

Thanks for the reply, I'm sorry but my explanations are terrible (I'm working on it smiley-razz). I was trying to say that, as a completely standalone device (no USB power) could my external supply power both pins, ie give me a 5v pin to use and a 7.2volt pin concurrently?


Nick

And I'll repeat:

Quote
Yes you can use both the Vin voltage and the +5vdc voltage to power external devices from the Arduino board. However keep in mind that both those voltage sources have current limits that you can't exceed.

When using the external power connector, the voltage it provides is also avalible at the Vin pin (which will be the same voltage as the external applied voltage) for use to power external devices. The +5vdc pin is also avalible to power external devices. Again both voltage sources do have maximum current capacity that you can't exceed.
Lefty
10813  Using Arduino / Interfacing w/ Software on the Computer / Re: 5v and Vin Question on: April 13, 2011, 01:58:36 pm
Hi Guys,

I just want to be 100% positive of something before I potentially kill some expensive components. If I have a 7.2 Volt external power supply connected to the input jack on the arduino board. Am I ok to use BOTH the 5v pin and the Vin pin without damaging the board/components? The reason being is I have a GPS unit that will only operate between 5-5.5 volts and another component that works best around the 7v mark. I'm 90% sure the answer is yes but I would like to get confirmation for piece of mind >_< (sorry for the silly question).


Nick

Yes you can use both the Vin voltage and the +5vdc voltage to power external devices from the Arduino board. However keep in mind that both those voltage sources have current limits that you can't exceed. Also if you ever power your board with just the USB connection, then there will be no Vin voltage to provide power to external devices. However it is fine to have a board being powered by both the USB port and the external power connector of the arduino board as the auto-voltage source will select the external power to generate the on board +5vdc.

Lefty
10814  Using Arduino / Programming Questions / Re: Looking for feedback on and someplace to put a Tutorial on: April 13, 2011, 12:01:29 pm
One thing I've noticed over the last few months is a considerable number of threads on problems reading and processing serial data on the Arduino.  So I've been working on a fairly extensive tutorial on the subject.  It's nearly at a final draft state, so now I'm looking for two things:

1.  I by no means consider myself an expert on the subject, so I would welcome (and even prefer) to have some other experienced members of the forums review my final draft and provide feedback/comments.  This is also the first tutorial I've ever written, so I have no idea how good it is as a tutorial.

I (as I'm sure others) would be happy to review your serial tutorial. It can be a complex task as there are so many different kinds of problems people have with serial setups, both with electrical/hardware issues and software issues.

2.  I am looking for recommendations on where to put the Tutorial.  I don't have a website or blog or anything like that to post it to.  I could always just submit it as a topic in the forums, but I would prefer putting it someplace with a bit more... permanency.

Typically the Arduino playground section is a good place to post such information, however I can't actually tell you how to do that.  http://arduino.cc/playground/Main/GeneralCodeLibrary

Lefty




10815  Using Arduino / Sensors / Re: sensor with pulse with modulation and pin on: April 13, 2011, 09:48:23 am
May be I am doing a stupid question but: if sensor like water flow ones are like a switch that every turn make the output going high for a short time, why have they 3 pins?
I think it would be sufficent to have 2. Using a pull up resistor, one must be connected to digital_in and to the resistor going at 5v and the second connected to GND.
What's the reason of using one more pin? thanks

It depends on the sensor. If it's a 'passive' sensor using say a magnetic reed switch that senses a magnet spinning on the flow meter's impeller then only two wires would be required. However if the sensor uses a 'active' sensor, say a hall effect magnetic switch then the hall effect devices requires a voltage source to operate, so needs three wires.
Pages: 1 ... 719 720 [721] 722 723 ... 1169