Ernie's Content - Netduino Forums
   
Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.

Ernie's Content

There have been 16 items by Ernie (Search limited from 29-March 23)


By content type

See this member's

Sort by                Order  

#47494 Sensor Lead Length

Posted by Ernie on 22 March 2013 - 10:46 PM in Netduino Plus 2 (and Netduino Plus 1)

Using 3 feet of 3 wires of Belden 1700 Cat 5e

Changed pullup setting in code back to original: Port.ResistorMode.Disabled

 

It is working!  Somehow I had by thread start commented out.  Sorry!!!  Don't know how that happened. :blink:

 

 

Here is the flow sensor. 

http://www.seeedstud...nsor-p-635.html

https://www.adafruit.com/products/828

 

Can't seem to find the exact datasheet for the model YF-S201 flow sensor.




#47462 Sensor Lead Length

Posted by Ernie on 22 March 2013 - 01:27 AM in Netduino Plus 2 (and Netduino Plus 1)

Electrical:

  • Working Voltage: 5 to 18VDC
  • Max current draw: 15mA @ 5V
  • Working Flow Rate: 1 to 30 Liters/Minute
  • Working Temperature range: -25 to 80°C
  • Working Humidity Range: 35%-80% RH
  • Maximum water pressure: 2.0 MPa
  • Output duty cycle: 50% +-10%
  • Output rise time: 0.04us
  • Output fall time: 0.18us
  • Flow rate pulse characteristics: Frequency (Hz) = 7.5 * Flow rate (L/min)
  • Pulses per Liter: 450

Here is my code:

 

// count how many pulses!

public static UInt16 pulses;

 

private static void input_OnInterrupt(uint data1, uint data2, DateTime time)

{
//pulse counter//pulse counter

pulses++;

}

 

private static void MonitorFlow()

{

InterruptPort flowInput = new InterruptPort(Pins.GPIO_PIN_D5, true, Port.ResistorMode.PullUp,

Port.InterruptMode.InterruptEdgeHigh);

 

flowInput.OnInterrupt += new NativeEventHandler(input_OnInterrupt);

 

while (true)

{

pulses = 0;

flowInput.EnableInterrupt();

Thread.Sleep(1000);

flowInput.DisableInterrupt();

flowrate = pulses;

flowrate /= 7.5;

flowrate /= 60;

 

if (flowrate > 0)

{

LCD.Print(Lcd.Position.ROW_4, Lcd.Position.COLUMN_1, Lcd.FillRow(":Flow Rate:" + flowrate.ToString("f2") + "LPM"));

Debug.Print("Pulses: " + pulses + ", Flow Rate: " + flowrate.ToString("f2") + "LPM");

}

}

}

 

So what do you think is happening?  Too much resistence on my sensor extension?  Measures .07 ohms on one cable and .03 ohms on a large wire cable.




#47428 Sensor Lead Length

Posted by Ernie on 20 March 2013 - 10:42 PM in Netduino Plus 2 (and Netduino Plus 1)

I have a water flow (pulse) sensor I have been working with directly connected to my N+2, which was working fine.  When I put my project box together and put a 3 foot sensor extension wire in place the sensor no longer works.  What do I need to do when I extend the wire distance between the Netduino and the sensor to get it to work again at a distance?




#47254 N+(2) Aquarium Controller

Posted by Ernie on 16 March 2013 - 01:00 AM in Project Showcase

Disregard my last post. I figured it out!



#47213 N+(2) Aquarium Controller

Posted by Ernie on 15 March 2013 - 12:17 AM in Project Showcase

Trying to use H07R0D's CalculatePH with an Atlas Scientific pH Stamp. I can get the first reading, then every attempt to excute the function thereafter I get: A first chance exception of type 'System.Exception' occurred in Microsoft.SPOT.Hardware.SerialPort.dll What is wrong with the Netduino Plus 2, the code, or the Atlas Scientific stamp, which would cause the function to work the first pass then not work again? private static float CalculatePH() { float ph = 0.0F; SerialPort sp = new SerialPort(Serial.COM3, 38400, Parity.None, 8, StopBits.One); sp.ReadTimeout = 1000; try { string command = ""; string response = ""; char inChar; // Send the temperature reading if available if (fCTemp > 0) command = fCTemp.ToString("F") + "rRr"; else command = "Rr"; Debug.Print(command); byte[] message = Encoding.UTF8.GetBytes(command); sp.Open(); sp.Write(message, 0, message.Length); sp.Flush(); Debug.Print("sending message"); // Now collect response while ((inChar = (char)sp.ReadByte()) != 'r') { response += inChar; } // Stamp can return text if reading was not successful, so test before returning double phReading; if (Double.TryParse(response, out phReading)) ph = (float)phReading; } catch (Exception e) { Debug.Print(e.StackTrace); } finally { sp.Close(); sp.Dispose(); } return ph; }



#47084 LCD AdaFruit Backpack

Posted by Ernie on 12 March 2013 - 02:35 PM in Netduino Plus 2 (and Netduino Plus 1)

Yes, I believe the power on was like 5 or 10 ms and the document I referenced says 100 ms minimum.



#47048 LCD AdaFruit Backpack

Posted by Ernie on 12 March 2013 - 02:58 AM in Netduino Plus 2 (and Netduino Plus 1)

In conclusion, I increased some of the timeouts at initialization per this document. I am finally no longer seeing any corruption http://web.alfredsta...tion_index.html




#46996 LCD AdaFruit Backpack

Posted by Ernie on 11 March 2013 - 01:48 AM in Netduino Plus 2 (and Netduino Plus 1)

Command to LCD preceeding text with a float and no corruption.  How does having a number first make a difference???

 

LCD.Print(

 

Lcd.Position.ROW_4, Lcd.Position.COLUMN_1, Lcd.FillRow(4F +":Flow Rate:" + flowrate.ToString("f2") + "LPM"));




#46995 LCD AdaFruit Backpack

Posted by Ernie on 11 March 2013 - 12:54 AM in Netduino Plus 2 (and Netduino Plus 1)

Hmm...over an hour an no corruption on the display just updating numbers!  Dave would you like to try some text and see how things go?




#46992 LCD AdaFruit Backpack

Posted by Ernie on 10 March 2013 - 11:46 PM in Netduino Plus 2 (and Netduino Plus 1)

I noticed Dave has practically no text. Check out page 15 of this document http://www.picaxe.com/docs/axe033.pdf it implies text is the problem, which I had data descriptions preceeding all of my measurements.  My display was specifying data like this:

 

[font="arial, helvetica, sans-serif;"]Air Temp: 66.89[/font]

[font="arial, helvetica, sans-serif;"]Water Temp: 72.38[/font]

[font="arial, helvetica, sans-serif;"]PH: 7.00[/font]

[font="arial, helvetica, sans-serif;"]Flow Rate: 0.62LPM[/font]

 

[font="arial, helvetica, sans-serif;"]I took out the text and I am testing right now to see if that makes a difference.[/font]




#46989 LCD AdaFruit Backpack

Posted by Ernie on 10 March 2013 - 10:54 PM in Netduino Plus 2 (and Netduino Plus 1)

Are you using SC AND SD on NP2?  Is there any other way to connect?




#46984 LCD AdaFruit Backpack

Posted by Ernie on 10 March 2013 - 06:25 PM in Netduino Plus 2 (and Netduino Plus 1)

NP2 on firmware 4.2.2 SDK 4.2.2. Tim are you implying after 10 minutes you get corruption? No I do not have a logic analyzer.



#46919 LCD AdaFruit Backpack

Posted by Ernie on 08 March 2013 - 11:09 PM in Netduino Plus 2 (and Netduino Plus 1)

Out of ideas! Wiring is correct.  Code is code posted by Tim C.  How about posting your code Dave???




#46865 LCD AdaFruit Backpack

Posted by Ernie on 08 March 2013 - 03:15 AM in Netduino Plus 2 (and Netduino Plus 1)

So it was defaulting to 100kHz.  I tried 400kHz worked longer!  Tried 350kHz and 200kHz.  In the end the result is the same. After varying minutes, based on different clock rates, the garbled display return.  Based on the products I references does ANYBODY know how to make these displays work reliably???




#46860 LCD AdaFruit Backpack

Posted by Ernie on 08 March 2013 - 01:20 AM in Netduino Plus 2 (and Netduino Plus 1)

[color=rgb(40,40,40);font-family:helvetica, arial, sans-serif;]"be sure you don't exceed 400kHz for the Clock_Speed in either I2C or SPI mode.  These backpacks and displays seem to work best between 400-600kHz"  What?  [/color]Don't exceed 400kHz but they work best between 400-600kHz!!  Also what resistance on the pull-ups and what voltage?




#46797 LCD AdaFruit Backpack

Posted by Ernie on 07 March 2013 - 12:31 AM in Netduino Plus 2 (and Netduino Plus 1)

Using Netduino Plus 2

 

I have the Adafruit 20x4 LCD http://www.adafruit.com/products/198 and the i2c backpack http://www.adafruit.com/products/292 using i2 code posted by Tim C http://forums.netdui...erface/?p=43936  I keep getting a garbled display after about 3-4 minutes.  Have seen posts about using a pullup though nothing definitive.  What is the fix for this? 





home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.