Go Down

Topic: My midlife crisis involves learning Arduino (Read 349 times) previous topic - next topic

keystone76

I definitely learn better when shown how to do something rather than reading about it. I have the reading comprehension of a 3 year old.

I did get a kit with my Arduino with all the fixins. I have aready done the Serial Read example. This looks very similar to what I am trying to achieve with a thermocouple. I am going through the examples any time I have a spare minute.

Just a little background on what I am trying to do.

1. Read temperature of fluid flowing in a pipe.
2. Display current fluid temperature on a screen/LED/LCD/whatever such that it can be viewed from 20 feet away.
3. Not neccessary, but a flow meter and display would be nice.

I have already gotten tremendous feedback on this project and I am still very open minded about how to approach this. Thanks in advance for everyone's help

keystone76

Question -

Is INPUT and INPUT-PULLUP akin to a normally open and normally closed state?

In looking at the example it states:

 // Keep in mind the pullup means the pushbutton's
  // logic is inverted. It goes HIGH when it's open,
  // and LOW when it's pressed. Turn on pin 13 when the
  // button's pressed, and off when it's not:

To me that sounds like you are using a set of nomally open contacts but the code sees it as normally closed (or HIGH).

I'm sure I am over simplifying it. But it's as if the input (momentary button) is pulling in a relay in which the signal is across the normally closed contacts.


mrburnette

#17
Aug 29, 2016, 09:18 pm Last Edit: Aug 29, 2016, 09:21 pm by mrburnette
Quote
1. Read temperature of fluid flowing in a pipe.
2. Display current fluid temperature on a screen/LED/LCD/whatever such that it can be viewed from 20 feet away.
3. Not neccessary, but a flow meter and display would be nice.
I think we need to either add the flow-meter in the design or rule it out.  My reasoning, in just going up to ebay and looking, many flow meters already have temperature capability.  However, this stuff is not cheap.

Maybe I missed it, but exactly what are we going to measure the temperature (and/or flow): Air, fluid, hot air?  Anything caustic?

For example, at just under $150, this Proteus meter is very capable:
http://www.ebay.com/itm/PROTEUS-INDUSTRIES-04012BN16-TPD-Flow-Temperature-Pressure-METER-with-display-/162146438218

  • Flow ranges from 4.5 to 61 LPM / 1.2 to 16 GPM
  • Liquid temperatures from -40 to 125°C / -40 to 257°F
  • Pressure to 1723 kPa / 250 psi
  • Relay trip points for all three parameters!
  • Digital display


Now, the BIG job would be hacking into the existing display and extracting the signals for an Arduino to drive a BIG display.

So, flow or no-flow.

Now, about that big display.  See if you can locate a similar display used with an Arduino.  Once you know the display model and that it has previously worked with an Arduino, it is just a matter of tracking down the LED display library, etc.   Ex: https://learn.sparkfun.com/tutorials/large-digit-driver-hookup-guide

From what I'm seeing of the requirements, much of the effort is non-Arduino.


Ray

Coding Badly

#18
Aug 29, 2016, 09:19 pm Last Edit: Aug 29, 2016, 09:20 pm by Coding Badly
Is INPUT and INPUT-PULLUP akin to a normally open and normally closed state?
No.

INPUT is "floating"...
https://www.google.com/#q=floating+digital+input
https://www.google.com/#q=floating+digital+input+site:forum.arduino.cc

INPUT_PULLUP is the same as INPUT only there is an internal high value resistor (~50 kΩ) between the pin and VCC.  You can achieve the exact same result with an external resistor.  The resistor prevents the digital input from floating.


keystone76

No.


INPUT_PULLUP is the same as INPUT only there is an internal high value resistor (~50 kΩ) between the pin and VCC.  You can achieve the exact same result with an external resistor.  The resistor prevents the digital input from floating.


I'm still a little fuzzy. In the tutorial below for state change direction they use an external resistor. On the schematic the show the resistor in parallel with the  switch leg of the circuit. Could this have been simplified with an INPUT-PULLUP? If so, would you just take 5 volts to one side of the momentary contact and then wire the other side of the contact to the input pin?

https://www.arduino.cc/en/Tutorial/StateChangeDetection?from=Tutorial.ButtonStateChange


I do understand that the goal is get two distinct values to determine the state as HIGH or LOW. But how do you know when to use an INPUT-PULLUP? Is it for situations when there may be no signal being transmitted to the input pin?

keystone76

There will be flow in the system.

The fluids will be water.

I definitely want to keep costs down. Do you think there may be a simpler way than off the shelf flowmeter? How about reading pressure on both sides of a know orifice and calculating flow? Think that would be any cheaper?

I'm still looking for options on displaying the temperature. what about using a TFT or displaying to a tablet?

CrossRoads

"If so, would you just take 5 volts to one side of the momentary contact and then wire the other side of the contact to the input pin?"
No, wire the momentary contact/button/switch to connect the input pin to Gnd when pressed.
Then the INPUT_PULLUP holds the pin HIGH when the pin is not connected. Have your logic look for a LOW to take action when pressed:
if (digitalRead(pinX) == LOW){
// is button pressed?
// Yes, do something, such as:
digitalWrite (LEDpin, HIGH); // with LEDpin = 13 for example, the onboard LED
}
else { //
// do something else if not pressed
digitalWrite (LEDpin, LOW);
}
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

keystone76

There will be flow in the system.

The fluids will be water.

I definitely want to keep costs down. Do you think there may be a simpler way than off the shelf flowmeter? How about reading pressure on both sides of a know orifice and calculating flow? Think that would be any cheaper?

I'm still looking for options on displaying the temperature. what about using a TFT or displaying to a tablet? I can get a 7 inch tablet (android) for under $100.

mrburnette

There will be flow in the system.

The fluids will be water.

I definitely want to keep costs down. Do you think there may be a simpler way than off the shelf flowmeter? How about reading pressure on both sides of a know orifice and calculating flow? Think that would be any cheaper?

I'm still looking for options on displaying the temperature. what about using a TFT or displaying to a tablet?
Yea, a tablet display is possible using nothing but an ESP8266 similar to my project here.

Disclaimer: It has been 44 years since I took fluid dynamics...

Water flow can be determined in numerous ways and one way is to increase (or decrease) the flow pressure by using a diameter change and then measuring the differential pressure.

This, I fear, is a homework assignment:  various inexpensive (under $20) pressure sensors are available as replacements for automobile: oil pressure and water pressure.  If the flow rate is fast enough and the fluid restrictions are made such that the critical workings of the monitored mechanism are not impacted; you may get away with a generic sensor but you are going to have to empirically test this scenario as the variables are many.

You may have a play around here.


Ray


Robin2

If this is about a Project rather than a mid-life-crisis perhaps it needs to move to the Project Guidance section and be re-titled "How to read the temperature of a flowing fluid" ?

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

keystone76

If this is about a Project rather than a mid-life-crisis perhaps it needs to move to the Project Guidance section and be re-titled "How to read the temperature of a flowing fluid" ?

...R
I am fine with moving and renaming the thread.

I am so new to this, I am all over the place with my questions.

I think I know how to approach learning at this point and am probably more interested in application specific questions. Where should I direct general questions? Should I go to Project Guidance?

Henry_Best

Get an Arduino Uno
Download and install the Aduino IDE on your PC
Connect your PC to your Arduino with the USB cable
Upload the BLINK example program
Enjoy that level of success

Make a copy of the BLINK example program
Edit the copy to change the blink rate
Upload the revised program
Enjoy that

Then explore the other example programs.

...R
Planning and Implementing a Program
You're telling him to learn the thing that we tell others to avoid like the plague!
I'd prefer he started with the 'blink without delay' sketch.

mrburnette

You're telling him to learn the thing that we tell others to avoid like the plague!
I'd prefer he started with the 'blink without delay' sketch.
@Henry,  I think you are over reacting... the Op is a well rounded mechanical engineer with a specific idea.  Yes, he wants to learn but he also wants to work toward a goal.  There have been numerous links thrown at the Op and he is reading but there is just so much that can be done by read & exercise & read & exercise ....

The "fine points" about Arduino (or any uC trainer) are learned by actually working on one's own program.  The brain understands the difference between an exercise and the actual creative reality of making something happen in code.


Ray

Robin2

You're telling him to learn the thing that we tell others to avoid like the plague!
I'd prefer he started with the 'blink without delay' sketch.
I think an early success is more useful than an early theory. :)

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

keystone76

Ray,

I am starting to dig into your project cited above. I am going to take it one question at a time then move through your project as I understand everything I read.

To start with, I noticed you used a thermistor. Can I install a thermistor directly into the fluid or do they require a thermowell.

Geoff

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy