- Netduino Forums
- → Viewing Profile: Topics: Kristoffer
Community Stats
- Group Members
- Active Posts 37
- Profile Views 9074
- Member Title Advanced Member
- Age Age Unknown
- Birthday Birthday Unknown
-
Gender
Not Telling
User Tools
Friends
Kristoffer hasn't added any friends yet.
Topics I've Started
ShieldBase Mini?
27 September 2012 - 08:57 PM
Netduino Go in a professional automation setup
27 September 2012 - 08:51 PM
I hope you guys can give me some input on this one.
Why would one hesitate to use Netduino Go/Go Modules in a professional industrial automation setup?
- Reliability
- Operating environment: dust, temperature, noise, humidity
- Durability
- Safety
I've read this Arduino reliability discussion and some of the argumentation is about
- Input & output protection, ESD
- IEC standards
Another concern I got is the state of the Netduino Go and modules, everything is in version 1.0 or Beta - I would never use any beta version for production - but is version 1 reliable?
Any software needs good structure and maintainability and in my domain the NETMF is up for that, so that's the primary reason I ended up with Netduino.
Actually I got a well-working project, doing as expected and any changes are easily implemented, however I have a feeling I've missed something and everything crashes at the presentation.
Any experiences and inputs are appreciated.
Thanks
Kristoffer
ShieldBase unhandled exception on new OutputPort()
18 July 2012 - 12:55 PM
http://forums.netdui...ployment-issue/
I have used the unofficial firmware chris links to at the bottom of this topic page 1
MainboardFlashUpdates.zip
After that I updated the ShieldBase with the beta 1 firmware found here: Shield Base Firmware v4.2.0.1 (beta 1) Includes PWM bugfixes
All went fine.
I can run the most simple NetduinoGo application without any problems
using System.Threading; namespace GoTester { public class Program { public static void Main() { Thread.Sleep(Timeout.Infinite); } } }
See attachment debug_output_1_run.txt for debug ouput of this run
After that the problems start:
1. problem
When I try to rerun the program (stop debugging and run again or ctrl-shift-F5) I get this message: "Cannot find any entrypoint!" in the debug output window, see attachment debug_output_2_run.txt
I can get by this by unplugging the NetduinoGo USB cable from the computer and plug it in again and then run again. But that means I have to unplug and replug the USB cable each time I've made a new build.
2. problem
I reference the ShieldBase.dll and tries to instantiate an OutputPort but I get an exception (see also debug_output_shieldbase_run.txt)
A first chance exception of type 'System.Exception' occurred in NetduinoGo.ShieldBase.dll
An unhandled exception of type 'System.Exception' occurred in NetduinoGo.ShieldBase.dll
using System.Threading; using Microsoft.SPOT.Hardware; using NetduinoGo; using SecretLabs.NETMF.Hardware.NetduinoGo; namespace GoTester { public class Program { public static void Main() { ShieldBase sb = new ShieldBase(GoSockets.Socket5); OutputPort op = new OutputPort(sb.Pins.GPIO_PIN_D0, false); Thread.Sleep(Timeout.Infinite); } } }
The StackTrace reveals it's in the ShieldBase.CreateOutport function it crashes (see StackTrace.png)
Have I missed something?
SPI.configuration and L6470 Stepper Driver
12 June 2012 - 09:13 PM
I'm trying to connect to one of these: L6470 Stepper Motor Driver, a stepper motor driver controlled over an SPI link.
It comes with an Arduino example sketch, which runs fine. So I'm trying to port it to my Netduino using the SPI.Configuration and SPI types described in the wiki, so far no luck.
Below is an excerpt of the L6470 datasheet:
Maximum SPI clock frequency: 5 MHz
Chip select setup time: min. 350 ns
Chip select hold time: min. 10 ns
Deselect time: min. 800 ns
Data input setup time: min. 25 ns
Data input hold time: min. 20 ns
"When CS is high the device is unselected and the SDO line is inactive
(high-impedance).
The communication starts when CS is forced low. The CK line is used for synchronization of
data communication.
.....
After each byte transmission the CS input must be raised and be kept high for at least tdisCS
in order to allow the device to decode the received command and put into the shift register
the return value."
So I'm setting the SPI configuration like this:
opSS = new OutputPort(Pins.GPIO_PIN_D10, true); var device1 = new SPI.Configuration(Pins.GPIO_NONE, // SS-pin false, // SS-pin active state 350, // The setup time for the SS port.[b] What resolution is this?[/b] 10, // The hold time for the SS port. [b]What resolution is this?[/b] true, // The idle state of the clock false, // The sampling clock edge 5000, // The SPI clock rate in KHz SPI_Devices.SPI1// The used SPI bus (refers to a MOSI MISO and SCLK pinset) ); spi = new SPI(device1);And the write routine:
static void SendBytes(byte[] bWrite, byte[] bRead) { opSS.Write(false); spi.WriteRead(bWrite, bRead); opSS.Write(true); }
But I'm not getting the same reponses as the Arduino example, far from.
If I i.e. send a0x38 byte via Arduino example, then I get a single byte back value 1. Doing the same from Netduino gives also 1, however, no matter how large I make the read buffer (i.e var bRead = new byte[40]; ) the first byte is 1 and the rest is 121 (decimal). And after that responses are not comparable.
Unfortunately I don't have an oscilloscope, so I can't measure what actually happens. Would that actually be possible to measure a byte with an oscilloscope?
I have tried to set SS port setup time and hold time in the SPI.Configuration constructor to 0 and it gives the same result.
If anybody can see anything that might cause trouble in my SPI setup, please let me know.
Thank you
Kristoffer
Inductive sensor input problem
05 June 2012 - 01:03 PM
I got an Inductive Proximity Sensor (https://www.mysick.c...ProductID=51476), which I'd like to read the output from with my Netduino.
It's a DC 3-wire PNP NO and I give it 24V.
See attachment for the setup.
The censor seems to work fine, when triggered it gives 24V in output and 0V when not triggered.
I've made a voltage divider which brings the sensor output down to ca. 4V and my multimeter confirms that.
But I can't read that value in Netduino, this little program outputs only "true"
public static void Main() { var ip = new InputPort(Pins.GPIO_PIN_D1, true, Port.ResistorMode.PullUp); while (true) { Debug.Print("ip.Read() = " + ip.Read()); Thread.Sleep(1000); } }
I'm definitely not an electronic master mind, so any help with my setup is appreciated.
Thank you
Kristoffer
EDIT: attached file, sorry!
- Netduino Forums
- → Viewing Profile: Topics: Kristoffer
- Privacy Policy