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

SFE Joystick Shield


  • Please log in to reply
5 replies to this topic

#1 klotz

klotz

    Advanced Member

  • Members
  • PipPipPip
  • 60 posts

Posted 20 August 2010 - 12:28 AM

Just a quick note for anyone who may want to use the SparkFun Electronics Joystick Shield, DEV-09760 http://www.sparkfun....oducts_id=9760. I bought mine to use for experiments with my Netduino. While it worked fine after I built it, I did find the there were problems with the analog reading for the X and Y pot on the joystick. Following the information I saw here I had added a patch wire from the 3.3 Vdc to Vref. But noticed that the center readings were 66% of full scale. which meant that the min to center would have twice the resolution of the center to max. I am a software engineer not a hardware engineer so it took me a full half hour to realize that the problem was that the pots were biased using 5 Vdc. I change the jumper for Vref to the 5 V source. This did a find job of centering the signal, but the max values were very unstable. I guess I was over driving the A/D. So I cut the trace from 5 V to the joystick and added a wire from 3.3 to the joystick and Vref. Now every thing works just fine. See the attachment.

Attached Files



#2 Szymon

Szymon

    Advanced Member

  • Members
  • PipPipPip
  • 108 posts
  • LocationPoland, Krakow

Posted 20 August 2010 - 01:32 PM

I change the jumper for Vref to the 5 V source. This did a find job of centering the signal, but the max values were very unstable. I guess I was over driving the A/D. So I cut the trace from 5 V to the joystick and added a wire from 3.3 to the joystick and Vref. Now every thing works just fine. See the attachment.


Thanks for sharing your findings.

Looks like the fact that Vref is not connected on Netduino causes troubles with some shields, and also is bit confusing for people comming from arduino. Maybe Chris could explain why it was done this way and if there is any technical difficulty to make it connected by default to 3V3 in future revisions.

#3 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 20 August 2010 - 03:02 PM

Looks like the fact that Vref is not connected on Netduino causes troubles with some shields, and also is bit confusing for people comming from arduino. Maybe Chris could explain why it was done this way and if there is any technical difficulty to make it connected by default to 3V3 in future revisions.

The biggest reason why AREF is not connected to 3.3V internally is because the SAM7X512 chip doesn't support that natively. The AVR chip on the Arduino has an "internal AREF" as an optional integrated feature.

The other reasons we didn't just wire 3.3V to AREF and skip the AREF pin: [a] we wanted people to be aware that the Netduino was a 3.3V device and to be careful not to put 5V into the analog pins when used in analog mode; [b] we wanted to maintain the chip's capability of having an AREF which varies from 2.7V to 3.3V...for our customers who are using Netduinos for commercial engineering prototypes.

That said, I've chatted with engineering about potentially adding an "internal AREF" option in hardware on a future Netduino board revision. It would be a cool feature to have, for sure. For now, connect the AREF pin header to the 3.3V pin header with a jumper wire when using analog inputs.

Chris

#4 klotz

klotz

    Advanced Member

  • Members
  • PipPipPip
  • 60 posts

Posted 20 August 2010 - 03:15 PM

The biggest reason why AREF is not connected to 3.3V internally is because the SAM7X512 chip doesn't support that natively. The AVR chip on the Arduino has an "internal AREF" as an optional integrated feature.

The other reasons we didn't just wire 3.3V to AREF and skip the AREF pin: [a] we wanted people to be aware that the Netduino was a 3.3V device and to be careful not to put 5V into the analog pins when used in analog mode; [b] we wanted to maintain the chip's capability of having an AREF which varies from 2.7V to 3.3V...for our customers who are using Netduinos for commercial engineering prototypes.

That said, I've chatted with engineering about potentially adding an "internal AREF" option in hardware on a future Netduino board revision. It would be a cool feature to have, for sure. For now, connect the AREF pin header to the 3.3V pin header with a jumper wire when using analog inputs.

Chris

Personally, I like it the way it is. I was not confused by the AREF at all, my problem was that initially I did not pay attention to the fact that the shield had wired the pots to 5 vdc. Then in my haste to compensate I over drove the A/Ds by attaching AREF to 5V. Through this I learned a lot about the Netduino and its relationship to the Arduino. I won't make the same mistake again and hope that my original post will help others.
I conform strongly to the concept of modularity, therefore I feel that if the shield uses A/Ds then it is responsible for supplying the AREF. It may not matter much in the case of a connected shield, but having the A/D source supply the AREF is one sure way of insuring that the A/D's are reading accurately.
So my vote would be, If you are going to add "internal AREF" it should be done via a jumper on the Netduino and the jumper should be left off by default.
I plan to make all my projects supply the AREF for accuracy, so don't break my projects please.

#5 Snipehunter

Snipehunter

    New Member

  • Members
  • Pip
  • 6 posts

Posted 20 August 2010 - 04:59 PM

Personally, I like it the way it is. I was not confused by the AREF at all, my problem was that initially I did not pay attention to the fact that the shield had wired the pots to 5 vdc. Then in my haste to compensate I over drove the A/Ds by attaching AREF to 5V. Through this I learned a lot about the Netduino and its relationship to the Arduino. I won't make the same mistake again and hope that my original post will help others.
I conform strongly to the concept of modularity, therefore I feel that if the shield uses A/Ds then it is responsible for supplying the AREF. It may not matter much in the case of a connected shield, but having the A/D source supply the AREF is one sure way of insuring that the A/D's are reading accurately.
So my vote would be, If you are going to add "internal AREF" it should be done via a jumper on the Netduino and the jumper should be left off by default.
I plan to make all my projects supply the AREF for accuracy, so don't break my projects please.


I literally only just discovered what the hell AREF is even for last night when I tried to work with analog inputs for the first time, but I totally agree. An internal AREF (as long as its controlled by a jumper) would be a nice convenience, but now that I sorta get what I'm doing, I'd rather not give up the bit of flexibility I only just discoverd I have.

#6 klotz

klotz

    Advanced Member

  • Members
  • PipPipPip
  • 60 posts

Posted 20 August 2010 - 09:50 PM

After the modification to make the Joystick work with the Netduino the next step was to add some extra circuitry to support my next experiment. I wanted to control a servo or two with the joystick I also wanted some indication that the program was in control :D. So I added two 3 pin connectors for the servos and a LED. Here is an update to the schematic for the shield just incase someone want to critique it.

Attached Files






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.