hanzibal's Content - Netduino Forums - Page 13
   
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 04-July 23)


By content type

See this member's


Sort by                Order  

#50461 Date from netduino plus

Posted by hanzibal on 13 June 2013 - 10:45 AM in Netduino Plus 2 (and Netduino Plus 1)

Perhaps I don't understand but assuming you mean like sending Datetime.Now from N+ to another networked device, what could stop you from doing that?




#56470 Gainspan WiFi module

Posted by hanzibal on 26 February 2014 - 10:22 PM in General Discussion

Gainspan wifi modules have full tcp/ip stack already built-in to them so mip probably won't do you any good there. EDIT: I've got a driver going for a board that I made based on the RAK410/411 wifi module. It runs a full tcp/ip stack and accepts simple AT commands. However, I've only just started and It will take me a good while longer.



#56428 Gainspan WiFi module

Posted by hanzibal on 26 February 2014 - 08:24 AM in General Discussion

Forum search engine doesn't work in my opionon so I use Google: http://lmgtfy.com/?q...m gainspan#seen



#56564 How to convert hex value stored in string to binary in string?

Posted by hanzibal on 01 March 2014 - 09:11 PM in Visual Studio

The latter direction, Number.ToString("x2") should work.

Might be possible to use something like int.Parse(...) in the other direction?



#50476 Date from netduino plus

Posted by hanzibal on 14 June 2013 - 06:19 AM in Netduino Plus 2 (and Netduino Plus 1)

Could you please explain in more detail, what you need to do exactly and why, perferably with a brief description of the overall purpose and goal of your project. One-liners tend to be cryptic, especially since english might not be you first language.




#57033 Gainspan WiFi module

Posted by hanzibal on 23 March 2014 - 07:15 PM in General Discussion

Progress has been extremely slow, it can scan and list SSIDs of available networks and also connect given the corresponding WPA2 key.

However, It can not do anything useful like accessing actual content on remote servers because of general problems reading and writing streams so there's little or no point in pblishing any code until I got those basics working.

There's probably as many recepies to writing drivers as there are chips to write them for but I think, In general the key is to read the d/s back and forth until you know your way in it, which sections contains which bits of information, where to find the info you need in various situations that you can anticipate.

Get the hang of the terminology used by the vendor and get a good feel for how the chip works and how you are supposed to use it. Ask your self the relevant questions, how can I achieve this or that required functionality and make sure you know where in the d/s the answers are.

Make up some kind of hypothetical API structure in your head and test it against what you have gathered from reading the d/s to see if your model is realistic and valid. Sometimes you can find some code for another architecture for inspiration or that you can port from but you will need to understand the chip nevertheless.

Proceed by establishing a working communication with the chip. Implement register read ops and verify by reading some expected power-on default value. Then get write ops working, verify using write and read-back testing. Write a value to some register and verify by reading back the register value to make sure it "stuck".

Come up with a programming model with some basic properties and methods supporting the model in your head. Create a class and definine the various constants, enums, register addresses and such that you will need.

Then start implementing, pick something simple like "getversion", "soft reset" or whatever is available, preferably something really simple that can be easily verified.

By now your knowledge and confidence will have grown enough to make the rest fall into place as if almost by itself.

Good luck!



#50169 USB CDC on Netduino Plus 2

Posted by hanzibal on 01 June 2013 - 11:32 AM in Netduino Plus 2 (and Netduino Plus 1)

Yes, most of what has already been done is HID since that is one of the simplest device classes to implement and won't require a dedicated driver on the host PC. If I recall correctly, a CDC device will require a driver. All in all it's a big thing to take on.



#50188 USB CDC on Netduino Plus 2

Posted by hanzibal on 02 June 2013 - 02:19 AM in Netduino Plus 2 (and Netduino Plus 1)

@baxter: those boards are USB host modules, I was under the impression that a USB device was sought after. @Haurucki: As I gathered, you're looking to make your Netduino present itself as a USB virtual com port to the host PC, right?



#52680 netduino plus 2 compatible gps/gsm module

Posted by hanzibal on 10 September 2013 - 08:55 AM in Netduino Plus 2 (and Netduino Plus 1)

Hello again, I just found this complete kit with GM862 module, breakout, antenna, etc:

 

http://www.skpang.co...-usb-p-414.html

 

EDIT: Sorry, the kit has been sold out but might be available elsewhere.




#52663 netduino plus 2 compatible gps/gsm module

Posted by hanzibal on 09 September 2013 - 08:42 AM in Netduino Plus 2 (and Netduino Plus 1)

There's the GM862 module from Telit that has it all; GSM/GPRS/3G and GPS. Sparkfun used to carry a breakout for it (retired now) but might still be available from other locations:

https://www.sparkfun...cts/retired/281

 

EDIT: Found the bare Telit module here:

http://www.electroki...24?currency=USD

 

For GPS only, I've used the UBlox 6 based module that's cheap and works great:

http://www.ebay.com/...=item2ec7488539

 

The module comes with a small antenna but there's a uFL connector to support an alternative antenna of your own choosing.




#55288 Multiple *different* spi devices

Posted by hanzibal on 10 January 2014 - 08:58 PM in General Discussion

Yes, the Netduino can certainly talk to multiple SPI slaves, but you must serialize your data transfers. Basically, you create several SPI configurations and swap between these when interfacing to one or the other slave devices using different !CS pins.

 

In a multi-threaded environment, you must make sure that transfers are not interrupting each other. If necessary, use the lock statement to protect your SPI configuration swapping mechanism.

 

There are several implementations available, here's one for you:

 

http://netmftoolbox....rdware.MultiSPI




#55449 Multiple *different* spi devices

Posted by hanzibal on 17 January 2014 - 09:53 PM in General Discussion

Those must have been some really bad wires, at these small currents and short distances, one would think such things should not matter, but there you go. Glad you solved it!




#52306 Audio sampling

Posted by hanzibal on 23 August 2013 - 06:47 PM in General Discussion

...However, I am more concerned about how things work if I wanted to get the high sampling rate you mentioned done in native code, while at the same time running managed code. How does that all work? It has been a long time since I did low level programming. Is it possible to have the native code reading the samples, by interrupts, using a timer, while at the same time feeding the results of this to a parallel executing managed thread?

AFAIK, there's no ready made API for doing this, instead you need to modify the Netduino firmware to implement the functionality you need. This means setting up a C language tool chain for the micro in question, creating your own specialized branch of tinyCLR and thereby diverging and detaching from the Netduino main track. I haven't done this myself but many others have, so you can search the forum for guides on how to proceed along this path.

Just thought I'd post this here in case anyone ends up searching for the same stuff: http://www.iar.com/G...4_MCU_part1.pdf Cortex M4 has DSP instruction set and there are libraries available. Also - I found this: http://www.micromint...bambino200.html It is a .NET Gadgeteer compatible board with a multi core ARM Cortex .

That Bambino board looks interesting but for some reason I personally don't care much for gadgeteer boards and therefore don't know much about it. Ah, so there's a set of dedicated DSP instructions in M4, I was unaware of that. Texas are quite knowledgable within digital audio in general (especially since they aquired Burr-Brown) and the field of DSP in particular where they have a broad range of processors: http://www.ti.com/ls...AliasId=1200327 Did you have a look at MiniDSP.com? I really think that's more in line of what you are looking for. Please don't let this discourage you from getting a Netduino since I'm sure it would be a great tool for you to learn more of embedded programming and for interfacing with the other h/w parts that you will need. Please explain a little more of your goals and what you are hoping to achieve and I'm sure someone else here will be able to help you further.



#55386 Multiple *different* spi devices

Posted by hanzibal on 15 January 2014 - 02:06 AM in General Discussion

It sounds a bit like the mbi5026 does not honor it's !cs input really well. Have you tried using different Netduino pins for the mbi5026 !cs line or tried adding a pullup resistor on it? The latter might very well do the trick.



#51246 Proper way to multithread on Netduino

Posted by hanzibal on 09 July 2013 - 07:17 AM in Netduino 2 (and Netduino 1)

I was going to include some example code of a producer/consumer scenario but then I realized that the AutoResetEvent (ARE) is not really suitable for this. The reason is that you'd want precisely one item dequeued for every call to Set() and ARE cannot guarantee that.

 

Instead you need something with a counter in it that would increment with every Set() and decrement with every WaitOne(). In the regular framwork there is an synchronization object that works like this (can't remember its name right now) but sadly I don't think it's available in the micro framework. You need what I think is called a monitored queue.

 

Perhaps somebody else knows of how to correctly implement a monitored queue in .NETMF?

 

Correction: I made a typo before, it should have been System.Collections.Queue.




#50754 Seeking economical premade voltage sensor array?

Posted by hanzibal on 24 June 2013 - 08:47 AM in Netduino Plus 2 (and Netduino Plus 1)

Yes, the general idea was to use an analogue multiplexer that can handle the voltage and then a single voltage divider between that and the Netduino. The CD4067B 16 channel mux/demux can handle up to 20V but Vcc must also be 20V:

 

http://www.ti.com/li...ink/cd4097b.pdf

 

If 20V is not readily available you need a step-up converter from 12V which infortunately would increase cost. On the other hand, such converters come quite cheaply on eBay:

http://www.ebay.com/...=item1c33d18e42

 

If you spend some time searching, you might be able to find a demultiplexer that can handle input voltage significantly greater than Vcc and then of course you won't need the converter.

 

Audi?




#50736 Seeking economical premade voltage sensor array?

Posted by hanzibal on 23 June 2013 - 12:19 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi! Why not multiplex the 12 using only a single voltage divider and analogue input? You'd have to sample 12 times as often but it would be very economical... About the relays, pretty much the same deal or use a latched shift register. EDIT: Your avatar looks like a turbo charged in-line four jap motor or an old BMW M3, but what is it? EDIT: If its for a motronic application, speed could be a problem.



#50433 I2C driven LCD panel and IR remote

Posted by hanzibal on 11 June 2013 - 09:38 PM in Project Showcase

Code should work on any Netduino, just change the mini-specifics into the corresponding of your N/N+. As for age, the first computer I programmed was the ancient ABC80 from Luxor, then the Spectrum Sinclair, C64, Amiga, IBM PC with Intel 8088, PCs with 80286, 386, 486, Pentium. The Amiga 500 was the 1st computer I owned my self. Go figure ;-) I'll try and find the time to look more closely at your latest creation, it's been a busy week (new position with a new company since monday). And yes, I think your Creative drive will work with my Netduino mini CD player code (you need two more PCF8574). As you know, those drives have galvanic S/P dif out (5V ttl so you need to shift down the levels if connecting to a home stereo amp over coax) 16-bit stereo @ 44.1kHz that I was thinking of connecting to a Texas DIR9001 and make a PCB for it all.



#50407 I2C driven LCD panel and IR remote

Posted by hanzibal on 10 June 2013 - 10:23 PM in Project Showcase

Hi Piwi, good to hear from you!

I'm pretty sure it will and I would love to see you confirm that. Other than the mini and the LCD (which I think you already have), you'll need these two:

PCF8574 8 bit IO expander with I2C Interface
http://www.nxp.com/d...74_PCF8574A.pdf

38kHz IR receiver with built in decoder and aplifier
http://www.electroki...e/download/2205

Or a pair with equivalent functionality (TI also makes a PCF8574). Personally, I love that IC, so versatile, uses only two pins (I2C), easy to use and simple to interface. The code above contains drivers for the IC, LCD (4-bit mode), IR reciver and a I2C bus manager.

Btw, I saw your monster DAC and it looks amazing! I must read more carefully before I can comment though.

EDIT: Did you see my CD player? Among other things, it uses the code in this post.
http://forums.netdui...now-with-video/



#50756 Seeking economical premade voltage sensor array?

Posted by hanzibal on 24 June 2013 - 09:18 AM in Netduino Plus 2 (and Netduino Plus 1)

It suddenly hit me that you need an analogue switch instead of a multiplexer. There are many but this one is a 16 channel switch that can deal with 230V signals. I don't know but they could be expensive.

 

http://datasheets.ma...05-MAX14806.pdf

 

EDIT: Here's an overview from Texas Instruments:

http://www.ti.com/li...5d/slyb125d.pdf




#51088 HELP with servo on NP2

Posted by hanzibal on 04 July 2013 - 07:32 PM in Netduino Plus 2 (and Netduino Plus 1)

Also, you probably want to replace the Sleep(100) at the end of Main() with a Sleep(Timeout.Infinite) or your PWM object will fall out of scope after a 100ms worth of operation. Note that you will have to alter the duration for the servo to move back and forth. Any fixed duration will only make the servo move to a certain angle and then just sit there. The servo will try to maintain its position and so it will try to resist you trying to turn it away from the set position. Usually, 1ms, 1.5ms and 2ms correspond to angular positions of approximately -45, zero (center) and 45 degrees respectively yielding a dynamic range of 90 degrees. Be careful setting the duration outside these boundaries or you may end up damaging the servo since it might try to move beyond its own reach (there are usually blockings at the extremes) while trashing the gearbox. This has happened to me. You can power most servos with 4.8 - 6V so you can feed it directly from your Netduino (e.g. USB 5V) - just keep in mind that the servo will draw more current as you apply mechanical load to it so a separate supply is probably a good idea and 6V will give you a higher torque.



#52255 Audio sampling

Posted by hanzibal on 21 August 2013 - 11:26 AM in General Discussion

Hi!

 

I think max sampling rate is 2Ms/second (see datasheet for the microcontroller) but you won't come anywhere near that rate or probably even 44.1kHz in managed code (plus for stereo you would need 2 channels = half the rate with a single multichannel ADC).

 

The Netduino ADC is only 10 or 12 bit (depending on micro) and meant for reading sensors and such much rather than sampling audio signals. För CD quality, even native code won't help.

 

I suggest you look at some external ADC board with more suitable specs, possibly something with a DSP onboard. Also bear in mind you need to handle the data stream which would be 2 * 16 * 44100 = 1,4Mbit/second for CD quality audio so if you're looking to do real time DSP, you're in for a real challenge.

 

You might want to look at the VS1053b from VLSI, it's an primarily a MP3 decoder but it can sample CD quality audio producing an MP3 (or Ogg Vorbis) encoded audio stream for you. The chip also has a few simple DSP effects.

 

You should probably check out www.minidsp.com

 

Sorry if I sound negative but I really don't think Netduino is you best choice for the task.

 

Good luck!




#51199 Proper way to multithread on Netduino

Posted by hanzibal on 08 July 2013 - 09:00 AM in Netduino 2 (and Netduino 1)

Hi!

 

There's no special class for "Background threads", they are the same as any System.Threading.Thread. In the post you refer to, the term is used to denote a Thread who's purpose is to process data produced by an interrupt service routine (ISR) in order to avoid lenghty operations in the ISR itself.

 

The AutoResetEvent is used to have the "background thread" wait for a signal before going to work. It's a good example of the common producer/consumer pattern where the ISR is the producer and the background thread is the consumer.

 

You can use a System.Connections.Queue object for the ISR to quickly tuck work items away (using the Enqueue method) to be processed by the background thread (using the dequeue method) at a slightly later point in time.

 

Yes, the background thread would typically run a while loop and perform a WaitOne on the AutoResetEvent as means of syncronization before dequeuing each work item for processing. When there are no items to be processed, the thread goes to sleep and will not wake up again until another work item has been enqueued. If necessary, you can use Thread.Sleep(n) to yield once in while in order not to choke the CPU degrading responsiveness of you application.

 

Hope this helps!




#51929 Exploiting the world of R/C hobby vehicles

Posted by hanzibal on 03 August 2013 - 10:00 PM in General Discussion

I guess your're right, didn't really think of quadcopters but yes, to call it "unexploited" would be an exaggeration. As you know there are tiers to everything and there seems to be no limit as to just how bitten you can get by these things. I was thinking of logging stuff like motor temp, current, voltage, G forces, GPS positioning (for speed measure) and that type of thing. Could be of great interest since tuning and improving is a big thing with these guys. You know, to see actual benefit of that wizbang speed controller, rudder, tires or whatever in a before and after kind of way. This, especially since there seems to be quite some mombojumbo out there and the folks generally lack deeper knowledge of electronics and/or mechanics, let alone embedded programming. Make no mistake, I'm talking about the avarage Joe here and not the top 10% who actually know what they're talking about and who won't fall for the "2000 super special GXZ with dual MOSFET" kind of merchantising ;-) I see some potential here, especially now thanks to ultra low power and level of integration but also new smart ways of distributing electrical power without as much loss im power dissipation. Heck, my brushless motor uses water for cooling and the speed control has a fan over the heat sink even though its inside a closed compartment.



#50019 Variable with USB name set in MFDeploy - exists?

Posted by hanzibal on 27 May 2013 - 02:00 PM in Netduino Plus 2 (and Netduino Plus 1)

Are you sure the name even sticks to the board?





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.