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-June 23)


By content type

See this member's


Sort by                Order  

#49903 Mayhew Labs MuxShield and TI 74HC4067

Posted by hanzibal on 24 May 2013 - 09:08 AM in Project Showcase

No, just the bare chip. I'll solder it onto a DIP adapter board.

 

The one you linked to should work equally well and 4.95 USD is reasonable. I would order it, if it weren't for the shipping costs/time.




#50861 Simple sine table

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

Great, that was the intention ;-) I take it you start at -90 degrees at xpixel=0 and so zero degrees is at xpixel=64, correct?



#49906 Does any one would like to buy a more powerful STM32F407 MF board?

Posted by hanzibal on 24 May 2013 - 10:59 AM in General Discussion

Admin: Could you please point to where the forum rules can be found and also clarify which rule(s) was broken?




#50839 Simple sine table

Posted by hanzibal on 26 June 2013 - 01:57 PM in General Discussion

sine and cosine are related by a phase shift, so you don't need a separate array (much like your 4-quadrant optimization) I wonder if private static byte[] _sin; could be simply be a constant array (i.e. not need initialization in the constructor, and stored in ROM). Then again, I've found that netmf only seems to be clever like that for strings, but admittedly I haven't tried an array of integers... If not, then perhaps on the upside 'sine table' has a double meaning....

Yes, they are the same wave form only cosine is 90 degrees ahead, e.g. cos(x) = sin(x + pi / 2) and consequently cos[x] = sin[x + 256] in code. As you said, the array does not have to be generated run-time but then you'd have to re-generate it outside .NETMF if/when you want to change the resolution. Also, I think arrays will end up in RAM anyway and that someone (was it you?) recently investigated the latter and came to that very conclusion. Also, generating the 256 byte array does not take long.



#50831 Simple sine table

Posted by hanzibal on 26 June 2013 - 06:56 AM in General Discussion

Hi Paul, adding cosine is a good idea. I cleaned up my inbox just now so PM should work.




#50889 Simple sine table

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

Nope. xpixel=0 is 0. The phase change you see is because the AGENT screen's origin is upper left, and positive Y is DOWN.

Of course, how silly of me not to see that. Sorry.



#50892 Simple sine table

Posted by hanzibal on 28 June 2013 - 12:50 PM in General Discussion

Cool, I've been thinking of that too at some point. It would be really nice to have a PC app where you could draw arb forms in free hand and then upload to the chip/board over USB. Also controlling freq and amplitude from the PC app.

 

Will the AD9831 retrieve output samples from EEPROM as it goes (like a RAMDAC) or will you be uploading a full "period" to the chip before starting it?




#49684 Mayhew Labs MuxShield and TI 74HC4067

Posted by hanzibal on 21 May 2013 - 02:47 PM in Project Showcase

I'll see if I got one of those multiplexers in my junk box, if so I'll try the driver with an NP I got in there too.

 

Eric said for the shield to be "100% Netduino compatible with no flaws" but unfortunately, this does not seem to go for the driver class unless only tested for something else than a regular N or NP.




#50967 Simple sine table

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

Measure time spent performing, say 10k of each variant and then compare the end results. There are always trade-offs between, speed, complexity, size, ease of use, clarity, etc. In a triangle, you caanot be close to any single corner without getting farther away from the other two :-) @nakchak: I've got one of these laying around but I don't think it can do arbitrary wave forms, only sine and square: http://www.ebay.com/...=item5d3f85ca20



#49829 Does any one would like to buy a more powerful STM32F407 MF board?

Posted by hanzibal on 23 May 2013 - 01:09 PM in General Discussion

Sounds like a really nice board but 200$ is substantial and I think you have to show a working port or people cannot be certain of what they're getting. Also, you will need pictures, lot's of pictures  :) I realize it's kind of a chicken and egg problem.

 

...or are you saying you've done the port already and got the peripherals working too?

 

Then I'm really impressed!




#49843 Does any one would like to buy a more powerful STM32F407 MF board?

Posted by hanzibal on 23 May 2013 - 04:17 PM in General Discussion

hi,hanzibal,yes,i had done for ethernet,nand flash,nor flash,tft,sram,sdio porting,i will upload the sample board's pics if there are really many people want to buy it,other drivers such as CAN,DCMI I2S will be ported after i take my naturalization test in June....and may i ask you whats the price you would think is ok for you?

great job there! Frankly, this is not for me, I already have hardware laying around to keep me busy for at least a decade.



#50944 Simple sine table

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

Nice, it got better and I agree, the mirroring is more elegant now. The biwise AND was there for performance reasons, modulo requires a DIV but there might be no difference in execution time, it's just one of those autonomous things since my assembler days. When quadLen is an integer power of two, its the same thing and I was thinking of using quadBits but quadLen and modulo is more generic. You left quadLen=32, was that intentional?



#50063 Running out of I/Os

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

Yes, the bare chip will sit nicely in a breadboard if you get the DIP16 through-hole version. Regardless of you whether buy the bare chip or the board you linked to, you can share the I2C bus with the RTC. Each I2C slave device should have a unique 7-bit slave address and for the unlikely event that two or more slave devices should collide (happen to use the same address), the pcf8574 lets you configure its address using three pins allowing you to select one of 8 possible addresses. Your RTC uses a fixed slave address of 0x68 while that of the pcf8574 can range from 0x38 to 0x3f depending on how you configure it using the three pins a0, a1 and a2. Thus, they will not collide regardless of how you configure the pcf8574.



#49950 Running out of I/Os

Posted by hanzibal on 25 May 2013 - 12:22 AM in Netduino Plus 2 (and Netduino Plus 1)

Yes, that board should work well. Or you could just get the bare chip, it's only 3 USD (plus shipping so could be the same in the end)

 

http://www.digikey.c...075-5-ND/735689




#49885 Running out of I/Os

Posted by hanzibal on 24 May 2013 - 12:55 AM in Netduino Plus 2 (and Netduino Plus 1)

I see, but why use a UART to drive the relay - you don't mean you got a relay that speaks serial do you? Just to be clear, a UART basically does RS232 (or similar) communication with another serial enabled device. UARTs are ypically not at all suitable for turning a relay on and off. For doing that, a good old digital output pin and a transistor whould be the traditional way to go. Have you used up all the on-board PWMs?



#49864 Running out of I/Os

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

Not difficult at all, usually these kinds of chips are available in breadboard friendly DIP16 - DIP28 packages. The interface is usually I2C and sometimes SPI. What usually takes time is writing the software.

 

In the I2C case, you'll only need to connect 2 wires to drive the chip (plus power).

 

Extra PWM would require something other than a typical expander. For example there's the TLC5940 16 channel PWM LED driver from Texas and I suppose you could use some of its pins for digital output (0% duty = 0 and 100% duty = 1).

 

I'm not sure what you mean when you say "1 extra Digital RX/TX, both for output only" - do you mean an extra UART or just 2 x digital outputs?

 

What will you be driving with the PWMs?




#49850 Running out of I/Os

Posted by hanzibal on 23 May 2013 - 06:41 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi!

 

The above SX1509 BOB from Sparkfun still stands tall I think, but there are lots of cheaper solutions as well.

 

It all depends on your requirements:

 

Do you need analogue, digital or both?

Have many pins / channels do you need?

Do you need input, output or both?

Need interrupts on input pins?

 

I recently came across the PCF8574 which is a quasi bi-directional I2C controlled digital only 8 bit I/O expander with interrupt capabilities. It's really simple to use, very general purpose and I've written a generic driver class for it and an I2C bus manager.

 

You can find the code in this post where I use it to drive a 16x2 character LCD in 4 bit parallel mode:

 

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




#49500 DFROBOT Buggy

Posted by hanzibal on 16 May 2013 - 08:24 PM in Project Showcase

Yes, well it can't be for all the sex and drugs and rock'n roll, that's for sure ;-)



#49901 Running out of I/Os

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

Ok, for the extra I/Os I'd recommend the PCF8574 mentioned before and for which I've already written a simple to use driver.

 

If I understand correctly, you only need a single PWM channel and freeing up some pins would allow you to use one of the on-board PWMs - correct?

 

In that case, you'll do fine with just a single PCF8574 as it will add 8 GPIOs to your design.




#49939 Running out of I/Os

Posted by hanzibal on 24 May 2013 - 07:30 PM in Netduino Plus 2 (and Netduino Plus 1)

16 channels might be overkill, but that's the only PWM controller I can find in a DIP package:
http://www.ti.com/li...ink/tlc5940.pdf

I think you can use any of the other 15 channels to emulate regular digital outputs by configuring 0% and 100% duty cycle to represent a logic low and high respectively. The latter would ommit the need for a PCF8574.

If its not a secret, I'd still like to know what you'll be using the PWMs (not PWN) for?



#49495 DFROBOT Buggy

Posted by hanzibal on 16 May 2013 - 04:33 PM in Project Showcase

Hi Paul, nice work! As for me, I've still not really taken the leap over to things that move besides for servos and stepper motors. My dad recently got himself a robo mower and that came to mind when I saw your buggy. Is that perhaps what you had in mind or is it just for plain old fun? Maybe you saw my CD player and having 12+ CD/DVD drives on my desk, I'm thinking of maybe making a x/y plotter with the laser sleighs from a couple. Those are actually 4 wire stepper motors in case you didn't know - in fact, a CD drive contains no less than 3 motors of which one is a stepper driving the laser sleigh using a worm screw to move along the guides in a very precise manner. Anyway, good luck with the buggy!



#50018 I2C LCD not working on Netduino Plus 2

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

Thanks for your reply, but have already jumpered the new SCL/SDA pins to A4/A5, so it should be working.

Perhaps I'm missing the point here, but why are you at all bridging the I2C pins - is it because you use some kind of shield with fixed wiring?

 

If you're otherwise not using A4/A5 from your Netdino, they could easily be in a default configuration where they have a strong negative effect on the I2C data line. You could try configuring them as digital inputs and see if that helps.




#50417 I2C LCD not working on Netduino Plus 2

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

Nice work! Everybody seem to use a potentiometer for brightness and/or contrast. Why not use PWM instead? Sure, it eats two more pins but personally I find it more elegant and you could easily implement ambient light auto-compensation with a photoresistor wired to the ADC.



#50546 I2C LCD not working on Netduino Plus 2

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

Yes, brightness will be slightly dimmer than it would with 5V but it's still bright enough. Contrast is "active low" so no problem there.




#50041 I2C LCD not working on Netduino Plus 2

Posted by hanzibal on 28 May 2013 - 12:37 AM in Netduino Plus 2 (and Netduino Plus 1)

Yes, Mario's SPI driven LCD Boost library using s shift reg is probably the badest boy in town right now. It would be nice if you came back with a post on how that turns out for you. I've been looking to use his lib myself one of these days...




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.