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

Shield Recommendations


  • Please log in to reply
4 replies to this topic

#1 Matt Brailsford

Matt Brailsford

    New Member

  • Members
  • Pip
  • 9 posts

Posted 11 November 2011 - 08:17 AM

Hey Guys, I'm just about to start my first project with my newly purchased netduino and I was wondering if I could get some recommendations for appropriate shields? Ultimately I want to control 2 motors (just the cheap brushed kind) and 1 servo over wifi. After a search on the forums, their seems to be a few motor shields around, though most seem to only handle up to 2 motors, apart from the Adafruit shield. That said, I haven't seen any threads reporting to have controlled both motors and servos at the same time with the Adafruit shield. Should this be possible with a netduino? (I ask because I notice not all inputs / outputs seem to be available when used with a netduino) Wifi shield wise, there also seems to a few options, though I'm not sure which is best. I guess my question here is one of compatibility when used in conjunction with the motor shield above (ie making sure I have enough pins free etc). Any help would be appreciated. Many thanks Matt

#2 Easter

Easter

    New Member

  • Members
  • Pip
  • 5 posts
  • LocationIndiana

Posted 11 November 2011 - 04:29 PM

The adafruit shield should work well. it can handle 4 motors (or two steppers) and still handle two servos. The main thing I'd watch for is pin usage between the motor shield and your wifi. I'm not sure about that.

#3 Paul Newton

Paul Newton

    Advanced Member

  • Members
  • PipPipPip
  • 724 posts
  • LocationBerkshire, UK

Posted 13 November 2011 - 03:54 PM

Hi Matt, I am still quite new to the Netduino. I have purchased an Ardumoto shield from Hobbytronics in the UK: http://www.hobbytron...rduino-ardumoto - I wrote a review on the site too. (The formatting got lost in posting.) Easter is very right to warn about the pinouts of shields! The ardumoto has to be connected to the netduino using wire links as none of the netduino PWM signals map onto the two PWM inputs chosen by the designer of this board. I bought a pack of jumper wires to help with this. (Even Arduino users will have problems if they want to control more than two motors as I don't see any other way to re-route signals between shields.) You will need four pins in total to control the Ardumoto's two motor channels (two PWM for speed and two GPIO for direction). This still leaves you two more PWMs for servos. One big issue I had was sorting out the power supply for the motors. I have a model robot that uses 2 AA batteries (3 Volts) for the motors and I decided three AAs (4.5 Volts) would be plenty to drive the motors with the shield. It was a complete disaster, the shieled LEDs worked fine, but as soon as I added the load of the motors the behaviour was very strange. I was forced to read the datasheet for the L298 to try and work out what was wrong. It all came down to the Vin voltage being too low for the transistors in the L298 driver chip to turn on properly. Vin needs to be 2.5V greater than the logic high level being used to drive the chip (3.3V). So I have now settled for six AAs (9 Volts). Watch out for this because I think quite a lot of the motor shields are based on the L298. Another thing I found was that the Netduino kept resetting if I powered it from the same AA batteries at the shield, so I am currently using two sets of batteries. The Ardumoto has a separate Vin connector to allow power to be drawn directly rather than through the Netduino, and because I am using jumper wires I have chosen not to connect the Vin between the boards. One final issue I have not yet attempted to resolve is that when the Netduino is reset, the motors turn full on for several seconds. I am assuming that the Netduino's ARM has weak pullups enabled on reset, and that my PWM GPIOs get pulled to logic high by these - thus turning on my motors. Any help on how to address this would be gratefully accepted - I assume this would be a problem to other users also. Puting the voltage and wiring difficulties aside, the Ardumoto board is well built and does the job I wanted it for. For those of you in the UK, Hobbytronics were great to buy from. They have a good range of components (not much Netduino specific hardware) and I received my parts the next day having only paid £2 for delivery. Paul

#4 Paul Newton

Paul Newton

    Advanced Member

  • Members
  • PipPipPip
  • 724 posts
  • LocationBerkshire, UK

Posted 13 November 2011 - 07:37 PM

I had a look around the forum and confimed my suspicion - http://forums.netdui...h__1#entry20495 In short, when the Netduino is reset, all the GPIO lines become inputs by default with internal weak pullups. As I found this means that external hardware being driven by the Netduino will see logic high signals. Whilst this is a pain for driving active high hardware, it is the normal was of doing things where GPIOs are programmable in software and the reset code must place them into a "safe" initial state. (I had a similar problem driving servos using a PIC many years ago. A nice little insect robot I built would have a spasm every time I turned it on because the servos were being driven by a constant high signal at power on.) Two obvious fixes are to: * use the logic the other way up - e.g. active low logic. For the L298 this would need an external inverter gate and careful use of the PWM class in the Netduino software. * use a logic gate to hold the GPIO signal low until a control GPIO signal is set low by the Netduino. Better as it would not reqire using the PWM upside down, but still requires external logic to work with. The Ardumoto shield has a prototyping area - so I guess its time to get the iron out! I think a new shield is required that provides GPIO gating with a control signal, and I/O remapping using jumpers to allow GPIOs to be routed to any shield pins! Paul

#5 Matt Brailsford

Matt Brailsford

    New Member

  • Members
  • Pip
  • 9 posts

Posted 14 November 2011 - 07:56 AM

Thanks for the recommendations guys. I have put an order in for the Adafruit shield, though would still love to hear peoples suggestions for a wifi shield I'll be able to use in combination (I only have a netduino, not plus) Cheers Matt




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.