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.

hanzibal's Content

There have been 386 items by hanzibal (Search limited from 29-June 23)


By content type

See this member's


Sort by                Order  

#53188 VS1053 breakout board

Posted by hanzibal on 14 October 2013 - 12:27 PM in Netduino Plus 2 (and Netduino Plus 1)

I remember  initially having quite some trouble with getting the chip to play. My problems turned out to be SPI related and at some point, I got a faulty GPIO pin connected to DREQ which was really hard to track down.

 

If you haven't already, take a look at this post:

http://forums.netdui...decoder-solved/

 

I posted on the VLSI support forums and among others, there's this one:

http://www.vsdsp-for....php?f=11&t=277

 

I've made many more posts on the vs1053b department of the VLSI forum. Please do search for my posts over there and I'm pretty sure you will find something useful:

http://www.vsdsp-for...id=298&sr=posts

 

Hope this helps!




#51740 HowTo address the PCF8574

Posted by hanzibal on 28 July 2013 - 01:25 PM in Netduino Plus 2 (and Netduino Plus 1)

I don't have smart meter but I've made a light detector that detects pulses coming from a LED indicator on the meter fitted in the electricity central cabinet on the outside of my house. The LED pulses once for every half kW (or so) and my detector transfers the pulse via a 433Mhz radio link to a logger inside the house. I guess it's similar but only unidirectional and I suppose the meter with the LED indicator is a smart meter but it's owned by the electricity company.



#53261 VS1053 breakout board

Posted by hanzibal on 18 October 2013 - 07:23 PM in Netduino Plus 2 (and Netduino Plus 1)

So, basically you're running the same s/w as me, then it ought to work especially on a faster uC. Well, at least one would think so but... Here's the thread I was thinking about in my last post: http://forums.netdui...ge-3#entry44437 It took me a while before I realized it's my own old thread but I believe it might be very relevant indeed from the post referred to and onwards, so read it carefully.



#53255 VS1053 breakout board

Posted by hanzibal on 18 October 2013 - 03:43 PM in Netduino Plus 2 (and Netduino Plus 1)

Sample rate and stereo/mono mode are properties of the song you are playing and so they depend on how each song was recorded. I added this info just for fun and it should not effect how well or poor a song is played. By the sound of it, you are suffering from poor transfer rate between the SD card (songs are on an SD card right?) and the vs1053b. If you look into my code, you can see that I crank up SPI speed as part of initialization. Have you incorporated that part into your code? Also I remember someone else had similar problems not all that long ago where I tried to help. Use google to search the forum for "vs1053b", the forum search does not work very well (or maybe it does now). Also, you cannot have Debug.Print in performance critical parts of your code, it will slow you down a great deal. I assume you don't use interrupts for DREQ since it too will add significant overhead. You must poll DREQ in a tight loop and then feed the chip fresh chunks of 32 bytes each as quickly as you can until DREQ changes again to indicate the buffer is now full and cannot accept any more data until the chip has consumed what you just fed it. Now, I did this with a mini which is considerably slower that an NP2 but I recall there were some problems mentioned in the thread I mentioned above.



#50270 How does Netduino interact with a Computer

Posted by hanzibal on 04 June 2013 - 08:39 PM in General Discussion

Wow, hanzibal, you've been busy :) Very nice! Chris

Thank you, I hope you didn't mind me writing about the board here on the forum. It's not commercially available (yet) though but a first batch of 200 have been ready for some time while I've been "perfecting" the software :-) Coding is very much inspired from my experiences with .NETMF in general and Netduino in particular. In many cases, I've actually been reusing code in both directions. Would you mind if I write a separate post about the board?




#50244 How does Netduino interact with a Computer

Posted by hanzibal on 04 June 2013 - 10:19 AM in General Discussion

For your 1st question, I'd like to add that, since you have a Netduino Plus, a nice way of doing that would be to use networking. That is, you would write a socket listener (or use one of the ready made webbservers available here on the forum) for performing tasks initiated by a PC application. You can also use a USB-to serial converter to communicate with one of the Netduino UARTs. It's also possible to implement a HID device on your Netduino but I think this would be the more cumbersome code wise.




#50252 How does Netduino interact with a Computer

Posted by hanzibal on 04 June 2013 - 05:29 PM in General Discussion

Here's the other two videos, it seems one cannot include more than two videos in one post.

 

 

 

Oh, and sorry about the out-of-focus fuzziness and for speaking Swedish in the videos.




#50251 How does Netduino interact with a Computer

Posted by hanzibal on 04 June 2013 - 05:07 PM in General Discussion

You should be able to find lot's of stuff regarding motor control here on the forum.

As for the PC comm I've made a USB device called PeekyPokey that acts as a virtual COM port and HID device on the PC (talks to Netduino via serial) and has 8 gpio. It comes with an extensive library in the form of an easy to use .NET assembly.

 

Below are a couple of videos of the board that, in order of appearance, 1) shows interaction with a Netduino mini (and a 2nd board), 2) controlling servos, 3) controlling a stepper motor and 4) controlling an LCD.

 

 

 

As can be seen in the videos, the library contains controls in the form of virtual LEDs, buttons and such that can be used for controlling stuff. It also contains USB game pad (joystick) support and a web server (last video).

 

I use the board a lot with my Netduino mini's since it can program/debug the mini, interact with it and power it.




#50269 How does Netduino interact with a Computer

Posted by hanzibal on 04 June 2013 - 08:28 PM in General Discussion

@Silent Walarus:

May I ask what sensor you would be getting the analogue readings from?

There aren't many USB<->analogue boards and if you find one, its likely to be much more expensive than a regular USB<->serial cable.

The Netduino is much better at dealing with analogue than a PC. Depending on your requirements, I think you'd be much better off letting your Netduino do the analogue readings. If your PC app needs the analogue readings, your Netduino could easily send them to the PC using a USB<->serial cable. From the PC app point of view, it's simply a matter of reading/writing to a COM port. You could define your own protocol for sending messages back and forth and having the Netduino perform various tasks initiated by commands sent from the PC app. Same thing on the Netduino side of things, simply read/write to a COM port.

The PeekyPokey is a PC<->Serial and PC<->GPIO combo and cannot operate without the supervision from a PC app running in the other end of the USB cable.

Here's what I think you should do next:

1. Get a USB<->UART (3V3) converter cable like this classic one:
https://www.sparkfun.com/products/9717

or a cheap board like this one:
http://www.ebay.com/...=item484bf4eb2f

2. Hook up your Netduino to your PC via the above cable/board:

Netduino ---------------------- Cable/board
UART_Tx ---------------------- Rx
UART_Rx ---------------------- Tx
GND --------------------------- GND

3. Find some code for doing serial talk from the forum (there are hundreds of posts regarding that)
http://lmgtfy.com/?q...UART Read Write

4. Using that info, write a small program to send the string "Hello world" from your Netduino to your PC

5. Implement your own serial protocol for data interchange and command execution

6. Start working on that sensor (if possible, have the Netduino do the readings)

7. Have tons of fun!



#51250 Returning to the Netduino family

Posted by hanzibal on 09 July 2013 - 11:24 AM in General Discussion

Where have you been during your time in exile?




#50866 Building a "valley detector"

Posted by hanzibal on 27 June 2013 - 07:55 AM in General Discussion

Ok, there are of course much more sophisticated hp-filter designs that you could apply.




#56264 Netduino and FTDI EVE Board

Posted by hanzibal on 22 February 2014 - 03:07 AM in Project Showcase

Totally awsome Mario, great work!



#51600 Power Switch Question

Posted by hanzibal on 20 July 2013 - 10:39 PM in Netduino 2 (and Netduino 1)

So you want to be able to use a mechanical switch to cut power to the board regardless of whether it is currently being powered by the 2.1mm barrel or USB. Correct?



#51614 Power Switch Question

Posted by hanzibal on 21 July 2013 - 07:34 PM in Netduino 2 (and Netduino 1)

Yes, cutting ground only should work so an spst would do, I didn't think of that.



#50824 Building a "valley detector"

Posted by hanzibal on 26 June 2013 - 05:43 AM in General Discussion

Ok, so basically you'll be using a software hp filter then, I suppose there are ready made functions for that in LabView but designing one in h/w is quite simple, basically you put a capacitor in series with a resistor to ground.



#50789 String.Contains - Error with custom 'Contains'

Posted by hanzibal on 25 June 2013 - 08:53 AM in Visual Basic Support

Good, then it was as I suspected and also the solution was the one I suggested earlier:

 

...If so just substitute "greater or equal" for just "greater" or...

 

Also, I see you got rid of the redundant calls to IndexOf (as I also mentioned).




#50667 error MMP0000: CLR_E_FAIL

Posted by hanzibal on 20 June 2013 - 03:55 PM in Visual Basic Support

So am I apparently :-) EDIT: Exchanged "are we" for "am I".



#50588 error MMP0000: CLR_E_FAIL

Posted by hanzibal on 17 June 2013 - 07:26 PM in Visual Basic Support

Ah, yes that was a typo, I meant to write "[][]", sorry for messing it up. I use that construct quite a lot, just didn't know it is called a "jagged" array.



#50583 error MMP0000: CLR_E_FAIL

Posted by hanzibal on 17 June 2013 - 06:04 PM in Visual Basic Support

Of curiosity, a "jagged" array would be one like this in C# right? bool[][] bColors = new bool[]{ new bool[]{ false, true, true}, new bool[]{ true, false, true}};



#50773 Building a "valley detector"

Posted by hanzibal on 24 June 2013 - 10:37 PM in General Discussion

Couldn't you just invert the signal (turning valleys into peaks) and then apply a peak detector on that?



#50777 Building a "valley detector"

Posted by hanzibal on 24 June 2013 - 11:06 PM in General Discussion

I meant for you to subtract the signal from a positive voltage. EDIT: Deleted an erronous statement.



#50790 String.Contains - Error with custom 'Contains'

Posted by hanzibal on 25 June 2013 - 09:31 AM in Visual Basic Support

Also, IndexOf always returns -1 if not found.

In C# it does but are you sure it does so in VB too?

It doesn't seem to judging from the solution and VB is traditionally 1-based.




#50787 Building a "valley detector"

Posted by hanzibal on 25 June 2013 - 08:25 AM in General Discussion

A stupid question perhaps, but if the background is also available on its own (without the square wave) a differential amplifier would do the job. I suspect not but provided the 8 - 10V signal varies significantly less (slower) than the square wave, you can use a high pass filter to isolate the square wave which could then be amplified. That is, you would design a filter to remove everything below the maximum frequency of the squarewave (e.g. place the knee at ~30Hz).




#50781 Building a "valley detector"

Posted by hanzibal on 24 June 2013 - 11:36 PM in General Discussion

I don't quite follow, I thought you were trying to detect local minimums but are you in fact trying to filter out the 8V DC component leaving just the square wave?



#50818 String.Contains - Error with custom 'Contains'

Posted by hanzibal on 25 June 2013 - 10:38 PM in Visual Basic Support

Ah, I was totally unaware of that, thanks for the info. I really liked the last part about the new operator being "short circuit" so that it only evaluates the true alternative and not both as the old iif did. I guess my VB is gettng a bit rusty from all the C#.




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.