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.

Nobby

Member Since 14 Oct 2011
Offline Last Active Jan 13 2013 11:09 PM
-----

Posts I've Made

In Topic: HTTPS support on N+2?

21 November 2012 - 06:41 AM

I was about to start prototyping code in my existing product to use SSL for client authentication. Haven't written I line of code yet but I've read through the framework API for supported functionality. http://msdn.microsof...y/hh401316.aspx is where most of what you need can be read. I'm not sure if this component of the .Net Microframework is part of the build for Netduinos.

The basic run-down is that your device can be a client or a server as far as SSL is concerned so technically you can pull off HTTPs. If you're using basic HTTPS then you only need to store one or two certificates. One to certify your netduino as a secure server and possibly another certificate/cert chain that points to a publicly trusted certification authority(CA). If you don't care about the certificate being trusted and you just want secure communications it's pretty simple.

  • Generate and store the SSL certificate for your netduino into RAM at run-time via the CertificateStore class. Put the cert on an SD card and read it off each time you boot up
  • Use the SSLStream class for reading and writing data instead of a NetworkStream with the client socket.
  • Server authentication via the netduino certificate is mandatory but client authentication with a separate certificate is optional. Use the SSLStream.AuthenticateAsClient and AuthenticateAsServer functions.
  • Once authenticated, you use the streams like normal HTTP

In Topic: Connecting a motor to the netduino

13 November 2012 - 10:19 PM

You've got two goals to achieve here. Your circuit build/hook-up and software to control the H-Bridge. The good news is that regardless of how you end up controlling the H-Bridge, the connections are the same.


You haven't specified what your H-Bridge is and how it's been put together etc. They're simple systems to understand. You need to connect at least three different kinds of connections:


  • DC Bus link voltage. This is the power supply you provide the H-Bridge. It can be bi-polar or uni-polar but it depends on if your H-bridge will allow you to connect a 'center-tap' for setting the ground as a mid-point.
  • CMOS/IGBT gate inputs. You connect your PWM outputs to these. There are four of them but they are in pairs so you only need two PWMs to drive it. One switch is always off when the other is on for each pair(side note on this)
  • H-Bridge output goes to the motor. You will be able to drive a DC or an AC motor with an H-bridge.

There may be some other component considerations depending on the gear you've bought.

Controlling the motor can be as easy or difficult as you want and it's a massive field for you to explore. To start with, you will most likely be able to get a library or use .Net classes which will operate the PWMs for you. Because you have an H-Bridge you have two options:


  • Use one PWM on half of the H-Bridge as a starting point. It turns your H-Bridge into a single phase-leg modulator which means you can't drive an AC motor
  • Use two PWMs on the full H-bridge which will allow you to drive an AC motor as well as DC

Above is your starting point but it has no feedback control loop. Without feedback from the motor, you won't be able to know how fast it is actually spinning for a given input signal. If it's important for you to have precise control of the motor speed, you need software in your project which will measure the motor speed and figure out the difference in desired speed and actual speed the adjust your modulation depth to drive the H-bridge harder or less. Some motors can tell you their position as well so you can precisely control the position of the motor as well as speed.

Having said all this, if you're just a hobbyist and want to see the motor spin, you don't need a feedback control system or understand much about modulation theory. If you told us more about your goals then we can be very specific about helping you to setup the right system.



--edit: oops forgot the side note. Depending on how your H-bridge has been designed, you have to build a "dead-zone" into the PWM signal. If there's free-wheeling diodes and/or your H-bridge uses IGBTs, there's a discharge transient when the device attempts to switch off. If you toggle the other switch on before its complimentry switch has fully turned off, you create a short on your power supply every time the PWM switches on/off. It will damage your supply and possibly much more.

In Topic: Anyone try driving a relay with two output pins.

13 November 2012 - 09:48 PM

If I'm using a dual coil latching relay with voltage of 3V (with coil resistance 129 ohms), do I need to use the transistor ??


It's a bit touch & go with your situation. When they say 129 ohms, they mean total impedance. Part of it is reactive and the other is purely resistive. 129ohms at 3.3V from the CPU pin will draw up to 23mA which is borderline. If you intend on driving the relay in short bursts then it would possibly be acceptable but otherwise you wouldn't.

Once the transient behaviour dies away from switching the relay on, the effective impedance of the relay will be less and you'll exceed the maximum continuous current draw from the CPU pin and smoke the poor thing.

If it was me, I'd use a transistor.

In Topic: Alternative Purchasing Options for Netduinos

12 November 2012 - 11:39 PM

I have used only Nwazet and Proto-advantage for all my stuff, both give you cheap delivery, and reasonable fast shipping.
I'm always taxed on those purchases though, since Norway have this stupid customlimit, if it cost above 200NOK (about $32) I have to pay 25% on everything including shipping.

When I bought an Arduino now, I tried to buy from the italy shop, kinda, to support buying from correct place, but they did not trust the postal system, so they required me to use an $77 UPS shipping. So, of course I bought it from Adafruit instead, which sold me the unit at proper price, and $9 in shipping :)
Most of my electronic stuff is coming from the two above, pluss ebay, and adafruit.


I feel your pain. My country has horrible software tariffs with the USA. Our currency is stronger than theirs but my MSDN subscription costs me nearly twice as much as a US subscriber. I don't even order DVDs, just download everything.

In Topic: Alternative Purchasing Options for Netduinos

12 November 2012 - 06:35 AM

Hi Nobby,

Which region do you live in? Also, sorry to hear about your bad experience. Is it a Netduino-reseller? If so, it may be good to know for Secret Labs which reseller.



I'd prefer not to put the particulars of the issue on the forum. Is there an appropriate email contact at Secret Labs I could shoot my email off to?

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.