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 27-September 23)


By content type

See this member's


Sort by                Order  

#56297 Extending Digital Input using game Controller

Posted by hanzibal on 23 February 2014 - 01:32 PM in General Discussion

Much better, it's a shift register and you can probably use SPI to read it. MISO, CLK and CS pin for latching before reeling in the bits. ...or you could use the MCP23S17 chip, it has 16 pins controlled with SPI. With the driver I wrote for it, you can easily create a 16 bit wide parallell databus and just read them all into a single unsigned short variable:
ushort my16bits = bus.Value;
Here's the driver with some examples: http://forums.netdui...17-io-expander/ The driver can also alert you with interrupts whenever any of the 16 pins changes.



#56307 Extending Digital Input using game Controller

Posted by hanzibal on 23 February 2014 - 05:38 PM in General Discussion

Thanks, glad you liked it! Regarding having multiple SPI devices sharing the same SPI bus as the MCP23S17, I eleborated over that in the post that I made over the driver software: http://forums.netdui...der/#entry56306 Also, I think you need to use the "inhibit" pin or similar on your shift register to sort of turn it off while using the SPI bus for other purposes.



#49998 Silly Voice Synth on NP2....

Posted by hanzibal on 26 May 2013 - 09:48 PM in Project Showcase

Yes, I believe it whould be very hard to modulate that in managed code.

 

If I'm not mistaken, you need about 10 times the freq of the highest note. With maybe ~8khz for the "ssss" sounds (?), you would need ~80kHz of PWM.

 

That is of course no problem in itself but you also need to be around to change the duty cycle every 125us and even if you manage that, there would be very little time left for other processing and I suppose there are quite some.

 

EDIT: Oh, and this is the song from your video. I find your robotic vocals slightly more rhythmic though  ^_^




#49976 Silly Voice Synth on NP2....

Posted by hanzibal on 26 May 2013 - 07:16 AM in Project Showcase

Sounds like my old A500 once did when fooling around with speech from within A-Basic. We used phonetics to try and make it speak swedish with some quite amusing results. Very interesting, I sure didn't know that RAM/ROM thing but just took for granted those where stored on flash and not read into ram until upon actually used. That knowledge would probably explain a thing or two that I've experienced when seen those "failed to allocate x blocks" debug outputs. Without having looked in the zip file (I'm on a tablet that can do unzip) nor checked the d/s of that vintaged speech synthesis chip of yours - what exactly are you using for playback? You mentioned a synth and by that, do you mean Netduino PWMs or some actual external h/w not seen in the video? Is there perhaps some kimd of schematics or wiring diagram inside the zip or could you just roughly describe how you wired this thing?



#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.



#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?



#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?



#50746 Hd44780Lcd busy flag

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

It's probably coming from two or more threads accessing the LCD driver simultaneously, try adding lock statements around things that need be executed exclusively. There was a case recently with the same problem - and the same solution. I'll see if I can dig it out...

 

EDIT: Turned out the mentioned case was in fact this very thread :-)

 

Have a look at some code earlier in this thread on how to use the lock statement. You see, the LCD driver is not "thread safe" meaning it cannot deal with multiple threads. What happens is that your main thread gets interrupted in the middle of transferring data to the LCD by the interrupt service routine which then starts sending its own data to the LCD in the middle of the ongoing operation.  The LCD will get very confused by this and put in an out-of-sync state effectively garbling every operation from there on.

 

EDIT: Oh, and you should never have a thread sleep in an interrupt service routine! It should act like a hit squad - get in, do the job and get the h-ll out of there  :ph34r:




#50310 Power supply specifies minimum output voltage?

Posted by hanzibal on 06 June 2013 - 12:16 AM in General Discussion

1A minimum is really quite a lot, so much for current limiting ;-) Can that really be correct, one amp? I would hesitate using it for small signal electronics like with your typical Netduino project. When all works as intended in your project, there's no problem but if (when) you make a mistake like overloading or shortcircuiting, parts will burn to a crisp or literally blow up. Capacitors and LEDs can be harmful, shoooting debree in your eyes. Mine is also a switcher but minimum current is low, like only a few milli amps. It also has a minimum voltage of 1V but that hasn't been giving me any problems (yet).



#49417 Netduino plus 2 + Real time clock + RFID

Posted by hanzibal on 14 May 2013 - 10:18 AM in Netduino Plus 2 (and Netduino Plus 1)

Cool, seems I was wrong about the LCD - Good!



#49400 Netduino plus 2 + Real time clock + RFID

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

Hi! I don't know about the RFID reader but I think the Netduino does not have enough processing power to drve that LCD. Take a look at the Nokia 5110 instead, I know people on the forum have had success with that. About the RFID, what do you mean by "Real Time Clock RFID Sensor"? I'm asking since normally, RTC and RFID are not integrated but two different modules.



#52468 Low baud rates on serial port

Posted by hanzibal on 30 August 2013 - 07:39 AM in Netduino Plus 2 (and Netduino Plus 1)

If the meter unidirectional and "read only": UART signals are quite simple active low pulses, look it up on wikipedia and you'll see how to interpret the signal. At 300 baud, it should possible to read using an interrupt enabled GPIO. You would then analyze the time difference in between the slopes. Also, It just might be possible to read it at 1200 and then convert the data afterwards (you would typically receive each bit four times). Start och stop bits might present problems though. If the meter is bidirectional, I think you could use one of these: https://www.sparkfun.com/products/9981



#52524 Low baud rates on serial port

Posted by hanzibal on 03 September 2013 - 02:36 PM in Netduino Plus 2 (and Netduino Plus 1)

Yes, a soft UART would work for receiving since interrupts are correctly time stamped but sending is trickier.

 

Still, if the meter doesn't really use full duplex (won't receive and respond in parallel) you might get away with sending too - 300 baud means >1 ms between pin toggles and that is a pretty long time even for an NP2.




#50682 Home Automation - Want to know more?

Posted by hanzibal on 21 June 2013 - 12:22 AM in General Discussion

You might want to look at this old post:
http://www.avsforum....for-itach-irule

And perhaps also this one:
http://itachtoolkit.codeplex.com/

And maybe this too:
http://forums.netdui...ased-ir-remote/

All in all you can build your own iTach emulator or HTTP listener on an NP or NP2 to carry out the commands against whatever h/w you want to control.

The thing is that the iRuleAtHome remote control and builder is just awesome, I use it for all kinds of stuff in my house. I even use it to turn the christmas tree on and off during that time of year. In this post there's a video on controlling a Netduino mini over ethernet:
http://forums.netdui...m-a-smartphone/

You can of course also do it with a PC, Raspberry PI or what have you.



#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/




#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.



#51944 Exploiting the world of R/C hobby vehicles

Posted by hanzibal on 04 August 2013 - 08:34 PM in General Discussion

It actually runs quite well, at least before the batteries are exhausted which typically happens after only 5 minutes even with 2200mAh NiMh. I suppose the current is quite beefy at times, even the cables get warm and they're made to handle really large currents. Theoretically: 2.2 / 5 / 60 = 2.2 x 60 / 5 = 132 / 5 = 26.5 A That's in average, the speed controller is rated 90A. I've allready trashed two nylon propellers so I ordered an alu prop and rudder with the new 5200mAh LiPo pack currently on it's way from HK :-) Water cooling only activates when the motor gets hot, creating a slight pressure in the tubing and the water starts to flow. I'm probably getting a water cooling for the speed controller too and perhaps a micro pump so that cooling does not stop just because the boat does so.



#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.



#51918 Exploiting the world of R/C hobby vehicles

Posted by hanzibal on 03 August 2013 - 07:20 PM in General Discussion

Hi all! During my vacation, I have visited two different archipelagos and by pure impulse, I found my self forced to purchase a radio controlled boat with a brushless electrical motor. The boat really runs and I can only say, I've been away from the R/C hobby field for too long. New battery types and motors make the electric boats run almost as petrol driven without all the fuzz. Anyway, I can think of a dozen cool things and improvements to be done using embedded electronics within the field of R/C boats alone. With respect to you knowledge in emebedded electronics, what have you guys done in terms of improvements and mods within this relatively unexploited area of hobbyism?



#51018 Mcp23s17 (SPI) with NP2+

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

Hi, did you get this driver working eventually?




#51657 Make instance of module static

Posted by hanzibal on 24 July 2013 - 08:41 AM in Netduino Go

I've never used the Go! but it sounds as if the port is broken. This can happen if you draw to much current in trying to drive too big a load. It has happened to me a couple of times and so I simply avoid using the corresponding ports anymore. Does the port work when used as an input?



#51917 button push

Posted by hanzibal on 03 August 2013 - 07:08 PM in General Discussion

To think it took you a year to figure that out ;-) Just kidding of course and thanks for the tip of that chip that seems nice. Haven't looked through the d/s and in wonder, is it straight forward gpio driven (i.e set of switches) or does it have an I2C or SPI imterface? Either way (or especially in the latter case), could you post some code for it?



#50732 Netduino + Video Experimenter shield

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

The shield is probably based around the Maxim MAX7456 chip. Sparkfun has a similar board based on the MAX7456: https://www.sparkfun.com/products/9168 That one has been discussed in these threads: http://forums.netdui...58-netduino-tv/ http://forums.netdui...-video-overlay/ I'm pretty sure I've seen it in other posts as well but I can't find that info right now. Hope that helps a little anyway.



#52501 Problem with SPI Mode 1

Posted by hanzibal on 02 September 2013 - 05:04 PM in Netduino Plus 2 (and Netduino Plus 1)

The clock seems to idle low in between transactions and I think that's what matters the most since the transitions are what drives the bus. Does clock idle low after the you have deasserted !cs? Does communication work with whatever device your trying to talk to?



#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.