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.
Photo

NP2 vs. Arduino


  • Please log in to reply
6 replies to this topic

#1 EricO

EricO

    Member

  • Members
  • PipPip
  • 17 posts
  • LocationLas Vegas

Posted 21 February 2013 - 07:51 PM

I'm am brand new to working with microcontrollers, so if my terminology is off or my questions don't make a lot of sense, please understand.  I recently bought the NP2, primarily because it uses the .Net MF. I have several years of experience with .net/c# and thought it would probably be as good of a place to start as any. 

 

My topic title might be slightly misleading, I'm not looking for a discussion of the merits of one over the other, what I'm after is some information about the differences schematically. There are a lot more reference materials and books about the Arduino and I found one that covers a topic I'm interested in but it's for the Arduino.  So, my question is, when I'm following examples in the book, how close or different will board specific references be? 

 

Also, are Arduino expansion shields compatible with the netduino? e.g. motor shields, network shields, etc.

 

TIA



#2 Radek

Radek

    New Member

  • Members
  • Pip
  • 5 posts

Posted 21 February 2013 - 09:21 PM

I've got similar background :-) I have both Arduino Uno R3 and Netduino Plus 2.

The main issue is that Uno has 5V I/O whereas N+2 has 3.3V I/O. In digital mode they are compatible - N+2 can stand 5V and 3.3V is HIGH on Uno. But watch out when you are using analog (especially inputs) on N+2.

For example I had this is a problem when using 16x2 LCD Shield buttons - there is one analog input for 5 buttons and each button causes some known voltage drop. When no button is pressed, there is 5V on A0. In theory you may damage N+2 this way, but some guys on this forum tried that and said N+2 can stand 5V. But still some buttons will not work.



#3 EricO

EricO

    Member

  • Members
  • PipPip
  • 17 posts
  • LocationLas Vegas

Posted 22 February 2013 - 08:00 PM

I've got similar background :-) I have both Arduino Uno R3 and Netduino Plus 2.

The main issue is that Uno has 5V I/O whereas N+2 has 3.3V I/O. In digital mode they are compatible - N+2 can stand 5V and 3.3V is HIGH on Uno. But watch out when you are using analog (especially inputs) on N+2.

For example I had this is a problem when using 16x2 LCD Shield buttons - there is one analog input for 5 buttons and each button causes some known voltage drop. When no button is pressed, there is 5V on A0. In theory you may damage N+2 this way, but some guys on this forum tried that and said N+2 can stand 5V. But still some buttons will not work.

 Great feedback, thank you.



#4 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 22 February 2013 - 10:30 PM

Radek -- the "analog" pins on Netduino are 5V tolerant when they're used as Digital I/O. When they're used as analog inputs instead...you'll want to use 0-3.3V for that. Many "5V" components see 3.3V as "logic high", so a lot of shields with ICs still work fine with the 3.3V output voltages. Also--Netduino Plus 2 has the new "R3" shield pinout with IOREF--so newer shields should automatically adjust both their analog and digital inputs to 3.3V levels. Chris

#5 Radek

Radek

    New Member

  • Members
  • Pip
  • 5 posts

Posted 02 March 2013 - 06:41 PM

Chris -- thanks for info about IOREF. Actually my shield does not have IOREF pin (see pin layout)

 

I was affraid to turn on AnalogInput with this shield, but you encouraged me :)

For the 16x2 LCD Shield and a code like this:

AnalogInput buttonPin = new AnalogInput(Cpu.AnalogChannel.ANALOG_0);while (true){    Debug.Print(buttonPin.Read().ToString());}

I'm getting:

  • Left: 1.00 (3.85V)
  • Down: 0.97 (3.18V)
  • Up: 0.72 (2.34V)
  • Right: 0.36 (1.19V)
  • Select: 0.00 (0.01V)
  • no button pressed: 0.77 (4.72V)

Voltage measured using multimeter at the same time. Values may differ a bit between readings. Netduino powered only via USB cable.

 

When I connected additional 9V battery voltage raised a little bit: 3.31V for down, 3.91V for left and Read method returned 1 for both buttons.



#6 Radek

Radek

    New Member

  • Members
  • Pip
  • 5 posts

Posted 04 March 2013 - 06:14 PM

Next difference - Arduino Uno R3 has ICSP pins (6 pins near onboard LED) while Netduino Plus 2 has 10 tiny holes there (next to onboard button). As far as I know, the USB Host Shield uses that. Maybe Chris can comment on this difference.



#7 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 05 March 2013 - 06:59 AM

Hi Radek, If the voltages on the analog pins are >3.3V, you'll want to use a resistor divider to bring the voltage down into the safe 0-3.3V range. Regarding ICSP vs MiniJTAG pins (the 10 tiny holes)... AVRs use ICSP and ARM microcontrollers use JTAG (or SWD). If you have a shield which needs the "ICSP" headers, you can sandwich a MakerShield in the middle and it'll route the "ICSP" pins to the right place on the Netduino Plus 2. And you still get native code debugging via the MiniJTAG port--if you are a native code hacker and want to play with that. Chris




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

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.