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.

Coding Smackdown's Content

There have been 72 items by Coding Smackdown (Search limited from 28-April 23)


By content type

See this member's


Sort by                Order  

#20973 Netduino for beginners - Gentle introduction with basic electronic project

Posted by Coding Smackdown on 25 November 2011 - 03:52 PM in Project Showcase

Hello,


Thank you for the nice work.

I am a teatcher also, and I would like to know how did you do that nice Netduino Views to how the wiring connections? Do you use any CAD model or image you could share?

Thank you,



Igor.


You can get those nice breadboard images using a tool called Fritzing. Its a free tool that you can down load from http:// www.fritzing.org

It also gives you the ability to view the schematic and a PC Board of the circuit as well.

Cheers

Jim Lavin



#20974 Digital I/Os during power up

Posted by Coding Smackdown on 25 November 2011 - 04:14 PM in Netduino 2 (and Netduino 1)


Later in this tutorial I also will describe how one can use FET/MOSFET, DIOD or Transistor NAND as well as NAND TTL IC to achieve same.


Wouldn't an XOR Gate work better than a NAND Gate? I would think you would only want a high output when the two input are different. So if the Netduino board sets all pins to high at reset you could hook up one input to the Netduino pin you are going to use as a switching signal and the second to positive voltage. This way when the board resets both inputs would be high and the output would stay low. Then once your application starts you could drive the Netduino pin low to get a high output from the XOR Gate thus providing the voltage required to allow current to flow through the transistor.

Or do I have my logic backwards and you need the NAND gate to keep the signal high so there is not enough difference at the base of the transistor to allow current to flow?

Regards,

Jim Lavin



#20975 Digital I/Os during power up

Posted by Coding Smackdown on 25 November 2011 - 04:24 PM in Netduino 2 (and Netduino 1)

Looking at the specs for both a NAND Gate and XOR Gate I think I answered my question. They both give you a high output when the inputs are different. The only difference is that the XOR Gate does not give you a high output when both signals are the same where as the NAND Gate will give you a high output if both signals are low. So I guess you could use either type of gate. Regards, Jim Lavin



#20983 Total Newbie Temperature Project

Posted by Coding Smackdown on 25 November 2011 - 10:18 PM in General Discussion

Are you planning on doing temperature monitoring or temperature control?



#21000 simple put to localhost confusing

Posted by Coding Smackdown on 26 November 2011 - 02:27 PM in Netduino Plus 2 (and Netduino Plus 1)

You have to remember that a web server will only answer requests on the port that you configure it for. If you only have the server configured to listen on the default port which is port 80 then your request will fail on port 8080. To get the web server to respond on port 8080 you need to configure the web server to listen on other ports. If you double check the Apache docs, they should show you how to configure the web server to listen on additional ports. Otherwise, just don't try the request on port 8080.



#21010 NeonMika.Webserver

Posted by Coding Smackdown on 27 November 2011 - 03:51 AM in Project Showcase

Markus, I've pulled down your code and have been trying to use it for an interface to a temperature logger that I'm building. The concept really fits into what I need, however I've noticed that after running for a couple of minutes it seems to be going off into nowhere and never answers. I'm running under the .NetMF 4.2 RC3 firmware, so I'm not sure if it is the newer firmware or maybe the code. Have you run into anything like this or does it run without issue for you? Just trying to figure out where I should be spending my time trouble shooting. Thanks



#21023 NeonMika.Webserver

Posted by Coding Smackdown on 27 November 2011 - 03:36 PM in Project Showcase

Are you running in debug mode?
There you can check if incoming requests get ignored...
Probably you get a outofmemory-exception?

I sometimes had the problem that it just worked fine for a time and then it stopped receiving requests, i will look into that as soon as i have time :)

It mustbe something in the Server-class' Listening loop...
Probably you can find an error there (about 20 lines of code)...

Greets


Markus,

It is not throwing an exception of any kind, but I think you are right with it running out of resources. I was playing with the server listening loop and did make some changes and now it runs without issue. Let me spend some time comparing my changes to the original code and I'll post an issue to the codeplex page.

I also made some changes to the Handle Request method and changed from an array list to a hashtable to speed up request processing. I'll also post those changes as well.

Thanks,

Jim Lavin



#21025 Analog reading accuracy

Posted by Coding Smackdown on 27 November 2011 - 03:38 PM in General Discussion

Did you try the usual methods to stabilize the voltages, like in http://highfieldtale...highfieldtales/ - connect aref to 3v3 via a inductor, use a (fast) capacitor between aref and ground and a "big" one between 3v3 and ground?


Stefan,

That is a really good article, I never realized how much noise was going on. Being pretty rusty with electronics do you have a sample schematic that shows what your final solution was to filter out the noise?

Thanks,

Jim Lavin



#21028 NeonMika.Webserver

Posted by Coding Smackdown on 27 November 2011 - 04:52 PM in Project Showcase

Markus, I've posted the differences out on codeplex for you. Hopefully they'll be of help. Cheers, Jim Lavin



#21049 NeonMika.Webserver

Posted by Coding Smackdown on 28 November 2011 - 01:04 AM in Project Showcase

I think it had to do with the client socket not being closed after the request.



#21093 Total Newbie Temperature Project

Posted by Coding Smackdown on 29 November 2011 - 04:40 AM in General Discussion

got my netduino today, but can't look at it until Thursday (homework and a major release at work). Im sorry im such a newbie, but from the tutorials Ive looked at I was going to feed my sensors from the 3.3v output on the netdiuno, is this not what i should be using to power it?

Also if i were to power LED's from the netduino, which size resistor do i need to step down the 3.3v port? 1/2 watt 68Ohm? Anyone know of a good tutorial link for doing basic things with LEDs?

Thanks!


I've got several TMP36 sensors running off of the 3.3V supply. I think if you were going to say multiplex a lot of sensors then you might want to look into a different power source, but you should be OK.

If you want a good tutorial that covers LEDs check out the Netduino for Beginners post in the General Discussion area, its really good.

I'm finishing up a temperature monitoring project for my walk-in fermenter that has a web based interface. Once I have it all complete I'll post it to the forum to give you some ideas.

Cheers



#21104 NeonMika.Webserver

Posted by Coding Smackdown on 29 November 2011 - 01:22 PM in Project Showcase

I'm doing something similar by using jQuery to post data back to the server. First I added additional pin types to the Pin Management class, then I added a couple of new request methods like Markus discussed. I then have web pages that can be returned from the server which contain my user interface which have jQuery methods that send the request back to the server to be processed and return the results. This way I can interact with the Netduino however I wish, I can even use this method to set the time and network settings on the device. You just have to be careful about how much functionality you try to shoehorn into the device since memory is pretty tight. To build my temperature controller complete with logging and history charts I end up with about 30K worth of code when all finished. That included a complete library to send back JSON formatted data. You can do quite a bit.



#21105 NeonMika.Webserver

Posted by Coding Smackdown on 29 November 2011 - 01:29 PM in Project Showcase

Markus, I had to add code to handle the HTM and HTML file types to the extension handler so it would return the proper MIME type. It seems if you request index.html from the server it was always coming back as application/octetstream instead of text/html. I also added a JSON request handler that uses a JSON library to return requests in JSON format. Let me know if you want me to post the code for you to include. Cheers,



#21110 Lightweight JSON parser

Posted by Coding Smackdown on 29 November 2011 - 03:30 PM in Project Showcase

Thanks Fabien,
I figured system.Net was not the way to go and have been playing with the NetMF WebRequest instead.
The page I need to collect is a simple 4k xhtml - so I could write a very basic XML parser (the tags etc will be consistent)

system.XML is of course too big for the NetduinoPlus too - so I was hoping you had an example where you were using your JSON parser with a simple web request that worked on the Netduiino (I assumed that you already had this code)

Thanks for the reply - it was infact helpful and has pointed me in a new direction (did not consider using the SD for storage)
The clases in KloutKlock definitely open some new options - so I'll see how i get on and post back - thanks for the help


I've gone down the route your suggesting and even with a bare bones XML parser you'll be bouncing up against the memory constraints of the device. If you can get something even simpler to parse you'll be much better off.

Sometimes even though you love a device it may not be the right thing for the job and you may need to pick a device that has the capabilities you need. I originally wanted to use the Netduino Plus for a print agent that would pull XML from a service and dump it out to a receipt printer, but by the time I got web request and xml parsing coded I didn't have enough resources to do the IP based printing.

If you really want to use the device you may have to rethink how you'll get the data and process it in order to keep within the constraints of the device.

Regards,

Jim Lavin



#21129 What's the best component for switching AC Power

Posted by Coding Smackdown on 29 November 2011 - 10:22 PM in General Discussion

I'm in the process of building an Electric Homebrewing system and I am planning on using the Netduino as the process controller. This means I'll need to use the outputs from the Netduino to turn on and off 120V and 240V AC devices, mostly motors and heating elements based on temperature readings. I've built the control interface and have the temperature monitoring circuit and code working just fine, now I'm ready to build out the power switching circuits and add the code to control the power to the devices. I've purchased some nice T9AS5D22-12 30 Amp 240V AC board mount relays, but was wondering if this was overkill. I'm needing to power one 120V 15 AMP Pump and one 5500W 240V electric heating element. Could I get away with some heavy duty power switching transistors or would it be safer to stick with the relays? I've looked at the BrewTroller boards which are built for the Arduino, but can't quite figure out what they are using to perform the switching. Any ideas what would work best? Thanks



#21130 Boost Application Memory by 10-15%

Posted by Coding Smackdown on 29 November 2011 - 10:26 PM in Netduino Plus 2 (and Netduino Plus 1)

Valkyrie-MT, I applied your change and got another couple of KBytes back on my app. It really helps to be able to squeeze memory from different places when you are trying to shoe horn in a lot of functionality in an app. Thanks!



#21157 What's the best component for switching AC Power

Posted by Coding Smackdown on 30 November 2011 - 02:02 PM in General Discussion

Magpie, You are right about it being in the spirit of brewing your own beer. If I'm too damn stubborn to buy my beer off a shelf at the bottle store, why would I not make my own components. I appreciate the good advise. I do not plan on cycling the pump on and off, it will be on for 60 to 90 minutes when I recirculate the mash and then on for 20 to 30 minutes when I use it to push cold water to cool the wort. However I believe the heating element will be cycled on and off quite a bit as I try to maintain a constant temperature between two thermocouples during the mash which lasts for 60 to 90 minutes. During the boil the heating element will be on all the time which could go as long as a couple of hours.



#21174 NeonMika.Webserver

Posted by Coding Smackdown on 30 November 2011 - 05:29 PM in Project Showcase

Thanks for updating the code stream. I'll be pulling down the updates and testing it out.



#21192 What's the best component for switching AC Power

Posted by Coding Smackdown on 30 November 2011 - 11:35 PM in General Discussion

Magpie, I actually had drawn up my original circuit based on that exact diagram, I guess I got a little carried away thinking that maybe I was being too cautious. But looking at the specs on the Brew Trollers, their relays are only handling 10A at 240V, so my 30A at 240V should be more than safe enough. Now I just have to spend a fortune on water tight connectors and all of the rest of the hardware. The money I spend on my toys is outrageous!



#21199 Web Based Temperature Logger

Posted by Coding Smackdown on 01 December 2011 - 02:23 AM in Project Showcase

Hey everyone, Thought I would share my latest project with everyone. I'm building a process control system for an Electric Brew System. So to help me vet out all of the functionality I've been putting it together a piece at a time. To start with I wanted a nice web based user interface that would allow me to configure and monitor the mash, boil and cooling profiles of the entire brewing process. So I started off with the web-based user interface and the temperature monitoring since that is probably the simplest part of the entire process. So the solution so far has been a cobbling together of several libraries: Thanks to Markus VV and his NeonMika.Webserver project over at http://neonmikawebserver.codeplex.com/ I had a really quick time of putting together a JSON based control interface that would allow me to configure the temperature logging parameters as well as monitor the temperature using a couple of jQuery plug-ins. All of the files used by the interface are stored on the SD Card. The initial load of the page is a little slow, but I'm pulling down about 20 files in all, along with live data requests to get the current temperature, the temperature history and the settings. I incorporated a NETBIOS Name Resolution library and NTP Client library from Nicholas3 over at http://code.tinyclr.com which allowed me to make the Netduino Plus reachable by name across the network while using DHCP as well as update the system clock without having to resort to adding a Real Time Clock. I also incorporated a JSON generation library by Wouter Huysentruit over at http://code.tinyclr.com to extend the NeonMika.Webserver to quickly send back my data in JSON format. The temperature probe I built was based on a ADA Fruit tutorial on how to interface the TMP36 Temperature sensor to an Arduino. I also placed a 1uF capacitor across the 3.3V and Ground as well as a 1mH inductor between 3.3V and ARef to help cut down on some of the noise I was seeing from the Ethernet port. My original readings were back and forth across several hundred millivolts when I was taking readings very close to each other and the great advice that the folks in the forums had about this problem really helped me to cut down most of the noise. You can find a great discussion on the topic at http://forums.netdui...ading-accuracy/ But just to be safe all of the temperature readings are based on an average of 100 reads, this really seemed to help smooth out the readings even more. I've attached a couple of screen shots of the User Interface and of the very simple temperature probe circuit and schematic. I'm in the process of building out a quicky shield and cutting up a project box so I can have everything in one nice to handle box about the size of a cellphone. Once I'm done with the construction I'll post some pics of the final logger in its case. Enjoy!

Attached Thumbnails

  • Index.png
  • Settings.png
  • breadboard.png
  • schematic.png



#21222 General Listing of Netduino Resources

Posted by Coding Smackdown on 01 December 2011 - 03:22 PM in General Discussion

I was wondering if anyone had a comprehensive list of Netduino Resources such as blogs, videos etc. Thanks



#21233 General Listing of Netduino Resources

Posted by Coding Smackdown on 01 December 2011 - 08:48 PM in General Discussion

I've amassed about 50+ sites that have .NET MF related blog posts, code, and circuits. They are not all Netduino related, but I use them day to day in my development. My list is a lot like Pete Brown's geek list, I'll spend some time breaking them out into various categories and update the Wiki with them. Thanks Guys!



#21242 Total Newbie Temperature Project

Posted by Coding Smackdown on 02 December 2011 - 05:18 AM in General Discussion


My temp readings are all over the place. Can someone please double check my setup?


I experienced the same thing. You are probably experiencing some noise from the Ethernet interface.

There is another thread in the forum that discusses the issue in some depth.

http://forums.netdui...ading-accuracy/

It is best to hook a .1uF capacitor between 3.3V and Ground to help drop some of the noise. If that doesn't work add a 1mH inductor between the ARef port and 3.3V.

I still had a lot of noise from the senors so I ended up performing 100 reads of the port and then averaging the reading:

int totalReads = 0;

for(int x = 1; x < 100; x++)
{
totalReads += Port.Read();
Thread.Sleep(10);
}

float reading = totalReads / 100;

This seems to work pretty good and is pretty fast for normal monitoring. It may not be the best performance wise, but you can vary the number of reads until you get a good smooth value back.

BTW: Are the two outer leads of your sensor actually hooked to anything? Your circuit looks strange since the two side rails on my breadboard do not have any connection to the inner holes. Try moving the pins over to the first set of holes that your leads are connected to and see if that makes a difference. Take a look at the breadboard diagram I did of my circuit here http://forums.netdui...erature-logger/ the TMP36 is pretty much pin compatible with the LM35.

Cheers!



#21256 Dear Netduino developers, where are you from? :)

Posted by Coding Smackdown on 02 December 2011 - 01:15 PM in General Discussion

Nevyn, Don't feel bad I resorted to buying a magnifying lamp this summer so I could read the letters on my components plus I have to use my multimeter to read my resistors.



#21278 How to set a static ip address?

Posted by Coding Smackdown on 03 December 2011 - 12:27 AM in Netduino Plus 2 (and Netduino Plus 1)

If you are wanting to do it from within your program check out this post It talks about the NetworkInterface Class that allows you to manipulative the network settings on the Netduino Plus. http://forums.netdui...uration-options I'm getting ready to update my Temperature Logger to provide full network address configuration from within my web-base GUI. Once I finish the updates I'll post back here so you have an example.




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.