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 02-July 23)


By content type

See this member's


Sort by                Order  

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

Posted by hanzibal on 25 June 2013 - 06:37 PM in Visual Basic Support

I see, well then I suppose gfcwfzkm's tests did not run under the micro framework but under the regular. Btw, you do mean "iif" and not just plain old "if", right?



#51602 Power Switch Question

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

It might be possible to modify the board bypassing the two power lines to a dpst switch. The 2.1mm should be fairly easy to hi-jack but USB 5V is probably a lot trickier since you'd have to cut the trace and solder wires before and after the breakage. Could be there a testpoints you could use but I doubt it. A non-intrusive way could be to create kind a "docking station" with its own 2.1mm and USB that connects to those of the board after going through a dpst switch. If you're planning to use an enclosure, this is likely the best way to go. Brw, Is it for an N or NP?



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

Posted by hanzibal on 24 June 2013 - 10:46 PM in Visual Basic Support

Hi! I'm not sure but could be the VB implementation of the IndexOf imethod s one-based and that zero means "not found". If so just substitute "greater or equal" for just "greater" or simply replace the zero with a one. Also, your loop repeats the same call to IndexOf for as many times as there are characters in _src - is that intentional and if so, why?



#50733 error MMP0000: CLR_E_FAIL

Posted by hanzibal on 23 June 2013 - 09:45 AM in Visual Basic Support

Static syncBool As Boolean While syncBool   Thread.Sleep(5) End

That work around is bound to give you headaches since its not mutually exclusive between different threads. About SyncLock its important that the variable being "synclocked" is of reference type and that it has a value other than Nothing. I usually do something like this in a class implementation: Private _sync as new Object() . . . SyncLock _sync ' do stuff that require exclusive access End SyncLock Forgive me for any syntax errors, I always code C#. Does that not work for you?



#50281 How make simple reset circuit?

Posted by hanzibal on 04 June 2013 - 11:03 PM in General Discussion

That's a really nice one, seems to have a watch dog too but not exactly the cheapest thing around...

 

Hmm...I suddenly have a notion as of why various vendors of consumer electronics require you to wait for 5+ seconds when power cycling before plugging the cord back in. If D-link can't afford the MAX698, how can I?

:D

 

Are you saying the MAX698 would remedy the 20 ms lingering voltage problem?




#50248 How make simple reset circuit?

Posted by hanzibal on 04 June 2013 - 01:15 PM in General Discussion

Thanks, seems to be what I was looking for. I figured as much as a capacitor and a resistor had to be there but wasn't sure how. I'll go ahead and try it, will check back later.



#50245 How make simple reset circuit?

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

I need to reset an IC at startup but don't want to waste a gpio on that. I got a some clues but thought I'll ask first if there's a clever way to make a really simple POR circuit? In case you're wondering, it's an mcp23s17 which does POR on its own but many times, it doesn't work on a quick power cycle since there's seems to be some voltage standing, likely due to capacitance (stray or other).



#50276 How make simple reset circuit?

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

I'm sure you considered a simple RC circuit?  fancier is with a diode in parallel with the resistor so that the cap discharges quickly on power down, and slowly on power up.

 

[font="'courier new', courier, monospace;"]Vdd[/font]

[font="'courier new', courier, monospace;"]^[/font]

[font="'courier new', courier, monospace;"]|   1n914[/font]

[font="'courier new', courier, monospace;"]+---------|<-------+-------* /RESET[/font]

[font="'courier new', courier, monospace;"]|   |[/font]

[font="'courier new', courier, monospace;"]| 100k |[/font][font="'courier new', courier, monospace;"]   0.1 uF[/font]

[font="'courier new', courier, monospace;"]+---/////------+--------|(------|i. gnd[/font]

 

I don't think this qualifies for 'clever', but it might for 'really simple'.

 

In theory this should work and time wise it does as it takes about 5 ms for !reset to rise which is perfect.

 

Unfortunately, it only reaches 0.5V which is below what the IC considers a logic high level (Vdd = 5V) so the IC stays in reset.

 

Also, fall time is unchanged (~20 ms).

 

I suppose I get voltage divider between the 100k and the impedance of the !reset pin and I should have mentioned, that I'm not just cutting Vdd but also GND which might explain the above behavior (or some of it).

 

After having thought some more of this, I realize that my problem is not POR at all. I just need voltage to drop much faster when cutting power so my initial question was the wrong one, sorry.

 

So let me rephrase myself:

 

Any ideas on how to prevent voltage from lingering 20 ms after cutting power?




#56201 Out of pins. Need advice on how to expand

Posted by hanzibal on 19 February 2014 - 10:57 AM in Netduino 2 (and Netduino 1)

I think this MCP23S17 driver class should interest you:

 

http://forums.netdui...17-io-expander/




#50286 How make simple reset circuit?

Posted by hanzibal on 05 June 2013 - 01:10 AM in General Discussion

It depends on the voltage, QUANTITY, etc.

IMHO, for a few parts, be smart, do it easy and simple.

Or, waste a LOT of time and money screwing around. :)

Yes, you are right of course.

 

For low cost, check out TI tlv810s series: (~$0.50)

http://www.ti.com/product/tlv810s

They also have a development board for $20.

Interesting, I'll have a closer look at that one.

 

Thanks!




#50294 How make simple reset circuit?

Posted by hanzibal on 05 June 2013 - 09:37 AM in General Discussion

Nope, 0.5V is what I saw in the scope but I'll give it another go just the same since it would be a good thing for future projects.



#50416 Netduino Mini CD-player - now with video :-)

Posted by hanzibal on 11 June 2013 - 05:57 AM in Project Showcase

Ok, so my design and software works perfectly with quite a few of the drives I've tested but not all. Usually, it either works flawlessly or not at all. All drives are recogniced as ATAPI devices but in general, newer drives does not work as apposed to older drives. Also, drives with a headphone jack (which sometimes have buttons too) tend to have a better chance of working. I'll return with a report on specific drive models later.



#51549 Scale AnalogInput from Vref 1.8v - 30v

Posted by hanzibal on 18 July 2013 - 09:28 PM in General Discussion

Could you perhaps make a simple sketch of the scenario? I think it would make it a lot easier for others (including me) to understand what you got and what you need.



#51638 IR NEC Transmission code not working.

Posted by hanzibal on 22 July 2013 - 10:46 PM in Netduino Plus 2 (and Netduino Plus 1)

If you insist on IR, I suggest you look at using a pair of IrDA tranceivers that connect to the UART of each Netduino. IrDA is designed to carry data back and forth using IR as its carrier. I guess, you could say an IrDA link works like a serial link and the Netduino can't tell the difference from a serial crossover cable. As for speed, it's pretty modest but I think you can reach 38400 baud on short range.

 

Below is an IrDA tranceiver module, you need two. I'm sure you can find cheaper ones too.

http://www.mikroe.co...ion/irda-proto/

 

...or you can build your own, kind of like this guy did:

http://pavouk.org/hw/en_irda.html

 

I nice thing is that you can use a serial crossover cable during development and then switch to IrDA when your protocol works. Also, there are IrDA USB dongles so you could write a test application for your PC to mimic one of the Netduinos during development.




#52239 Using a 7 segment display without a shift register

Posted by hanzibal on 20 August 2013 - 01:10 PM in Netduino Plus 2 (and Netduino Plus 1)

I have been able to display 2 different characters on the display now however I am still unsure on how to "push" new characters to the screen.  In my code it is just a while loop switching between displaying the first digit and the second digit, preventing me from sending it a new character.  I would like to be able to write a function that writes to the display and keeps it there until another command is set.  I believe this is accomplished by threading a method to keep the screen 'alive' and send it an event(?) to update it.  I haven't used events or threading before however so I'm not sure how to implement it yet so any help is appreciated. 

 

 

Since characters currently don't "stick" you are doing multiplexing by looping while toggling between the two digits. Sure, you could do the multiplex loop in a thread but there's a good chance it will flicker depending on how much and what you do in your main thread. To get "sticky" characters, you'd have to use some kind of slave chip like the ones suggested some of the other guys earlier in this thread.

 

As for "pushing in" arbitrary characters, you could display other letters quite easily by simply reading them from an array of digits or something like that.

 

Consider creating a base class "Digit" for setting the GPIOs for any given character you wan't to display in either of the two 7-segment digits. The class could have a method called "Render()" that would set the GPIOs as necessary depending on which character the class instance represents.

 

You could then derive one sub class from "Digit" for each character that you need, i.e. among others, you would have sub classes DigitH, DigitI and Digit0...Digit9 and so forth overriding the Render method. You could then create and dictionary of Digit objects and simply index the array using the corresponding ASCII character taken from the string(s) that you want to display, i.e. "HI", "40" etc.

 

This software approach can be used regardless of whether or not you choose to use a slave chip.




#51404 Scale AnalogInput from Vref 1.8v - 30v

Posted by hanzibal on 13 July 2013 - 09:14 PM in General Discussion

As you said your self, you need to scale down with respect to different Acc while maintaining full dynamics. Obviously, a voltage divider would do the trick if Acc was fixed. As it is not, I was thinking to use a ladder of different valued voltage deviders and a corresponding suitably valued zener diode for each input(x) and voltage of 1.8, 3.3, 5, 12 or 30V, i.e the 5 different voltages. For each such input x you would use two analogue multiplexers in series with a single analogue input of your Netduino. You would lead down the excess voltage of each zener to ground via a resistor.

You would then strobe each primary input multiplexer x of a total of N actual inputs, scanning for the first seconday multiplexer channel i not maxing out through the corresponding zener:

int volt[N];
for(int x = 0; x < N; x++)
for(int i; i < 4 && mux[x, i] > max[i]; i++)
volt[x] = mux[x, i];
// now mux[x, i] contains the correct voltage for input x

You'd need 2 analogue multiplexers and 5 different zener diodes.

Complex perhaps but I think it could work :-)



#52146 Using a 7 segment display without a shift register

Posted by hanzibal on 14 August 2013 - 01:08 PM in Netduino Plus 2 (and Netduino Plus 1)

Using SPI to control a single shiftreg, wouldn't that require a pretty tight loop for multiplexing a 2-digit 7-segment display?




#50835 N+2 communication with WebApi

Posted by hanzibal on 26 June 2013 - 12:34 PM in Project Showcase

Nice, is it an Android phone and did you write the app for it?




#49377 RC6 Decoder Class

Posted by hanzibal on 13 May 2013 - 09:43 AM in Project Showcase

Phil, this is great since I'm a big fan of using IR remotes in my Netduino projects.
 

I've been using this NEC IR-receiver class which works great with many of the cheap credit card sized remotes available on eBay:

http://forums.netdui...col-ir-decoder/

 

It works well but does not support command repetition (such as volume adjustment).

 

I'm using it in several projects including my CD-player and I2C-driven LCD.

 

Hi Phil,

 

Great Post, I just decoded my Philips television remote control, but now I'll begin my search in how to transmit the data using IR trasmitter!

 

Anyone got any help on doing this?

 

Thank you!

You should be able to use SPI to send IR. Have a look at this thread on how to accomplish that:

 

http://forums.netdui...ased-ir-remote/

 

In the same thread I also wrote about how IR-transmissions are modulated in general using so called "burst pairs".




#50776 a new i/o pin

Posted by hanzibal on 24 June 2013 - 10:58 PM in Netduino Mini

Interesting.... Getting +/-6V could be useful in some cases. Any idea of how much it can source? I would guess about half as much as any other regular pin since those are 3V3.



#50870 N+2 communication with WebApi

Posted by hanzibal on 27 June 2013 - 11:01 AM in Project Showcase

Ah yes, silly me - I see now that you got the same webpage open in the browser of your PC.




#50871 BUILD 2013

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

We built an app for Windows 8.1 (and Windows RT 8.1) using the new Bluetooth Smart (Low Energy) WinRT proximity APIs.

Chris, I'm very interested in BLE and have a few questions about your setup:

 

1. What shield/module/device have you hooked up to your NP2?

2. Is your Win8 machine equipped with built-in BLE or are you using a dongle, if so what dongle is that?

3. Do you know if the BLE APIs are available for other Windows versions than Win8?

 

Thanks!




#50969 BUILD 2013

Posted by hanzibal on 30 June 2013 - 08:26 PM in General Discussion

Yes, almost all BLE stuff I've seen is about talking to an iPhone but that does not really interest me plus I think wifi is better for that. I think the Agent and TI SensorTag combo would be much more interesting. Anyway, do you think one of these cheap BT 4.0 actually supports BLE and that it is able to talk to the Agent and/or the TI SensorTag over BLE? http://www.ebay.com/...=item3f1d09ffab Then of course, there's the API thing on a non-BLE equipped PC, I suppose that would be a show-stopper on Win XP.



#50929 BUILD 2013

Posted by hanzibal on 29 June 2013 - 12:00 PM in General Discussion

Ah yes, I've seen that shield. As you probably know, TI just released their CC2541 based BLE SensorTag - would it be possible to interface that using the Seed Studio BLE shield, one of those inexpensive dongles and (since you mentioned it) the Agent respectively?



#51013 BUILD 2013

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

Ok, thanks!





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.