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.

Magpie's Content

There have been 156 items by Magpie (Search limited from 03-May 23)


By content type

See this member's


Sort by                Order  

#30421 RC5 I/O problems

Posted by Magpie on 08 June 2012 - 11:28 AM in Beta Firmware and Drivers

HI Dave But I could no longer see the SecretLabs Libraries so I assumed stupidly that they had rolled them into the Spot libraries. I am just installing the latest SDK now. Thanks for putting me on the right track. Yeah, all back up and running, no code changes thankfully.



#30419 RC5 I/O problems

Posted by Magpie on 08 June 2012 - 10:31 AM in Beta Firmware and Drivers

Hi I have recently upgraded to RC5 but I can't get some basic functionality to work.


AnalogInput analogInput1 = new AnalogInput(Cpu.AnalogChannel.ANALOG_0);
    	AnalogInput analogInput2 = new AnalogInput(Cpu.AnalogChannel.ANALOG_0, 8);

I keep getting the following exception.

A first chance exception of type 'System.Net.Sockets.SocketException' occurred in Microsoft.SPOT.Net.dll
A first chance exception of type 'System.ArgumentException' occurred in Microsoft.SPOT.Hardware.dll
An unhandled exception of type 'System.ArgumentException' occurred in Microsoft.SPOT.Hardware.dll


Any ideas?

Also does somebody have an RC5 pwm example? I am not sure of the mapping between the Netduino Pin numbers and the SPOT pins.



#26068 How to draw 220V motor

Posted by Magpie on 29 March 2012 - 12:43 AM in General Discussion

I am not sure how your current controller works but to do speed control of an AC induction motor you will need the equivalent of a Variable Speed Drive (VSD). These are prohibitively expensive, so you might have to look at a DC motor. If you have any details of your current motor controller, I would be interested to see what it does.



#25331 Anyone is interested on a high-end acquisition shield?

Posted by Magpie on 10 March 2012 - 01:40 PM in General Discussion

I'm definitely interested. I voted but my answers don't seem to be recorded. 16 bit is definitely enough for me. Stacks of sensors but obviously not all of them can be close to the Netduino. Have you had a look at what GHI is doing with gadgeteer, I am sure that is not what I want personally but the versitility sounds good. I guess if you can work out a list of types of sensors people may want to attach, it would possibly give you a bit of guidance. good luck. Tried it again, it worked.



#46632 Netduino Solar Monitor

Posted by Magpie on 04 March 2013 - 09:30 PM in Project Showcase

Looks great, nice to know what's going on.

 

I think I would rescale your battery display from 20 -30 volts or similar. otherwise it wont move much.




#25535 How much current can you draw from the 5v pin?

Posted by Magpie on 15 March 2012 - 06:00 AM in Netduino Plus 2 (and Netduino Plus 1)

Put one of your video card type heatsinks onto the netduinos voltage regulator chip, that should help.



#25599 Detecting Sensor Type

Posted by Magpie on 16 March 2012 - 08:32 AM in Netduino Plus 2 (and Netduino Plus 1)

Hi Mohammad The short answer is no. Generally when you put together a circuit you know what you are connecting, so it is not necessary. Usb devices do have a discovery mechanism but I am fairly sure the Netduino usb connector cant be configured as a usb host anyway. Maybe if you give us more specific information about your needs there might be another way to do it.



#42542 n00b VB vs C# for dev of a basic sensor monitoring app w networking?

Posted by Magpie on 01 January 2013 - 01:51 PM in General Discussion

Really for the language differences, it comes down to in C# things need to be explicit and VB things are implicit.

I strongly prefer C# because it is explicit, most decisions are ones that you instigated, whereas in VB you get a more stuff that happens when you didn't actually want stuff to happen.Therefore lots of weird errors.

Also in VB you have to write Dim too many times.

 

One advantage of VB is the For Next loop operators seem to work more easily with the iterators.

 

That's my 2c.




#25763 Sharing code between projects

Posted by Magpie on 20 March 2012 - 10:49 AM in Visual Studio

Scrub that, I misread the question.

So some of your source code is identical, in both types of projects, so you only want to maintain one copy of it. Is that what you want?

You definitely can't share the compiled code, but I don't think there is any reason that you can't share the source code, if you can get it to compile in both types of projects. You might have to use a lot of ifdefs or whatever C# has for conditional compilation.

I think you would be better off having two solutions and cutting and pasting any similar code.
That way you can have two instances of visual studio and can debug both at the same time.



#25332 CT Sensor help please!

Posted by Magpie on 10 March 2012 - 02:01 PM in General Discussion

Hi Emg I did a quick calc, and it looks like you will get 0.33 * 0.17 / 5 = 11 millivolts rms out of you current sensor when your pump is running. By the time you rectify this with a silicon diode, I would imagine you have 5/8 of F all. If it's going to be a permanent fixture you could tap into the circuit somewhere and measure the voltage. With safety being a priority of course. This might be enough for your purposes. The main trouble with the clip on current sensors is the primary being less than one turn. So you dont get much output whatever happens. The other thing that you may or may not realise is that you only put one conductor through the current sensor, otherwise they cancel. ie. leave the neutral and earth out of it. This would involve stripping away the sheath, which is probably illegal in your country as it is in mine. I suggest another approach. Cheers.



#28616 .net micro framework windows form

Posted by Magpie on 07 May 2012 - 06:31 AM in Netduino Plus 2 (and Netduino Plus 1)

Hi

I think Eppetiano is asking about the first one, a pc client.
You just use visual studio to make a Windows Form application, that runs on your PC.

So you need to make two solutions
Your netduino solution which captures the data and communicates.
And your windows form solution with runs as an exe on your pc, displays data and communicates.

You have to have some sort of communication protocol common to both solutions to transfer the data between the Netduino Plus and the Form application.

You could use XML over http.

I think Neon.Mika webserver would have an example of this.











#25928 [UK] Electrical Supply help

Posted by Magpie on 24 March 2012 - 12:21 PM in General Discussion

Yes I did see you said undervoltage, I just made a big presumption that only overvoltage will take out the light globes. Anyway hopefully you have found the cause of your troubles. Good Luck



#25924 [UK] Electrical Supply help

Posted by Magpie on 24 March 2012 - 11:38 AM in General Discussion

Hi Do you have smoke alarms? If you dont you should get some, even though they are annoying. Like Mario I find it difficult to see how a blowing light bulb would take out a circuit breaker. I am not saying it didn't happen but it's hard to understand. The only reasons I can think of for overvoltage on your mains are line surges or a broken neutral. Broken neutrals I would say are quite uncommon but can have serious consequences. If you ring up your supply Authority and say you suspect you have a broken neutral they might come and inspect for free. Can you get a second sparky in to verify the safety of the installation, especially the neutral and the earth connections, don't get the first one he may be dodgy, I would say it might be two hours work. Otherwise can you just turn off any dodgy circuits, at the switchboard and see if the rest of the house is ok? I wouldn't be getting the multimeter out unless you know what you are doing, and you are in a clear state of mind.



#31141 Multithreaded Webserver and DataLogger

Posted by Magpie on 23 June 2012 - 01:01 PM in Project Showcase

Hi Frankie
I'm really glad you managed to find some use for the code, hope you make something really good with your project.
I know how hard it is to use somebody elses code, so that fact that you can use code from an unfinished, poorly documented project, mean that at least my attempt to write reusable code must be partially working.

Here is my liability waiver, It was a work in progress that got stalled because I couldn't get it right, then ran out of program memory.
I didn't mean to put it out to general view until I had fixed the bugs, done the binary upload and rearranged it neatly.

4.2 RC5 should give that extra space. But I was a bit disappointed that I still have a memory leak, so maybe it is my code.

My logger is still actually running but I have to cycle power as it crashes every 10 days or so due to the memory leak. I am fairly sure it is to do with being on the Internet because it used to run for over a month before I opened my gateway for it.

I still cant finish the Webserver/Logger due to my limited amount of time, but if you want to mention any bug fixes you see in the code then go ahead.

Biggest challenge so far was getting the multithreaded hardware calls synchonised to the hardware implementations, making sure the same relays doesnt get triggered by 2 requests at the same time.


Just use a lock for Thread synchronisation. I view any hardware as a resource and therefore because you can have multiple callers on different threads one has to wait for the other to complete.
I do love the challenges of multithreaded apps, fun to debug.


For handeling the webrequest that have no mimetype and are skipped by the webservice ive created a factory(mapper) that has all the availeble implementation for the hardware in the form of handlers stored in an hashtable.
All i have now are a relay handler and a logginghandler loaded in the hashtable.
I use a switch statement to find the correct handler based on the url fragments and then invoke doWork on the handler. I provide the doWork method with a string array of urlfragments. So all the implementation logic like calls to the hardware resides in the handlers. Ive created an interface for the handlers and a baseclass for the general work.

You seem to be making a real webserver.
I know I should use JSON in projects but I tend to use XML due to my familiarity.

psps: fixing the n+ crash when using too much requests is easy by upgrading the firmware.. theres a bug crashing the n+ with an outofmemory exception in the 4.1 firware when theres plenty of memory left

I don't quite follow, I haven't really tried 4.1. I have tried 4.2 RC3,4 and 5 no joy for me here.

I love the language C# I just wish one day in the future we could have a Jit compiler on the Netduino.



#26123 AnalogInput Repeatability

Posted by Magpie on 30 March 2012 - 05:43 AM in Netduino 2 (and Netduino 1)

I suspect its is noise on your voltage reference. I have got best results using a dedicated Voltage regulator into Aref. Use Vin as your input and ARef on your output. You also need a load resistor so that the voltage regulator's minimum drive is satisfied. (around 1k?) If you have a 7805 you could pad the output down to 3.3v using resistors before putting into AREF. ps. You will need a line of code to use ARef as well. Sorry gotto go. It's beer o'clock.



#25598 Multithreaded Webserver and DataLogger

Posted by Magpie on 16 March 2012 - 08:11 AM in Project Showcase

Thanks for that message H07R0D I''m really pleased you can use it, even in its unfinished state. If you see any bugs or improvements, then let me know. I saw your aquarium site, I noticed that you are using similar temperature sensors to me. I am thinking you might want a bit more accuracy. ie. using a ds1820 like many others are using. One thing I found with my LM135s (i think) was I got much better results when I put a voltage regulator output into the ARef pin to stabilise it and also a load resistor. I normally take just one look at git and (not github) and murmur WTF to myself. Normally all I want to do is Check in, check out, revert, update, I think I would need a wrapper around git to provide this. Maybe I have been using SVN too long.



#26288 analog to digital conversion

Posted by Magpie on 03 April 2012 - 12:12 AM in General Discussion

The minimum specifications that you need to decide are: Max input voltage that needs to be measured. Min input voltage that needs to be measured. ( this can be negative) Max allowable error. in volts (error can be due to many things such as noise, resolution, non linearity and more) Number of measurements per second. Number of channels to measure. From these you can calculate your number of bits ADC, but add a couple of bits so that the adc resolution isn't actually the limitation on your error. Also from these someone should be able to suggest your analogue input circuitry and ADC devices. So if you can list answers to these someone may be able to help you further.



#25643 Minimum AnalogInput Read value

Posted by Magpie on 17 March 2012 - 01:28 AM in Netduino Plus 2 (and Netduino Plus 1)

Hi The readings you did looked fine unless of course your software is using Aref. There was a couple more questions you didn't answer. What does your software read. Tied to ground. Also Are you using ARef in your code? The is a setting in code you might have to call.



#25649 Minimum AnalogInput Read value

Posted by Magpie on 17 March 2012 - 10:04 AM in Netduino Plus 2 (and Netduino Plus 1)

Hi Probably the last thing I can think of is for you to post some repro code. If you can post some code that allows people to reproduce this, then I could do a comparison. Also mention any other wiring you might have, Secret Labs firmware version, also are you using ethernet? Sorry you already answered this. Maybe its something called "burden voltage", although it seems very high.



#25606 Minimum AnalogInput Read value

Posted by Magpie on 16 March 2012 - 11:13 AM in Netduino Plus 2 (and Netduino Plus 1)

Hi Spcboog I know I am late on this but I think there are a couple of readings you should try. Tie at least 2 of the "Analogue In" pins to ground each via a resistor say 1k and disconnect the sensor. Measure the following pins with the black probe connected to GND. Vin, 5V, 3.3v, ARef, AGND, and obviously the analogue pins. Tell us what your readings are. What does your software read. Also Are you using ARef in your code? It often pays to double check the obvious.



#25448 Delay or getting stuck at deployment "Preparing to deploy assemblies to t...

Posted by Magpie on 13 March 2012 - 11:09 AM in Visual Studio

Yes using 4.2 rc4 you must cancel deploy before pulling out the usb.



#28636 CAD Software and Board Manufacturer Recommendations

Posted by Magpie on 07 May 2012 - 02:05 PM in General Discussion

I have a 13Meg of Eagle converted libraries, I think they are from Sparkfun.
Occasionally I get a error from the converted libraries, but It gives a line number and all you need to do is delete the offending part of the library.
Remember there are two types of Library, Schematic components (libs) and footprints(mods).
There is a step in KIcad where you have to manually map your components to your footprints, I like the way they do it but others don't.


This link should have most of what you need
Kicad links

There is also a Yahoo groups Kicad usergroup if you need to ask questions, or try

EEVblog a good electronics resource, they have a small kicad section in their forum.



#29315 CAD Software and Board Manufacturer Recommendations

Posted by Magpie on 17 May 2012 - 04:42 AM in General Discussion

I tried Kicad and found it pretty much unusable. It's probably good for very basic stuff, but found it to be lacking functionality.

That is so not true. You just have to follow the one of the video tutorials.
It has quite a few of the advanced features such as real time Design Rules Check, 3d modelling with 3d components.
I guess on your board Dave, you haven't put in the actual 3d models, that is why it is unpopulated.

Kicad has 2 autorouters, one is built in and not very good, the second one goes to a web based 3rd party auto router and I am sure it would be better than any of the other autorouters in the other packages.

But really once you get used to doing the routing it is actually better and quicker to do it yourself.

The best thing about Kicad is that it is open source.
I know I don't need to explain this but I will anyway.

If you are a programmer and you don't like something, you can change it and rebuild it in Windows. ( I must admit I haven't built it myself but have communications with people who do).

To reiterate the good things about open source are:
  • It's free.
  • No licence activation stuff to do.
  • No false limitations.
  • You can make your own changes.
  • You can understand how it works through the source.
  • You can find tricky bugs by going through the source.
  • You can access the actual coders without going through a whole series of hoops designed to protect IP and a companies legal rights.
  • The warm feeling that any help you give the project will go back to other people trying to make there own boards.



#28596 CAD Software and Board Manufacturer Recommendations

Posted by Magpie on 06 May 2012 - 08:30 AM in General Discussion

I like Kicad, I had no success with Eagle, though many people do. No board size or any other limitations. No licensing hoops or serial numbers. You can import all the eagle libraries with a python script. Open source. Whatever you choose I would use source control on your projects and libraries( footprint and schematic) as the occasional wrong button clicked can have many consequences, and most of the files are text based so you can do version comparisons to see what changes you have made. I use subversion.



#46635 Home Automation

Posted by Magpie on 04 March 2013 - 10:30 PM in General Discussion

Hi McInnes Sounds like your going to be busy for a while. I think the biggest hurdle is regulatory, and that is why the prices are ridiculous. this is partly why I went Isolated Extra Low Voltage for my lights. Because in Aus a light doesn't need approval if it is SELV. Once you are in the SELV domain the House wiring rules no longer apply to your wires. Is it just lighting you want to control? Or specific items? Some Power outlets or all power outlets? individually? With lights you probably only need to run the switch wire back to the node. I assume you will want a local light switch too wont you, you can probably run this as SELV to the micro. With power you are going to have a stack of conductors going in the same direction, so they will be de-rated. You might consider a sub distributlon board or two. You can get small contactors wired into your switch board, maybe you could wire up your own sub boards and put the contactors in your self. And get the sparky to connect to mains. Just run the coil wires out to a SELV box or section, where you can attach your driver circuits. Too Easy. (... cough cough) the other thing is light dimming, this can be a bitch with all the different sorts of dimmers (leading, trailing, universal, cfl) and the cfl ones dont work well anyway. But if you have LEDs it is a lot easier. Also think about some fire detectors, I don't know what is best but if you're doing home electronics I think they are good. One in the lab too.




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.