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.

Cinelli's Content

There have been 12 items by Cinelli (Search limited from 24-April 23)


By content type

See this member's

Sort by                Order  

#31679 Need Quality RS485 Shield or Pull up pull down from code

Posted by Cinelli on 07 July 2012 - 01:19 AM in General Discussion

Hi Paul - Thanks. I tried sticking some biasing resistors inline on TX and RX, I tried a few different values and they seemed to have the effect of diminishing the number of bytes that are received. Transmit still works. So it's always receive that does not work. Perhaps I will try more biasing resistor values until I arrive at a value which performs. To me, there must a be shield out there properly designed to perform to spec.



#31634 Need Quality RS485 Shield or Pull up pull down from code

Posted by Cinelli on 05 July 2012 - 08:12 PM in General Discussion

I have been using a common RS485 Shield:
http://www.robotshop...n-33&lang=en-US

I found that while it has the Maxim MAX485 chip it lacks the accompanying resistors to perform to RS485 spec due to the lack of "biasing resistors for failsafe operation" which zero out the RS485 bus to a constant state when the bus is idle. These resistors are either integrated in some transceiver models, or placed on the board. This has neither. The result is the data transferred is corrupted across longer lengths of wire. Using an appropriate 33 ohm terminating resistor adds some stability, but cannot make up for the lack of biasing resistors.

Maxim has a great short description which outlines the RS485 spec.
http://www.maxim-ic....ndex.mvp/id/763

Solutions:
1. Use a better shield. The only other RS485 shield I see is the DFRobot IO/Expansion V5. I have never been able to make the RS485 on that work. Perhaps the .Net MF COM1/COM2 objects are not wired to the pins the transciever is using, haven't dug into that.
http://www.dfrobot.c...&product_id=264

2. Replace the chip on the board with the Maxim MAX13487 which has some biasing resistors built in.

3. Use a code-based solution to pull the pins on the board high and low depending on send/receive status. This might not work though, as they are upstream from the RS485 Transceiver which probably is passing corrupted data toward the processor at that point.

Finding a shield with the resistors is an attractive option.

I tried all combinations of the COM object handshake property with no success.

Suggestions / ideas?

Thanks in advance



#30542 DFRobot I/O Expansion Shield V5 XBee tips?

Posted by Cinelli on 11 June 2012 - 05:48 PM in Netduino Plus 2 (and Netduino Plus 1)

This is the device Wiki:
http://forums.netdui...h__1#entry15766

The DFRobot Sample Code below references pulling the pins high and low which is lower level and I assume the .Net MF handles that with the com port.

We run the same code with this shield with no problems. Using any of Com1, Com2 or Com3 will not make the DFRobot RS485 work. http://www.cutedigi....or-arduino.html
int ledPin = 13;
int EN = 2;
int val;
void setup() 
{
pinMode(ledPin, OUTPUT);
pinMode(EN, OUTPUT);
Serial.begin(19200);
}
void loop()
{
// receive data
digitalWrite(EN, LOW);//Enable Receiving Data
val = Serial.read();
if (-1 != val) {
if ('A' == val) {
digitalWrite(ledPin, HIGH);
delay(500);
digitalWrite(ledPin, LOW);
delay(500);
}
}
}



#30530 DFRobot I/O Expansion Shield V5 XBee tips?

Posted by Cinelli on 11 June 2012 - 02:28 PM in Netduino Plus 2 (and Netduino Plus 1)

I am revisiting this RS485/XBee expansion shield. It's the same as this one: http://www.cutedigi....with-rs485.html I still can't get the right jumper settings to make RS485 work. I see per the diagram at pic above that you jump the three pins to activate RS485. It doesn't appear any other jumpers are necessary. Am I wrong? Any insights anyone? Thanks in advance.



#29969 Power Pins

Posted by Cinelli on 30 May 2012 - 02:19 AM in Netduino Plus 2 (and Netduino Plus 1)

I have a related question. I have two Netduini + units that will be deployed together side by side. Is it viable to only run 9VDC power to one, then power the second one by connecting the 5V power pin out to the other? Even if this were viable, I would wonder if this risks overheating the voltage regulator of the first unit. Or perhaps it is just best to power through the jack and voltage regulator in all cases? Thanks in advance.



#16993 SslStream.AuthenticateAsClient Issue (Microsoft.SPOT.Net.Security class)

Posted by Cinelli on 23 August 2011 - 09:47 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi Stefan - Is this still the case with 4.2, no SSL? We had a memory issue doing something else, but once I removed a bunch of references we didn't need we had plenty of memory to spare.



#16821 Netduino XBee Serial Settings: DIO7 & DIO6

Posted by Cinelli on 18 August 2011 - 05:24 PM in Netduino Plus 2 (and Netduino Plus 1)

Since nobody is jumping on this, let me simplify the question:
When using an XBee shield on Netduino, what are typical XBee settings to talk through COM1 Digital Pins 0 (RX) & 1 (TX)?

In the above post/question, you can essentially disregard what device is attached to the radio at the other end. Basically if the radios are paired and you sniff the COM at the other end the data will get there. Whether the receiving (ROUTER) radio successfully sends the data it receives from the COORDINATOR out to an attached device (Netduino, computer, RS485 device or whatever) is a separate matter.

Trouble is, I don't see that the Netduino XBee shield (COORDINATOR) is sending out at all.



#16773 Netduino XBee Serial Settings: DIO7 & DIO6

Posted by Cinelli on 16 August 2011 - 08:55 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi - Working with XBee and RS485, successful sending data between radios, so they're paired. But if I try to send data through a shield instead of Digi's RS485 Adapter it doesn't work. So, it works if I talk through Digi's XBee RS-485 adapters at both ends but not with one Adapter at the (End Device/Router) <--> Shield at the Netduino (Coordinator).

Target configuration is:
Netduino
XBee Shield
XBEE COORDINATOR RADIO(XBP24BZ7, firmware 208C)

- talks to -

XBEE ROUTER RADIO
Digi XBee 485 Adapter ZB PRO S2B
RS485 Device

Using Digi XCTU for radio config, I suspect that the Netduino's XBee (Shield Radio, Coordinator) needs DIO7 & DIO6 set to "Digital Input" to tell it to expect to talk through the Digital Pins 0 & 1, rather than "RS485 Enable HIGH" (or LOW) as works when going through the RS485 transceiver.

Any insights anyone? Thanks in advance.



#16525 No Exception on lost Ethernet connection

Posted by Cinelli on 09 August 2011 - 06:13 AM in Netduino Plus 2 (and Netduino Plus 1)

Yes we are on the Sunday night 4.2 RC. Will do on the bug. BTW is Connect used for NetMF also? It was back in 2.5, though I wonder if Open Source killed that approach.



#16522 No Exception on lost Ethernet connection

Posted by Cinelli on 09 August 2011 - 05:48 AM in Netduino Plus 2 (and Netduino Plus 1)

This code works fine while Ethernet is plugged in. It also properly throws exceptions and retries if you start with Ethernet disconnected. If you plug in after some failures it also restarts correctly. The problem comes if you boot with Ethernet connected, let it run for 1 or more loops, then disconnect (or lose) Ethernet. In this last case GetRequestStream neither returns nor throws an exception: the device locks up.

Any insights? Thanks in advance.

[size="4"]
using System;
using System.IO;
using System.Net;
using System.Text;
using System.Threading;
using Microsoft.SPOT;

namespace M2W.NetduinoReader
{
    class WebTest
    {
        public static void Main()
        {
            for(int i = 0; i < 20; i++)
            {
                Thread.Sleep(3000);

                using(HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(@"http://www.google.com"))
                {
                    request.Timeout = 15000;
                    request.ReadWriteTimeout = 5000;
                    request.Method = "POST";
                    request.ContentType = "application/x-www-form-urlencoded";
                    byte[] bytes = Encoding.UTF8.GetBytes("a=3&b=4");
                    request.ContentLength = bytes.Length;
                    Debug.Print("request.GetRequestStream");
                    try
                    {
                        using(Stream requestStream = request.GetRequestStream())
                        {
                            requestStream.Write(bytes, 0, bytes.Length);
                            requestStream.Close();
                        }
                    }
                    catch(WebException ex)
                    {
                        Debug.Print("WebException on GetRequestStream: " + ex.Message);
                        continue;
                    }
                    catch(Exception ex)
                    {
                        Debug.Print("Exception on GetRequestStream: " + ex.Message);
                        continue;
                    }

                    Debug.Print("request.GetResponse");
                    try
                    {
                        using(HttpWebResponse response = request.GetResponse() as HttpWebResponse)
                        {
                            int respSize = System.Math.Min((int)response.ContentLength, 80);
                            if(respSize != 0)
                            {
                                byte[] respData = new byte[respSize];
                                try
                                {
                                    Debug.Print("request.GetResponseStream");
                                    using(Stream responseStream = response.GetResponseStream())
                                    {
                                        responseStream.Read(respData, 0, respData.Length);
                                        responseStream.Close();
                                    }
                                    string responseString = new string(Encoding.UTF8.GetChars(respData));
                                    Debug.Print("Response was: " + responseString);
                                }
                                catch(WebException ex)
                                {
                                    Debug.Print("WebException on GetResponseStream: " + ex.Message);
                                }
                                catch(Exception ex)
                                {
                                    Debug.Print("Exception on GetResponseStream: " + ex.Message);
                                }
                            }
                            else
                            {
                                Debug.Print("Response was empty");
                            }
                            response.Close();
                        }
                    }
                    catch(WebException ex)
                    {
                        Debug.Print("WebException on GetResponse: " + ex.Message);
                    }
                    catch(Exception ex)
                    {
                        Debug.Print("Exception on GetResponse: " + ex.Message);
                    }
                }
            }
        }
    }
}
[/size]



#15793 DFRobot I/O Expansion Shield V5 XBee tips?

Posted by Cinelli on 22 July 2011 - 06:32 PM in Netduino Plus 2 (and Netduino Plus 1)

Yes. Actually, it won't work if the settings don't match. My experience with xbees is that they have no baud rate autodetect, so you have to set it manually and on all sides the same.


Thanks, what XBee shield do you like with Netduino?



#15766 DFRobot I/O Expansion Shield V5 XBee tips?

Posted by Cinelli on 21 July 2011 - 11:12 PM in Netduino Plus 2 (and Netduino Plus 1)

Having issues with the DFRobot I/O Expansion Shield V5 with RS485 & XBee. (pic attached, link below). Question 1: Does anyone have experience with this or with it and Netduino? Our results have been mixed. To interface with the XBee, we are using Serial.COM1 and it doesn't appear to be getting through. The RS485 is also not working, whereas we have other styles of RS485 shields which work fine. It's not clear what you jump on this, that's not documented though there is a Wiki on the product page with some info at the link below. http://www.dfrobot.c...&product_id=264 Question 2: Has anyone found there to be advantages in setting the XBee baud rate, stop bits and flow control to match the serial communication baud rate etc? Thanks in advance

Attached Thumbnails

  • DFR0088-240x240.jpg




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.