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.

TechnoGuy

Member Since 12 Jun 2013
Offline Last Active Mar 27 2019 08:17 AM
-----

Posts I've Made

In Topic: i2c PowerUp

28 July 2016 - 10:34 PM

I just wanted to follow up on my June 29th query.

 

This was resolved for me by incorporating the workaround (strobe the SDA line before initializing I2C) posted by KiwiDev over on this forum thread:  i2c strange behaviour

 

In his reply, KiwiDev refers back to an August 2013 forum thread which discusses the basis for the workaround:  Netduino 2 and the Adafruit BMP085 Barometer (I2C)

 

So in short I can now get both of my HTU21D modules (SparkFun & Adafruit versions) to work with both of my Netduino boards (Netduino Plus 2 & Netduino 3 Wi-Fi).

 

As mentioned in my earlier post, there are implementation differences between the two modules.

  • The SparkFun module is the simpler of the two, incorporating two pull up resistors and a capacitor.
  • In contrast, the Adafruit module incorporates two BSS138 FETs, a MIC5225 LDO regulator, four pull up resistors & a couple of capacitors.

I guess that the relative sophistication of the Adafruit design makes it more sensitive to the starting condition of the SDA line when I2C is initialized.


In Topic: Netduino 3 Ethernet Static IP Issues

06 July 2016 - 01:45 AM

Please see these issues I logged against the Netduino.IP repository on Github back in November 2015.

 

https://github.com/n...duino.IP/issues

 

  • Problems with EnableStaticDns() & EnableDynamicDns() methods in NetworkInterface class
  • EnableDhcp() not implemented in NetworkInterface class
  • EnableStaticIP() not implemented in NetworkInterface class

With Netduino 3 there was a move towards the implementation of lwIP (i.e. "Lightweight Internet Protocol").  I believe this was done in anticipation of what would be coming out in NETMF 4.4.  Anyway, the above methods DO work on Netduino Plus 2 and DON'T work on Netduino 3.  I'm not sure if they're things that should have been implemented by the board developer or if they're part of NETMF 4.4.

 

Anyway, if they're things that are important to you, please visit the issue list on Github and add your comments / reaction (vote up) the issues.

 

See also this topic thread on the Netduino Forums:

http://forums.netdui...it-doesnt-work/


In Topic: i2c PowerUp

30 June 2016 - 06:53 AM

Mark, thanks for the reference to that article.  I will have a good look at it.

 

I'm pretty certain both my HTU21D breakouts (SparkFun & Adafruit versions) have internal pull up resistors.

 

Ian


In Topic: i2c PowerUp

30 June 2016 - 12:03 AM

Hi Roy,

 

I have a different but related issue.

 

I have two HTU21D sensor modules.

  • I got one (uses the HTU21D chip) from SparkFun (part #12064) about 2 1/2 years ago and.  They don't carry it anymore & have replaced it with a module which uses an Si7021 sensor instead (part #13763).
  • I got a second one (uses the HTU21D-F chip) from Adafruit (part #1899) more recently.  It's my understanding that an HTU21D-F is just an HTU21D plus a 5 cent PTFE filter.

The problem I have is that I can only get the SparkFun module to work with the Netduino; I can't get the Adafruit one to work.  It fails when I try to do a Soft Reset.

 

I have been successful in getting both modules to work with an Arduino type MCU (Teensy 3.1), using the exact same code.

 

I read your comments with interest and have tried connecting VIn on the HTU21D-F to 5V rather than to 3.3V.  It didn't make a difference for me.

 

Physically, there is a difference between the modules:

  • The SparkFun module has only 4 pins (VIn, GND, SCL, SDA)
  • The Adafruit module has 5 pins (all of the above + the 3.3V VOut)

I guess LadyAda implemented her module a little differently, to incorporate the 3.3 V voltage regulator.  Anyway, I'm at a loss to understand what's so different between the modules that one will work while the other won't.  Hoping you might have some insights on this...

 

Maybe you could post your initialization code?


In Topic: How to communicate to your PC using the serial port?

24 June 2016 - 08:35 AM

Hi, if you're expecting to be able to do serial communication between your Netduino & your PC using the USB cable that you use to power your Netduino / program it, it won't work.  While you can do this using an Arduino or a Particle Photon, it won't work for a Netduino.

 

Please see this forum thread from a few years ago for some background:

http://forums.netdui...d-the-netduino/

 

Nevyn asks if you're using a USB to serial cable.  He's talking about a USB to TTL cable - a special type of USB cable that contains an embedded chip which converts the voltages / signalling between what the PC speaks (i.e. differential USB signalling @ 5 V) to what the Netduino requires (i.e. TTL at 3.3 V).

 

You can find these cables many places.  Adafruit carries two such cables - one which uses a Prolific PL2303 chip and another one which uses an FTDI FT232RL chip.  I have used both with my Netduino and have been successful in transferring data between it and my PC.  SparkFun also has a cable like this.  They're about $10 US (the high end one that Adafruit sells is $17).  You'll find items like this on eBay; beware that there have been issues with counterfeit chips in the ones you can find on eBay.

 

USB to TTL Serial Cable - Debug / Console Cable for Raspberry Pi
 
FTDI Serial TTL-232 USB Cable
 
USB to TTL Serial Cable

 

With regard to your code...

 

On the Netduino:

  • On a superficial level the code you've written for your Netduino looks okay.
  • You're attempting to use the COM1 UART on the Netduino.
  • Be aware that this designates digital pins 0 & 1 (RX & TX respectively) on the Netduino.
  • It is NOT the Netduino's USB port.

On the PC:

  • The code you've posted is written to utilize the COM1 port - that's a real physical hardware RS232 port on many PCs (older ones).  Newer PCs frequently don't have such a port.
  • If you get one of the above-mentioned cables and plug it in, it will expose itself as something called a Virtual COM Port (you may need to install some drivers the first time round).
  • After this has been done, you will need to go into Device Manager on the PC to look up which COM port number has been assigned.  One way to do this is (Windows 7 assumed) to go into Control Panel, choose Device Manager, and then expand the Ports node of the device tree.  It's not unusual to see a Virtual COM port with a higher number (i.e. COM6, COM8).
  • Once you've figured out which port has been exposed - update your PC code to use that port #.

You can find a nice diagram of the Netduino here.  You can see which pins are used to implement the COM ports (4 of them).

 

http://forums.netdui...&attach_id=2376

 

Hope this is useful to you.


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.