sfx's Content - Netduino Forums - Page 2
   
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.

sfx's Content

There have been 52 items by sfx (Search limited from 28-April 23)


By content type

See this member's


Sort by                Order  

#59100 NETMF SerialPort and "BreakState"

Posted by sfx on 08 July 2014 - 01:19 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi Baxter,
 
This stuff is going to haunt me, I know it... But thanks again for your help.
 
I managed to pick up a 2N3904 NPN transistor as well as a BAT 48 Shottky diode (they didn't have an 85 so it's on order).
 
I'll start with the diode attempt as per your suggestion from the spec page for the Atmega32. I have attached an image with the setup that I have created, but I'm not sure if it is accurate. I was hoping that you might be able to offer me some suggestions here.
 
At any rate, I know that this configuration will not allow me to reference serial COM1 on the Netduino if I'm also attempting to use either pin D0 or D1 to furnish the "break" command - an InvalidOperationException will be thrown due to a conflict on the pins. Consequently, I'm not sure how using just the diode solution will work with the Netduino. I think I understand how it would work on the Arduino or Atmega32 given that RX and TX can be referenced on the same pin, but such doesn't appear to be the case on the Netduino.
 
And so I'm back to where I started... Confused, bemused and abused.
 
Nathan

Attached Thumbnails

  • post-151462-0-35758800-1404.jpg



#59099 InterruptPort/Events slow the first time

Posted by sfx on 08 July 2014 - 01:14 PM in General Discussion

Hi Frode,

 

I'm running VS 2013 with NETMF 4.3 QFE1, but I didn't find the interrupt port to respond slowly during debugging. I ran your code a handful of times and each time found the actuating latency to be largely uninhibited.

 

Hope that helps.

 

Nathan




#59087 NETMF SerialPort and "BreakState"

Posted by sfx on 07 July 2014 - 10:08 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi Baxter,

 

I haven't picked an easy part to start my hardware adventures, you say? Well, you can say that again!!

 

I noticed the diagram that you attached a week or so ago but for some reason thought that it only applied to serial connections to a PC. I also noticed that some of the code I was attemping to translate from Arduino was referencing the RX/TX line together - as if it was one physical wire that could be engaged as either Receive or Transmit based upon a flag. This is obviously not the way Netduino works.

 

The Arduino code is linked to here: http://www.robot-ele...duino_srf01.ino
 

Looks like I need to get a BAT85 schottky diode. However, there are still a couple of questions that I'm not sure about:

 

a ) Does one leg of the diode need to connect to D0 and the other to D1 (i.e. RX/TX)?
b ) How does the RX line of the sensor connect to the diode if both legs are already plugged in?

 

I'm learning a lot while making all these mistakes, so I've appreciated your help immensely. If I can get this sucker working finally, I'm going to shout you a round of beer!

 

Nathan




#59071 NETMF SerialPort and "BreakState"

Posted by sfx on 07 July 2014 - 11:26 AM in Netduino Plus 2 (and Netduino Plus 1)

Ok, here goes nothing...

 

My header wires arrived today so I was able to set up my Netduino Plus 2, range-finder (SRF01), and logical AND Gate exactly as my last diagram describes (with the help of Baxter). After nearly two hours of frustration the results are in:

 

1. Range-finder flashes on power up.
2. Debugging session begins ok.
3. Break command is sent to the sensor.
4. Two commands follow (the sensor address and the status command).
5. All bytes appear to be written.
6. No bytes are available to be read back (that's right, zero bytes).

 

According to the documentation, I should be receiving bytes back as representing a return value from the previously sent command. I get nothing. It's as if the break command isn't being sent at all and so the sensor isn't even aware that anything has happened.

 

I'm lost.

 

Nathan




#59038 Is Netduino (or Gadgeteer) still viable?

Posted by sfx on 06 July 2014 - 08:13 AM in General Discussion

Hi Thomas,

 

I'm an experienced software developer on the Microsoft stack, but am only relatively new to the devices scene. Having said that, however, I have poured a great deal of my time recently (and a little money) into learning about the IoT, as well as some of those devices that will likely comprise the movement. Of course, no one can be sure how the IoT will mature, but the .NET Micro Framework appears to have developed a renewed focus in recent times - both by folks inside Microsoft as well as by the broader open source community. In my opinion, provided that SecretLabs can continue to innovate, Netduino seems to be well positioned to capitalise on the momentum that is moving the IoT forward.

 

As developers, what we care about most are the languages and frameworks that will be used to engage the hardware that supports our vision. The nascent IoT reminds me of how Cloud technology nearly a decade ago was being positioned to envelop everything. Indeed, it seems to be still touted as a software panacea of sorts. Whether you have bought into the Cloud punch-line or not, there is one thing that is undeniable; the improvements in tooling support to make Cloud technology a viable offering have been astounding.

 

If IoT is anything like the early days of Cloud computing, then you're likely not even going to be able to keep up with all the improvements that will start to occur within the devices you use, as well as the ones that you haven't even thought of yet.

 

Take care,

 

Nathan




#59036 NETMF SerialPort and "BreakState"

Posted by sfx on 06 July 2014 - 07:12 AM in Netduino Plus 2 (and Netduino Plus 1)

Hi Baxter,

 

Thanks for the reference. Actually, I saw this a few days ago but I didn't understand it until you explained the configuration in a couple of your previous posts.

 

I'm still waiting on my header wires to arrive, but hopefully I'll get to test the setup within the next few days.

 

Nathan




#59019 NETMF SerialPort and "BreakState"

Posted by sfx on 05 July 2014 - 08:15 AM in Netduino Plus 2 (and Netduino Plus 1)

Baxter,

 

Thanks for examining my diagram. I appreciate it.

 

I've swapped the 1A and 1B wires and moved the RX wire from the sensor to 1Y  on the IC instead. Attached is an image based off your recommendations.

 

If you notice anything else amiss, please let me know.

 

Once my header wires have arrived, I'll construct the prototype and see if I can finally catch a break (pun intended)!

 

Nathan




#59014 NETMF SerialPort and "BreakState"

Posted by sfx on 05 July 2014 - 03:59 AM in Netduino Plus 2 (and Netduino Plus 1)

Hi Baxter,
 
I picked up a Texas Instruments Quad DIP14 74HC08 from my local electronics shop.An example can be seen here:
 
Following your previous instructions, I have attached a diagram of what I think the circuit might look like. When you get some time, could you review the image and see if you think the setup I have created is correct?
 
Here is the datasheet for the IC that I purchased:

 

Thanks again,
 
Nathan

Attached Thumbnails

  • post-151462-0-43423600-1404.jpg



#59012 Simple Sensor Interface - SSI protocol?

Posted by sfx on 04 July 2014 - 11:37 PM in General Discussion

Hi Frode,

 

Having a standard communication protocol is a great idea. However, without manufacturer compliance implementing this type of protocol (SSI) would require quite a bit of work in order to cover all of the command types (not to mention having to potentially map a host of pre-existing proprietary commands).

 

One idea might be to hide all of the commands behind an SSI interface or break the commands up into multiple SSI interfaces (e.g. ISsiConfiguration, ISsiReader, ISsiStream). That way you aren’t forced to implement functionality that is ill-suited to your sensor, and you also provide all callers with an immediate understanding of what aspects of the SSI protocol have been implemented.

 

Nathan




#59011 NETMF SerialPort and "BreakState"

Posted by sfx on 04 July 2014 - 11:20 PM in Netduino Plus 2 (and Netduino Plus 1)

Baxter,

 

Thanks for the excellent description! I'm going to purchase an AND gate now and see if I can get this thing working.

 

Is there any reason why you mentioned the 4 gate AND in your reply? Would this be for connecting multiple devices or for using multiple devices to generate the "break" state?

 

Nathan




#59010 Netduino Plus 2 slow response (debugging)

Posted by sfx on 04 July 2014 - 11:14 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi Fred007,

 

I have the same issues as you when using the 4.3 firmware and VS 2013. Sometimes the debugger drops just before starting a new session and when it does start it seems to be unusually slow while stepping through code.

 

Nathan




#59003 NETMF SerialPort and "BreakState"

Posted by sfx on 04 July 2014 - 10:50 AM in Netduino Plus 2 (and Netduino Plus 1)

Baxter,
 
Thanks again for your great help.
 
I noticed on the second link that you sent through this up-voted response:
 

 

Unless your microcontroller has fixed-function special purpose pins, you would likely find it much easier to temporarily reconfigure the TX pin as a GPIO, drive it low for the desired period of time, then reconfigure it as the UART output.

 

As I'm only relatively new to the devices scene, does this mean that I could reference pin D1 as both a GPIO OutputPort and a SerialPort within the same code block? Would this make it possible to drive the OutputPort low (i.e. Write(false)) followed by sending commands to the SerialPort?
 
Nathan



#58981 Sending break over serial port

Posted by sfx on 03 July 2014 - 02:57 AM in Netduino Plus 2 (and Netduino Plus 1)

Hi Chris,

 

Just found this post and was wondering if you had any updates concerning it? This is an important requirement for me too. I'm having a similar issue with serial port BreakState and would also like to see a framework solution to this problem.

 

See my recent post here:

http://forums.netdui...and-breakstate/

 

Nathan




#58975 NETMF SerialPort and "BreakState"

Posted by sfx on 02 July 2014 - 12:44 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi Baxter,

 

Thank you very much for sharing your research with me.  When the header wires that I've ordered arrive I will attempt to incorporate the information that you provided in a test project.

 

Unfortunately, this issue is literally a show stopper for me. If I'm not able to even address the sensor, then I won't be able to send it any commands either.

 

Nathan




#58973 NETMF SerialPort and "BreakState"

Posted by sfx on 02 July 2014 - 04:39 AM in Netduino Plus 2 (and Netduino Plus 1)

Hi All,

 

I'm looking at connecting a range finder through serial to the D1 TX port of my N+2, but in order to send a command to the device I first need to send a "break". Unfortunately, it appears that the NETMF SerialPort class doesn't support the "BreakState" property like the standard .NET Framework SerialPort class does.

 

Does anyone know how I might do the same thing using NETMF?

 

Nathan




#58921 convert data types to byte[] and back for streaming

Posted by sfx on 27 June 2014 - 02:35 AM in General Discussion

Hi nb63,
 
The .NET Micro Framework is only a subset of its much larger parent (a highly abridged version, if you will). As such, much of the BCL is not included in order to keep the on-device memory footprint appreciably smaller.
 
I have had a similar issue to you when dealing with custom objects, but have managed to cross process boundaries by using interfaces along with my own Xml messaging/command transport. In essence, this meant that I had to devolve my objects into a meaningful string representation (e.g. an Xml or JSON payload containing state, type and command data) that could then be later restored via a shared parser with interfaces. The NETMF has the facility to convert UTF8 strings to and from byte arrays, so making something similar to old-school .NET Remoting is one way of handling your problem, albeit without the same degree of flexibility.
 
Of course, all of this depends on whether you're using NETMF on each of your edge devices. If you're not, then these other devices will need a way to parse the content and then instantiate the state of your message within the context of its own environment.
 
I can understand that this would be a real bugbear for you, but hang in there. Given the electric (pun intended) pace of the IoT, I'm sure something like this would be on the NETMF team's radar.
 
Take care,
 
Nathan



#58748 obstacle detection

Posted by sfx on 17 June 2014 - 05:28 AM in General Discussion

John,

 

This is a great idea! I've thought about how to do this myself, but your idea of using headers sounds like the cheapest and simplest approach I've heard. Nice work!

 

However, can I ask what you mean by "shrink wrap"? Are you referring to electrical tape, or something else?

 

Nathan




#58361 Sensor Cable Length

Posted by sfx on 23 May 2014 - 07:13 AM in Netduino Plus 2 (and Netduino Plus 1)

Hi Guys,

 

I haven't been able to find out how long the recommended practical limit for a sensor cable is, but I did find that Pololu offer pre-crimped terminal cables up to 5ft in length.

 

Take care,

 

Nathan




#58335 Netduino with inbuilt Wi-Fi?

Posted by sfx on 21 May 2014 - 09:25 PM in General Discussion

Hi Chris,

 

Thanks for the update. I was almost certain that this was something that you guys had considered already, so it is great to hear that it is on your radar.

 

I look forward to hearing about any updates concerning this in the future.

 

Best regards,

 

Nathan




#58323 Netduino with inbuilt Wi-Fi?

Posted by sfx on 21 May 2014 - 01:10 PM in General Discussion

Hi Folks,

 

Are there any plans to create a Netduino with inbuilt Wi-Fi? I noticed that Arduino has the Yun and it seems to me that a Netduino with similar functionality would be a tremendous boon for the product.

 

Best regards,

 

Nathan




#58322 Sensor Cable Length

Posted by sfx on 21 May 2014 - 12:56 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi Folks,

 

How long can the cables/wiring be when connecting a sensor (say 3/4 pin) to the Netduino Plus 2's digital or analog ports?

 

The reason I ask is that most suppliers seem to offer cables up to around 30cm, but I was hoping to be able to purchase something 2 meters or longer in length.

 

Best regards,

 

Nathan




#58193 Multiple Sensors To Single Serial Port

Posted by sfx on 17 May 2014 - 08:58 AM in Netduino Plus 2 (and Netduino Plus 1)

CW2,

Wow! I’m blown away. Thanks so much for taking your own time to diagram that for me. It definitely helped me to understand the connections much better than when I was simply reading about them using the vendor’s documentation.

Mario,

Thank you also for explaining how these types of connections can work. I’m still a little puzzled, however. The documentation for the range finder has this to say:
 

Communication with the SRF01 is with both serial input and serial output on a single pin. The SRF01 will be listening at all times except when it is actually sending data, and will go back to listening as soon as its finished. To communicate with the SRF01, you simply need to send a "break", followed by two bytes, the address of the SRF01 (factory default is 1) and the command.

 

What I find confusing is the statement above that specifies that serial input and output is on a single pin. Additionally, the device appears to be listening for commands as opposed to continuously attempting to stream data. Have I got this wrong? If so, does this mean that I would need to connect the range finder up to a second pin in order to receive data?

Thanks guys. All of you have been extremely helpful.

Take care,

Nathan




#58171 Multiple Sensors To Single Serial Port

Posted by sfx on 16 May 2014 - 11:21 AM in Netduino Plus 2 (and Netduino Plus 1)

Hi CW2,

 

Thank you for the clarification and the diagram. I definitely appreciate it. I'm guessing that a breadboard would be the best option for prototyping then. If it's not too much trouble, would you be able to draw a diagram (similar to your first) that demonstrates this process on a breadboard instead? Otherwise, might you know of a resource that could visually show such a parallel configuration?

 

I'm sorry for sounding like such a novice, but it is because I am; and I'm not sure where else I should go to get help with Netduino questions. :(

 

Take care,

 

Nathan




#58167 Multiple Sensors To Single Serial Port

Posted by sfx on 16 May 2014 - 10:43 AM in Netduino Plus 2 (and Netduino Plus 1)

Hi Chris,

 

I just received a reply from the manufacturer who had this to say in relation to my inquiry concerning the range finder in question:

 

"The SRF01’s are just connected in parallel. But before you do that you need to change the addresses to give each one a unique address." (underline mine)

 

Unfortunately, this doesn't help me much. Do you know of any resources that you could point me toward that show how to connect multiple serial I/O pins in parallel on a Netduino?

 

Thanks again,

 

Nathan




#58147 Multiple Sensors To Single Serial Port

Posted by sfx on 14 May 2014 - 10:09 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi Chris,

This is fantastic! Especially for a newbie like me, this type of explanation really helps me to understand what connections go where and why. Very much appreciated!

If I may, can I trouble you for one more explanation? I’d like to know how I might go about wiring up multiple of the aforementioned sensors to pin D1 (COM1 TX) on the Netduino? Would this need to be done through some type of extender module, bread board, soldering, or something else? I’m just not sure how “many” serial I/O pins on a sensor should fit into a “single” Netduino serial port.

Best regards,

Nathan





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.