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.

Stuart Crawshaw's Content

There have been 60 items by Stuart Crawshaw (Search limited from 28-April 23)


By content type

See this member's


Sort by                Order  

#15482 Digital GPIO Pins Voltage

Posted by Stuart Crawshaw on 14 July 2011 - 04:24 PM in Netduino 2 (and Netduino 1)

"Tolerant" means that's possible without any pain.

I'd love the humans were "tolerant" each other as the Netduino pins are with 5V.
Cheers

Great Thanks.

For the digital I/O's, it just doesn't matter. For analog I/O's it does. They are 3.3V, not 5V tolerant. An important one to keep in mind :)

Indeedy

Thank you both for your input. Just had to make sure I was doing what is recommended.



#15478 Digital GPIO Pins Voltage

Posted by Stuart Crawshaw on 14 July 2011 - 03:55 PM in Netduino 2 (and Netduino 1)

Hey all, Just reading the specs page again, and i noticed the Digital IO pins a rated at 3.3v but are 5v tolerant. Just a simple question, will using 5v Input or Output reduce the life expectancy of the device and is using 3.3v safer/recommended over 5v? Or does it simply not matter? Thanks in advance, Stuart.



#15472 DS18*20 Temperature Sensor Auto Identity Circuit

Posted by Stuart Crawshaw on 14 July 2011 - 01:01 PM in General Discussion

Another elaboration on my idea could be to sense if there is a current on a particular port. That way when you plug in a probe your code knows which socket it realtes to and can then go about checking the addresses as described above. That way it wouldn't matter which order you plugged them in you would just need a current sensing circuit across the the 5 sockets. This would work as you wouldn't simultaneously plug all 5 sensors in, so the code could easily assign the address to a variable relating to the corresponding socket that it sensed a change in current from logic level to 0.


Yes, that thought had crossed my mind, but i would like to connected/disconnect devices while the board is un-powered (to limit that chances of shorting or anything else that could happen as I am plugging the devices in.

Mainly the idea was to combat the senario what all sensors are plugged in, placed in the location to be monitored and the netduino powered on. Then i could use a menu system to say Port one is monitoring a power supply, port 2 a water filter temperature and so on, without having to connect them individually and assign their names.



#15466 Another LED "Hello world!" program

Posted by Stuart Crawshaw on 14 July 2011 - 11:39 AM in Project Showcase

Awesome, Just for my knowledge (not a critisism or anything) but could you of done this without the need for all of the transistors and resistors or was this just so you could create a circuit with an example of how a transistor could be used? Also, if the transisors were not used, could you have 1 resistor going to ground with and have that resistor as a common "gate" to ground for all of your LED's? Like i said this is not a critisism, i think your creation is an awesome little bit of electronics, im just trying to better my understanding of things (i am more of a code junkie than an electronics kinda guy). thanks,



#15456 VB2010 Express

Posted by Stuart Crawshaw on 14 July 2011 - 09:09 AM in Visual Basic Support

I brought my work Win7 laptop home and tried it on that and everything works fine, so I guess it's actually a WinXP issue.


If the problem is so far specific to your windows XP machine, When you plugged the device in for the first time, did you allow XP to install the driver its self or did you manually choose the driver in the SDK folders?

I had problems with the one my WinXP machine found from the internet (MS Update i think). Once i uninstalled and installed the SDK Drivers, i didnt have as many problems (the ones i was left with were silly user error type things which caused the device to need to be wiped :P )



#15424 Problem in VMWare virtual machine

Posted by Stuart Crawshaw on 13 July 2011 - 02:03 PM in Netduino 2 (and Netduino 1)

Hello,
after some months I have restarted work with Netduino.
I have connected it to my PC in VMWare Virtual Machine and when deploy the application on the target, the debugger hangs and display "the debugging target is not in initialized state, rebooting...".
From real PC (not virtual machine) all works fine.
I have upgraded the firmware to last version 4.1.6 but nothing changed into virtual machine.

Why ?

Thanks,
Paolo.


Couple of questions,

When the netduino is conectec to VMWare, is the connection and exclusive connection to the guest or can the host see it as well?

If it is exclusive, what happens if you un-plug and replug the netduino whilst VS2010 is saying "the debugging target is not in initialized state, rebooting..."?



#15423 Newbie ds18b20 questions

Posted by Stuart Crawshaw on 13 July 2011 - 02:00 PM in Netduino 2 (and Netduino 1)

You may also want to check out Stuart's DS18*20 Temperature Sensor Auto Identity Circuit.


Thanks for the link to my topic! Just to update on this, i am awaiting components to build the circuit, just need some transistors really. Currently working on the code to do the hard work and then ill post it all on my thread.

In theory, with my idea, you would have as many sensors on the bus as needed (buy you would need a transistor for each of them to turn them on/off) and a shift register per eight sensor/transistor pairs.

so in the case of 8 sensors, you would send 1 byte to the shift registor to set pin 0 high and the rest low -> read the ROM code from the sensor bus, and then turn off pin 0 and turn pin 1 on etc etc... at the end send all 1's to the SR and all sensors will be active.



#15421 Come In and Help a Color Win

Posted by Stuart Crawshaw on 13 July 2011 - 01:38 PM in Project Showcase

Hey thanks for playing! You are the first and you win an image of your little guy :)


YAY! :) lol.



#15413 Come In and Help a Color Win

Posted by Stuart Crawshaw on 13 July 2011 - 12:42 PM in Project Showcase

I made a little project to have fun and see how you guys interact with it...


Nice little idea,

Come one the reds :)



#15410 VB2010 Express

Posted by Stuart Crawshaw on 13 July 2011 - 10:38 AM in Visual Basic Support

If I cancel the deploy and unplug the Netduino and then hit 'start debugging' while the device is booting, the code gets downloaded to the netduino without error, however, VB gets hung up. The status reports 'The debugging target is not in an initialised state; rebooting'. It hangs here and gets no further.


Hi and welcome,

I had this issues with VSCS2010, I found that if it sticks at the Debugger not initialised, simply pulling the USB and re-plugging would move things along.

Also, you stated that you could not deploy and had a communication error. Could i ask if the blue LED was constantly on at this point?

If so it may be that previous code has caused the Netduino not to boot correctly. Which would explain why rebooting it whilst trying to deploy works, as the ND does not get chance to run the existing code as new code is downloaded straight away.

I either had to do as you mentioned, or use MFDeploy to wipe the development area on the flash.

Hope this helps.

Regards,
Stuart.



#15409 An error has occurred: please check your hardware.

Posted by Stuart Crawshaw on 13 July 2011 - 10:31 AM in Visual Studio

It looks like there's a glitch in your current project files. Perhaps they're trying to use an assembly which doesn't match the version of those already on the Netduino?


Yes, i had this problem when trying with the OneWire library by CW,

I had referenced the wrong DLL in my code and it did this everytime untill i referenced the correct one.

Regards,
Stuart.



#15408 Connect Debugger Without a Re-Compile/Re-Send

Posted by Stuart Crawshaw on 13 July 2011 - 10:29 AM in Netduino 2 (and Netduino 1)

Hi Stuart,

That's possible! You can start MFDeploy.exe and press F5 to follow those texts.



Awesome, Ill give that a try.

Thanks again Stefan for your help and support on my ever growing quest for netduino knowledge :)

Cheers,
Stuart.



#15380 Connect Debugger Without a Re-Compile/Re-Send

Posted by Stuart Crawshaw on 12 July 2011 - 04:27 PM in Netduino 2 (and Netduino 1)

Hi all, I was just wondering if after my project is built and the netduino is in-situ, is it possible to then reconnected the computer to the USB port and view the debug messages from the code (Debug.Print("")) without having to hit the debug button in c# Express and rebooting the netduino? Hope this made sense... Thanks again for all of your help on this and other topics. Regards, Stuart.



#15297 DS18*20 Temperature Sensor Auto Identity Circuit

Posted by Stuart Crawshaw on 10 July 2011 - 10:06 AM in General Discussion

You might also check out DS1825 thermometer, which has 4-bit location address.


Hi CW,

Thanks for the reply. I was really interested in the sensor provided but noticed it is only available in one package type.

I want to eventually have these on the end of wires etc for long lead probes.

I am greatful you took your time to suggest these though. I will be sure to bookmark them incase of another project.

thanks again,
Stuart



#15281 DS18*20 Temperature Sensor Auto Identity Circuit

Posted by Stuart Crawshaw on 09 July 2011 - 11:41 PM in General Discussion

Hi mcinnes01, The idea is feasable. Only I have decided that the tansistors should be on the groung pins of the sensor as they won't allow the data pins to work otherwise. Once I have some code I will post it on here with my final circuit design too. You idea would also work but would be a alittle bit of an annoyance if you have to do it a lot. I was either going to store these values on an eeprom or similar. Also this way I can drive an lcd and this temp sensor circuit off of 5 pins total.



#15210 DS18*20 Temperature Sensor Auto Identity Circuit

Posted by Stuart Crawshaw on 08 July 2011 - 01:12 PM in General Discussion

Hello Stuart.
I am NOT sure to understand well what you are looking for, NOR I know the 1-wire protocol (I had a peek right now at the specs).
Basically you would have a "kind of switch" to use on the beginning of your program, so that the codes of the probes could be read. Then, you will have a code-port pair well-known.
Instead of using your circuit (missing the resistors from the HC595 to the transistor base), I'd suggest an alternative, that will flip upside-down the whole approach. However that's working only if I understand correctly.

Consider this chip: 74HC4051. It's basically a bidi-switch. Just think the old-fashion electric appliances, having a rotary switch with position 1,2,3 etc. Its particularity is that is "transparent", as it was a wire connecting an input to the output...by the way it's almost improper to call them "input" and "output".

Well, now refer to the HC4051 sheet. Consider to connect each data lead of your probes to the Yx pins of the 4051. The Z pin will be connected to the Netduino 1-wire pin.
Your program must choose, once a time, which "Y" to connect with "Z". To do that, you must set the S0,S1,S2 inputs properly, using three Netduino outputs.
Using this approach, you MUST always switch the right probe. You cannot select more than a probe a time, but the circuit looks much more compact and clean.

Feel free to tell me if this idea fits your goal or not.
Cheers


Hi thanks for the suggestion,

Unfortunatly i want to be able to addrss all of the probes at the same time as well as individually on initialization.

I should have mentioned that I am using spi with the shift register and there are othrr tegisters on the spi which controll lcd's etc. So using the chip mentioned above would use more pins

Thanks again for the input



#15205 DS18*20 Temperature Sensor Auto Identity Circuit

Posted by Stuart Crawshaw on 08 July 2011 - 11:32 AM in General Discussion

Hi all,

I have though up a circuit which will help me on a project i am working on. The basic outline is as follows:

I have 5 ports into which i can plug in up to 5 DS18*20 temperature sensors. The ports are numbered 1 - 5.
The problem i came accross in the early stages was, how do i know in my code which sensor ROM code is for which sensor (without having to force a higher temp and read all of them to see which code is higher.)

Say i had sensor in port 1 monitoring a power supply internal temp, Sensor in port 2 monitoring water temperature somewhere. And a sensor in port 3 monitoring another temperature somewhere else.

How could i pair the locations of the sensors (port or physical) to the rom codes?

This is where i thought of the attached circuit(It may be overkill, and may be missing some componenets such as resistors etc. But that is what this thread is for).

The idea is, each sensor port has an address of its own. On initialization, the shift register is fed the relevant bits to turn on one DS1820 at a time and read the ROM code then assign that rom code to that port name.

After all 5 ports have been individually turned on, and ROM codes discovered/not found, the shift register is fed all 1's to turn all DS1820's on.

So the question:

1. What transistor should i use to switch the DS1820's on/off (or maybe even a trasistor array? i was looking at this)

2. Am i missing any resistors (maybe on the transistors or something) if so what values would you suggest.

3. Can you think of a better way to do this, other that plugging each individual sensor in to its own digital IO port on the Netduino?

4. Can you offer any modifications to make this more effecient etc...


Thanks for your help on this, Constructive critisism is appreciated and any suggestions welcome.

Regards,
Stuart.

Attached Files




#15191 OneWire ALPHA

Posted by Stuart Crawshaw on 07 July 2011 - 07:23 PM in Beta Firmware and Drivers

Never mind,

I figured it out.


// Instruct a single DS18*20 to do a temperature conversion and read result.
public static void GetSingleTemperature(byte[] romAddess)
{
  var oneWire = new OneWire(Pins.GPIO_PIN_D0); // Adjust the pin if necessary
  if(oneWire.Reset())
  {
    // DS18B20 Thermometer
    oneWire.WriteByte(OneWire.MatchRom); // Address single device
    oneWire.Write(romAddress);           // 64bit ROM code stored in byte[] romAddress
    oneWire.WriteByte(DS18B20.ConvertT);
    Thread.Sleep(750);                   // Wait Tconv (for default 12-bit resolution)

    oneWire.Reset();
    oneWire.WriteByte(OneWire.MatchRom); // Address single device
    oneWire.Write(romAddress);           // 64bit ROM code stored in byte[] romAddress
    oneWire.WriteByte(DS18B20.ReadScratchpad);

    // Read just the temperature (2 bytes)
    var tempLo = oneWire.ReadByte();
    var tempHi = oneWire.ReadByte();
    var temp = DS18B20.GetTemperature(tempLo, tempHi); // ((short)((tempHi << 8) | tempLo))/16F
    Debug.Print(temp.ToString());
  }
}

// Get temperature reading from all devices on the bus.
public statis void EnumerateAllDeviceTemps()
{
  var rom = new byte[8]; // 64-bit
  var deviation = 0;  // Search result
  do
  {
    if((deviation = oneWire.Search(rom, deviation)) == -1)
      break;
    if(OneWire.ComputeCRC(rom, count:7) == rom[7])
    {
      // Found a valid device ID
      GetSingleTemperature(rom);
    }
  }
  while(deviation > 0);
}



#15176 OneWire ALPHA

Posted by Stuart Crawshaw on 07 July 2011 - 11:04 AM in Beta Firmware and Drivers

Appologies for pretty much hijaking this thread, but i have one more question. Regarding the OneWire library here, If i have 5 sensors connected to the netduino, is there any way i could read a particular sensor, say sensor 4. and then take a reading from sensor 2. the example code shows that the SkipRom command is sent followed by a ConvertT command then read scratchpad, but this does not show how to target a specific ROM. Hope this makes sense.



#15139 OneWire ALPHA

Posted by Stuart Crawshaw on 06 July 2011 - 01:09 PM in Beta Firmware and Drivers

Should be right.
As far as I know, yes.

Sorted it, was my fault really.

I had reference the dll for the onewire managed code which resides in the "le" folder where as the test app references the on in the root of the Debug directory.



#15137 OneWire ALPHA

Posted by Stuart Crawshaw on 06 July 2011 - 12:20 PM in Beta Firmware and Drivers

If you go to your project properties, what's the target framework? See this screenshot for what I mean.
Also, to which device does it try to deploy? See this screenshot for what I mean.



Hi,

Checked that as you advised and the Target is 4.1 (i have uninstalled the 4.2 SDK and installed the 4.1 again)
Then checked Deploy device, and it says USB > Netduino_netduino.

I might try re-flashing again:

To confirm, i am ok to use the 4.1.0.6 TinyBooter for use with the 4.1.1 Beta 1 with CW's OneWire FW? If not where can i download the correct booter image (its hard to find downloads for the different versions on here :P )



#15134 OneWire ALPHA

Posted by Stuart Crawshaw on 06 July 2011 - 12:00 PM in Beta Firmware and Drivers

The 24LC256 is tested successfully. I think the signal is the same but you won't harm a thing by trying I suppose ;)


Ok sounds good to me. So on your recommendation (at least until 4.2 makes it to release, and if the powers that be roll a version with one-wire) i have downgraded to the 4.1.1 FW attached to this thread.

But now, i cannot deploy anything to it... I just get a message stating:

Error	1	An error has occurred: please check your hardware.



#15123 OneWire ALPHA

Posted by Stuart Crawshaw on 06 July 2011 - 09:17 AM in Beta Firmware and Drivers

Do you have an example IC? I used a 24LC256 EEPROM with success on a 4.1.x Netduino.


I believe This one is in the same family. You mention using it successfully? Did you use commands such as Random Read (Figure 7.2) as this requires a repeated START signal?



#15120 OneWire ALPHA

Posted by Stuart Crawshaw on 06 July 2011 - 08:52 AM in Beta Firmware and Drivers

HI Stuart,

An I2C EEPROM also works on 4.1.x firmwares. Code sample can be downloaded at http://forums.netdui...e-i2cbus-class/


Even the ones where repeated START signals are required?



#15104 OneWire ALPHA

Posted by Stuart Crawshaw on 06 July 2011 - 01:34 AM in Beta Firmware and Drivers

The 1-Wire firmware is built with the 4.1.1 Beta 1 FW already. Were you testing the 4.2.x FW? As I understand it, the reason you have to have the 1-Wire support in the firmware is because 1-Wire communication is too fast for the managed code to handle.

-Valkyrie-MT


Hi,

Yes i am running the 4.2.x FW. I originally wanted to know if the OneWire limitation was for paracitic mode only, but you have answered that question for me.

But yes, it does seem that the managed code is too slow for onewire to be used without native support.

the reason i want to use the 4.2.x FW is its I2C support as i want to include an I2C EEPROM chip i have to save user settings (such as high temp thresholds etc for a thermostat type setup).




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.