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.

<Jeremy>'s Content

There have been 31 items by <Jeremy> (Search limited from 30-March 23)


By content type

See this member's


Sort by                Order  

#32863 Increasing the resolution of the system timer

Posted by <Jeremy> on 29 July 2012 - 12:27 AM in Beta Firmware and Drivers

Hi again - no luck with the DHT11 after increasing my firmware resolution I'm afraid. My firmware is definitely now running at 375kHz, and the Netduino doesn't seem to be distinctly seeing all 43 pulses for each temperature/humidity reading (usually half that or less). Oh well. (This is of course just on my system - other people's mileage may vary.)



#32859 Increasing the resolution of the system timer

Posted by <Jeremy> on 28 July 2012 - 11:31 PM in Beta Firmware and Drivers

Hi CW2 - thanks for this, I just saw this reply, sorry for not replying sooner! I'll try it and let you know how I get on, Jeremy



#32432 Netduino Firmware v4.2.0 RC5 (Netduino + Netduino Plus)

Posted by <Jeremy> on 21 July 2012 - 06:26 PM in Beta Firmware and Drivers

Thanks Chris, that's great. Jeremy



#32410 Netduino Firmware v4.2.0 RC5 (Netduino + Netduino Plus)

Posted by <Jeremy> on 21 July 2012 - 09:56 AM in Beta Firmware and Drivers

Is there anywhere I can download the source for this firmware? I've seen a couple of other people post this question but I haven't seen an answer. Or is the firmware source not going to be released until it goes gold? Thanks Jeremy



#32361 Increasing the resolution of the system timer

Posted by <Jeremy> on 20 July 2012 - 03:18 PM in Beta Firmware and Drivers

Hi there I've built this firmware with the changes to the 'slow clock' time, but I'm not seeing any improvement in performance in my DHT11. Is there a command to query the Netduino properties to find the slow clock time? I just want to check that my new binaries actually have this change built into them. Thanks, Jeremy



#32272 This looks like a bug in InterruptPort

Posted by <Jeremy> on 19 July 2012 - 09:08 AM in General Discussion

Hi BitFlipper - thanks for replying, that's useful information anyway. My issue sounds possibly related to yours. I've a sensor sending 43 bits of information, and the Netduino only picks up around 30-40 - I've found that it "loses" interrupts in the middle of the signal. I'll keep looking for a solution :) Thanks again, Jeremy



#32239 This looks like a bug in InterruptPort

Posted by <Jeremy> on 18 July 2012 - 10:56 PM in General Discussion

Hi BitFlipper Could you confirm if the fix in .NET MF4.2 for issue 1073 (http://netmf.codeple...m/workitem/1073) actually solved the problem for you? I'm coming across a similar InterruptPort issue myself and just wanted to check if your issue was resolved by the change. Thanks! Jeremy



#32238 DHT11 Temperature Sensor

Posted by <Jeremy> on 18 July 2012 - 10:38 PM in Netduino 2 (and Netduino 1)

The short answer is that I am sure the interrupts are being lost in the middle of the signal. Longer answer - I've been writing the values of pulse durations to the console, and one example is below: 1(7893120) // presence pulse 1(207573) // presence pulse 1(1707) // presence pulse 0(853) 0(853) 1(1067) 1(1280) 0(853) 0(854) 0(640) 1(1280) 0(853) 0(640) 0(853) 0(854) 0(640) 0(853) 0(853) 0(640) 0(854) 0(853) 0(640) 1(6187) // suspect 0(640) 0(853) 0(853) 0(640) 0(854) 0(853) 0(640) 0(853) 1(1280) 0(854) 0(640) 0(853) 1(1280) 1(1280) 1(1067) 0(0) // never populated 0(0) // never populated 0(0) // never populated 0(0) // never populated 0(0) // never populated (Timing values in ticks are in brackets for the 43 positions, preceded by the corresponding derived logic values.) So you can see that the netduino only reckons there were 38 falling egdes - the last five positions in the array have empty timing values because they're never populated by an interrupt event. At edge 23, it believes the length of the pulse is 6187 ticks. This is why I believe that the interrupts are being lost mid-stream, rather than at the beginning or the end. My guess is that is actually 6 successive pulses of length 1280 + 854 + 1280 + 1280 + 853 + 640 being rolled into one, but I can't tell what order (I guess it should end up being 101100). So the 5 bytes I actually try to process are: 00110001 00000000 // 49 Relative Humidity - about right 00010000 00001000 // 2064 degrees Celcius - bit warm 11100000 // checksum indicates the numbers are wrong And I think the 5 bytes I should be processing are: 00110001 00000000 // 49 Relative Humidity - about right 00010110 00000000 // 22 degrees Celcius - about right 01000111 // checksum indicates numbers are right So I'm not sure if this related to the FIFO change to the interrupt queue - but I'm not sure that I understand how that change fixes BitFlipper's issue 1073 either! Might this be a new bug? Jeremy



#32207 DHT11 Temperature Sensor

Posted by <Jeremy> on 18 July 2012 - 04:22 PM in Netduino 2 (and Netduino 1)

Hi there I've been working on a DHT11 as well - I wonder if the the problem is interrupt information going missing from the queue. Basically I've tweaked CW2's code on my development machine to look at the DHT11 signal in a different way - as each falling interrupts edge comes through, I put the number of ticks since the last one into an integer array. If the number of ticks is greater than the BitThreshold, then it's a 1 - less than the BitThreshold means it's a 0. So according to the datasheet (and my experimentation), we should expect 43 trailing edges in a complete signal (3 during the initial handshaking, and then 40 for each bit of temperature/humidity/checksum information. (For my Netduino, 640/853/854 ticks represents a logic 0, and 1067/1280 represents a logic 1. This pattern is very consistent on my hardware, but YMMV.) Under Netduino firmware 4.1.0.6, I usually saw 43 trailing edges before communication stopped, but sometimes saw 42 - it seemed to lose one bit of data around position 23 for me. The failing position would usually have a value like 2560 ticks, which I guess meant it was two logic 1s that run into each other. So I think that somehow the falling edges are not being queued correctly. I've just updated my Netduino to firmware version 4.2.0.0 RC5, and now I'm only seeing a max of 30 - 40 falling edges before communication stops. Does anyone have any thoughts on this - is it a problem that's been solved? Or is there a maximum number of interrupts that can be queued in the buffer before it overflows? Or should I be posting this question in the 4.2.0.0 RC5 Firmware Beta page? :) Thanks for any help! Jeremy



#21554 HMC5883L Magnetometer Netduino Code

Posted by <Jeremy> on 10 December 2011 - 06:10 PM in Project Showcase

Hey willgeorge No problems at all! I'm really glad you were able to use it :) Jeremy



#19056 Help porting Arduino code for FM radio module

Posted by <Jeremy> on 11 October 2011 - 10:55 PM in General Discussion

You've got me interested in this breakout board again, I think we can improve the Programme Service Name code a little - in the PrintRadioName method, I put the RDSB value and text into a DictionaryEntry object, but I think it would be better to store

( (this.Si4703_Registers[RDSB] & 0x00FF) & 0x3) * 2;

So this time, each of the pairs of letters will be associated with the numbers 0, 2, 4, and 6, and therefore you can determine the correct order of the letters and what letters come first.

Jeremy



#19054 Help porting Arduino code for FM radio module

Posted by <Jeremy> on 11 October 2011 - 09:37 PM in General Discussion

Hi Ken - excellent news! I'll update my code here as well, I'm happy you've found how to make it better :D

What might be interesting to you as well is if you want to see the radio text information, you can use

if ((this.Si4703_Registers[RDSB] >> 11) == 4 || (this.Si4703_Registers[RDSB] >> 11) == 5)
            {
                int Ch = (this.Si4703_Registers[RDSC] & 0xFF00) >> 8;
                int Cl = (this.Si4703_Registers[RDSC] & 0x00FF);
                int Dh = (this.Si4703_Registers[RDSD] & 0xFF00) >> 8;
                int Dl = (this.Si4703_Registers[RDSD] & 0x00FF);

... and convert to ascii, and then the rest of the code goes here, with minor modifications :)

That's an interesting question about the two boards from one Netduino. I don't know enough about the I2C protocol right now to answer that unfortunately. If you've got two FM boards (even if the first one is only partially working) you might be able to try it, but I guess you might have to revisit the original code and try to eliminate static variables. I don't know how two devices with the same device identifier on the same I2C pins would work - I'd guess it would conflict, because the netduino can't determine which device to talk to at any one time? But it's just a guess.

Cheers,
Jeremy



#19047 Help porting Arduino code for FM radio module

Posted by <Jeremy> on 11 October 2011 - 08:08 PM in General Discussion

Hey Ken

Try this, it's only a proof of concept I put together in 20 minutes, so it's not good code or even remotely robust, but it'll get you started I hope:

Add "using System.Collections;" to the Si4703 class I uploaded before.

Also add this code to the same class.

public string PrintRadioName()
        {
            int j = 0;
            string token = "";
            string fullRadioName = "";
            while (true && j < 500)
            {
                j++;
                this.ReadRegisters();
                if ((this.Si4703_Registers[Si4703.STATUSRSSI] & (1 << Si4703.RDSR)) > 1)
                {
                    var radioNameSoFar = this.ReadRadioName();
                    if (radioNameSoFar != null)
                    {
                        if (token != (string)radioNameSoFar.Value)
                        {
                            token = (string)radioNameSoFar.Value;
                            fullRadioName += radioNameSoFar.Value;
                        }

                        if (fullRadioName.Length > 16)
                        {
                            return fullRadioName;
                        }
                    }
                }
            }
            return string.Empty;
        }

        public DictionaryEntry ReadRadioName()
        {
            if ((this.Si4703_Registers[RDSB] >> 11) == 0 || (this.Si4703_Registers[RDSB] >> 11) == 1)
            {
                int Dh = (this.Si4703_Registers[RDSD] & 0xFF00) >> 8;
                int Dl = (this.Si4703_Registers[RDSD] & 0x00FF);

                int infoOrder = (this.Si4703_Registers[RDSB] & 0x00FF);

                var radioName = new System.Text.UTF8Encoding();
                byte blockerrors = (byte)((this.Si4703_Registers[STATUSRSSI] & 0x0600) >> 9); //Mask in BLERA

                DictionaryEntry d;

                if (blockerrors == 0)
                {
                    if ((Dh >= 32 && Dh <= 127) && (Dl >= 32 && Dl <= 127))
                    {
                        var radioChars = radioName.GetChars(new byte[] { (byte)Dh, (byte)Dl });
                        d = new DictionaryEntry(infoOrder, "" + radioChars[0] + radioChars[1]);
                        return d;
                    }
                }
            }
            return null;
        }

And call the "PrintRadioName" method after you tune to a radio station with a strong signal. If there's something there, it should return it into a string variable. I was able to get some RDS information with this, so hopefully it'll work in your part of the world too. Anyway, give it a try and let me know what happens.

Jeremy



#18868 Help porting Arduino code for FM radio module

Posted by <Jeremy> on 06 October 2011 - 12:32 PM in General Discussion

Hi Ken To be honest, everything you've put in the last post pretty much covered I've got at home on RDS. Certainly I think your code looks ok - I've found that some channels initially report 'No RDS', but if I poll for a few seconds like in the Arduino code, the RDS comes up. Have you tried polling, say for 60 seconds to see if anything appears in the RDS registers? Jeremy



#18853 Help porting Arduino code for FM radio module

Posted by <Jeremy> on 06 October 2011 - 10:20 AM in General Discussion

Hey Ken Well done, and 54 out of 75 is higher than anything I got out in the wilds of the countryside! What I found with the RDS was that I had to tell the device to listen for it for a while. I've written some proof of concept code for it, but as I said before it's a bit of a tangled mess, but it definitely gets text out of the signal. I'll look at the code again this weekend and have a go at tidying it up - but as I remember, the process is: 1. Look at the RDS bit after tuning to a strong channel - keep polling until it until it indicates there's RDS data. 2. When it finds there is RDS data, look at the RDSA, RDSB, RDSC and RDSD registers (details are in data sheet). 3. First look at the RDSA register, shift by 11 bits, if it equals 0 or 1 then it's the station name, if it's 5 or 6 then it's the station information. 4. If you're looking at the station information, then look at the values of the RDSD register - split the dataword into two bytes, convert each from a byte to corresponding ascii character. 5. If you're looking at the station information, then look at the values of the RDSC and RDSD register - split the two datawords into four bytes, convert each from a byte to corresponding ascii character. 6. Build up consecutive letters to make up the station name and information. I've found that station name only ever has 8 characters, station information has many more. I imagine you'll actually have it cracked by this weekend anyway, let me know if you do, but if not I'll try to help out. Hope this is helpful, Jeremy



#18815 Help porting Arduino code for FM radio module

Posted by <Jeremy> on 05 October 2011 - 10:52 AM in General Discussion

Yeah that's a good question, I think that A5 is a clock pulse so it's not analogue. I think the A4 (SDIO) sends logic pulses, rather than a clock signal. But it's completely possible I'm wrong, there's guys like Stefan, CW2 and Mario (and others too!) who know how to explain it much better than me. I'm watching the forum thread below with interest :) It seems to be very relevant to our discussion! http://forums.netdui...64-i2c-voltage/ Jeremy



#18810 PCB

Posted by <Jeremy> on 05 October 2011 - 08:16 AM in General Discussion

Hey Baxter - thanks for those links. That PCB in a box looks like exactly what I need to start off at home. Now I just need to improve my soldering and I can build some nice shields...:) Thanks again Jeremy



#18809 Help porting Arduino code for FM radio module

Posted by <Jeremy> on 05 October 2011 - 07:41 AM in General Discussion

Hi Ken A4 and A5 are the pins for I2C - there's a great post here http://forums.netdui...5-pinout-cards/ I have the netduino plus card printed out and refer to it pretty much every day :) Jeremy



#18802 Help porting Arduino code for FM radio module

Posted by <Jeremy> on 04 October 2011 - 09:48 PM in General Discussion

Hey Ken I've attached the 3 files I think you need to get started - I've tried to keep it close to the Arduino code so it's easy to compare the two. Once you've got the Netduino and Si4703 talking, getting the RDS data is pretty easy. If you hit any problems with that, give me a shout, I've got another class that outputs the channel name and description, but it's seriously not pretty code. I have been using the Sparkfun breakout board, here are the pins I used. Vcc - 3v3 GND - Gnd SDIO - A4 SCLK - A5 !SEN - n/c !RST - D2 GPIO1 - n/c GPIO2 - n/c As with any of these sorts of things, works on my hardware, but use at your own risk...:) Let me know how it works out, Jeremy

Attached Files




#18766 PCB

Posted by <Jeremy> on 04 October 2011 - 01:01 PM in General Discussion

Hey everyone Does anyone have any advice or recommendations on how to get started with some PCB manufacture at home? I'm looking for kit that's pretty small scale, the sort of thing you can do in an apartment on a table. If any of you can recommend a good and reasonably priced product, I'd really appreciate it! Thanks in advance, Jeremy



#18765 Help porting Arduino code for FM radio module

Posted by <Jeremy> on 04 October 2011 - 12:58 PM in General Discussion

Hi Ken, I've done this with the Netduino already - the tricky part is that you need to do a little manipulation with the array you use to read and write to the registers, I think that when you start reading the first word that comes out is at 0x0A rather than 0x00. But porting from Arduino to Netduino is definitely possible. If you're interested I'll try to resurrect the code from my development machine, just let me know. Jeremy



#18471 Dangershield

Posted by <Jeremy> on 27 September 2011 - 08:45 AM in Project Showcase

Nice! I wish I had seen your post before buying some of these components separately...oh well :)



#18153 My first project with netduino

Posted by <Jeremy> on 18 September 2011 - 07:23 PM in Project Showcase

Hey Hackaroth Very nice! I've been toying with the idea of buying one of these and I think you've convinced me :) Jeremy



#18076 BinaryWriter?

Posted by <Jeremy> on 16 September 2011 - 10:51 AM in Netduino Plus 2 (and Netduino Plus 1)

Hi - is this kind of what you're looking for? http://forums.netdui...8-bitconverter/ I hope this helps - Jeremy



#18035 Netduino Plus + ID-20 (again!)

Posted by <Jeremy> on 15 September 2011 - 08:08 AM in Netduino Plus 2 (and Netduino Plus 1)

Hi Jace I don't know this component, but I saw this tutorial for the arduino and your component which might be useful (sometimes I find comparing the arduino and netduino implementations useful when I hit a problem). http://bildr.org/2011/02/rfid-arduino/ The first thing that jumped out at me was that your pins are connected similarly to the arduino except for one - you mention that you have Pin 2 connected to netduino 5V, but the arduino has Pin 2 connected to netduino Pin 13. EDIT: I guess you have configured the pins that way to make sure you do just one read so my observation might not help you too much :( But I hope this is something to look into anyway! Cheers, Jeremy




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.