I never get tired reading your posts Dave, there's usually a couple of good laughs in them and I bet you've read "The hitchhikers's guide to the galaxy" more than once. Surely, perfectly rectangular distribution is not a good measure since a^=1 would produce that, while perfectly white (Gaussian?) noise would but I don't know how to measure that other than in terms of variance or period length. In school we rolled a hundred dice a hundred times and after each roll we counted the numer of ones, twos, threes,...sixes and found (quite naturally, or?) that the relative frequency converged to 1/6th. Quite unsurpricingly but at the same time fascinating when you think of it and really ask your self "but why exactly?". I guess its a force of nature really. What we did was creating a histogram which is pretty much the Fourier transform, basically saying that any signal (stochastical or otherwise) can be broken down to a number (possibly infinite as in the case of square waves) of sinusoidals. In our case, I guess the "sinusoidals" were stochastical signals, simultainiously strectching in all possible directions but projected onto a vector in a six dimensional universe - the dice ;-) Now, you must be even more tired of me than of Dave and therefore I promise not to write any more in this post :-)
- Netduino Forums
- → hanzibal's Content
hanzibal's Content
There have been 386 items by hanzibal (Search limited from 13-July 24)
#49947 Power with 20V
Posted by
hanzibal
on 24 May 2013 - 09:38 PM
in
Netduino Plus 2 (and Netduino Plus 1)
#49936 Power with 20V
Posted by
hanzibal
on 24 May 2013 - 07:09 PM
in
Netduino Plus 2 (and Netduino Plus 1)
Yes, I was thinking of the regular NP which can handle 12V plus it would indicate that the design you referred to runs off 12V and hence doesn't require 20V but I'm not very knowledgable when it comes to avalanched transistor circuitry. Good luck and keep us posted!...Its a step in the right direction, but it's still 30% over Secret Lab's specs for the Netduino Plus 2. Over is over, so 12V vs 20V doesn't change the subject of running the board over voltage. Now if I can bend their circuit down to 9V, then we have a solution.
#49608 New Netduino on its way? (cryptic homepage)
Posted by
hanzibal
on 20 May 2013 - 08:17 PM
in
General Discussion
I really think its something much bigger than an add-on of any kind. I also don't believe its an NP2 with more muscle. I'm thinking of something groundbreaking using some cool new rocket science tech.
#49531 New Netduino on its way? (cryptic homepage)
Posted by
hanzibal
on 18 May 2013 - 02:39 PM
in
General Discussion
#49639 New Netduino on its way? (cryptic homepage)
Posted by
hanzibal
on 21 May 2013 - 10:24 AM
in
General Discussion
#49636 New Netduino on its way? (cryptic homepage)
Posted by
hanzibal
on 21 May 2013 - 08:29 AM
in
General Discussion
[color=rgb(40,40,40);font-family:helvetica, arial, sans-serif;font-size:14px;]@cutlass: Given the short time in which SL went from Atmel to ST, I wouldn't rule out a whole new architecture.[/color]

it is simple really, I think this will be a multi core or multi processor board
time machine to the future
Sounds plausible!
#49593 New Netduino on its way? (cryptic homepage)
Posted by
hanzibal
on 20 May 2013 - 08:41 AM
in
General Discussion
In my opinion, that wouldn't be big enough...I'm thinking something a bit more groundbreaking.
#49589 New Netduino on its way? (cryptic homepage)
Posted by
hanzibal
on 20 May 2013 - 08:16 AM
in
General Discussion
Code cracked!
Very peculiar thing - If you click the link to the video that Chris referred to in his post entitled Time machine, you'll recognize the cryptic code as being part of the URL:
Hardly a coincidence so obviously, SecretLabs intended for us to find the video but....the question is why?
This is a real long shot, but could be we're looking at something based on a FPGA/CPLD-like core that lets you program the hardware as to which internal function (PWM, analogue, digital, etc) goes to which pin. A sort of dynamic ASIC if you like.
#49546 New Netduino on its way? (cryptic homepage)
Posted by
hanzibal
on 19 May 2013 - 03:53 AM
in
General Discussion
I'll second that but suspect otherwise since the majority of users seem to prefer boards like the NP2 On the other hand, I get the feeling that the Go! has not been a big enough sucess to justify going further down that lane but then again, nor seems the Cerb40 from GHI. However, there is now a big gap between the mini and the N2 so I wouldn't be all that surprised if my prayers have been heard after all :-) I'd really love to see a mini on steroids!
#49916 Power with 20V
Posted by
hanzibal
on 24 May 2013 - 12:17 PM
in
Netduino Plus 2 (and Netduino Plus 1)
I would even argue the mentioned entity is but a commonly used metaphor for the dice themselves.
#49897 Power with 20V
Posted by
hanzibal
on 24 May 2013 - 07:31 AM
in
Netduino Plus 2 (and Netduino Plus 1)
Sorry, for going on about dc/dc but there are also step-up converters equally priced. Is "[color=rgb(40,40,40);font-family:helvetica, arial, sans-serif;]RNG that anyone can build[/color]" in the form of only using standard parts the reason for wanting to avoid these converters per sé or am I missing the point here?
Why not build a simple charge pump like ziggurat29 suggested, the MAX232 uses one.
About drifting, obviously you must achieve a perfectly white noise to get as a rectangular probability distribution as possible. You could verify that by letting the thing run for weeks under different working conditions respectively to see if the 0/1-distribution really converges to 50:50 compared to a goal set in double precision. In the end that's the only thing that matters. If your device does not meet this requirement, it would be totally useless to anyone, let alone researching scientists.
What's your comment on the 12V DC adapter found in the BOM for the schematics you referred to?
From a philosophical perspective, I personally don't think that we can ever observe true randomness due to the Heisenberg principle of uncertainty. It would be like trying to have a camera take photographs of itself
#49867 Power with 20V
Posted by
hanzibal
on 23 May 2013 - 09:41 PM
in
Netduino Plus 2 (and Netduino Plus 1)
I thought you needed quantum leaps for true random numbers, but maybe that's what RNG basically is?
There's a 12V DC adapter in the BOM so one would think that what is used for Vin in the schematics. If so, there wouldn't be a problem since the Netduino Plus can handle that voltage.
Anyway, I wouldn't risk the board by feeding it 20V, especially not when a dc/dc is less than 2 USD.
#49580 New Netduino on its way? (cryptic homepage)
Posted by
hanzibal
on 19 May 2013 - 08:52 PM
in
General Discussion
different image today, don't know about the top line, but 1332AD9 is 20130521 when converted from hex to decimal....
I'm hoping it is the release of the Go Ethernet Module!
The Go! Ethernet module may be long sought after but personally, I doubt SecretLabs would make such a big deal out of that.
#49563 New Netduino on its way? (cryptic homepage)
Posted by
hanzibal
on 19 May 2013 - 02:09 PM
in
General Discussion
#49853 Power with 20V
Posted by
hanzibal
on 23 May 2013 - 07:29 PM
in
Netduino Plus 2 (and Netduino Plus 1)
http://www.ebay.com/...=item1e74826a92
It's just a few cents more (free shipping), has an adjustable output from 1.5V to 35V (when fed 4.5-40V) and you can pull 2A from it. I got a whole bunch of these and use them in lots of projects. These switchers don't get hot even when you pull 1.5A while a regular LDO would get smoking hot or even burn (depending on the specs).
Simply feed the step-down your 20V, adjust with the pot to 9V to feed your Netduino. Then just bypass the incoming 20V to whatever you need it for.
Btw, what will you be powering with the 20V?
#50092 Mayhew Labs MuxShield and TI 74HC4067
Posted by
hanzibal
on 29 May 2013 - 07:31 PM
in
Project Showcase
#50880 Simple sine table
Posted by
hanzibal
on 27 June 2013 - 08:18 PM
in
General Discussion
Added cosine and updated code of initial post (see far above).
AFAIK, the microcontroller of Netduino 2 and Netduino Plus 2 features FPU but I don't know if .NETMF takes advantage of that. Either way, the regular Netduino and Netduino mini does not have an FPU and could probably benefit performance-wise.
However, I honestly don't really know how much performance gain there is to this or even if there is any at all - could even be performance is worse than that of Math.Sine() but I haven't tested.
Perhaps somebody knows off heart or is willing to test it?
#50861 Simple sine table
Posted by
hanzibal
on 27 June 2013 - 06:59 AM
in
General Discussion
#50813 Simple sine table
Posted by
hanzibal
on 25 June 2013 - 09:18 PM
in
General Discussion
[font="arial, sans-serif;"]Below is a simple class implementing a zero-biased sine table with values -255 to 255. I use it frequently and thought I'd share in hope of it being useful to some of you as well. [/font]
Values of the first quadrant ( 0 to pi / 2) are pre-calculated and stored in a byte array. By horizontal and vertical mirroring, values for a full period (2 * pi) is achieved using only a single 256 byte array which should keep memory footprint to a minimum.
[font="arial, sans-serif;"]An integer indexer [/font][font="arial, sans-serif;font-size:14px;"]0 to 1023 (wraps beyond 1023) [/font]is used to get the sine values for angles 0 to 2 * pi.
Hopefully there are none but please let me know should you find any errors.
[font="arial, sans-serif;font-size:14px;"]Note: The [/font][font="arial, sans-serif;font-size:14px;"]microcontroller of [/font][font="arial, sans-serif;font-size:14px;"]Netduino 2 and Netduino Plus 2 features FPU but I don't know if .NET MF takes advantage of that, either way the regular Netduino and Netduino mini does not have an FPU.[/font]
// Simple 8 bit sine table public class SineTable { private static byte[] _sin; public static readonly SineTable Sin = new SineTable(0); public static readonly SineTable Cos = new SineTable(256); private int _offset; private SineTable(int offset) { _offset = offset; // 1st quadrant (0...pi/2) in 256 steps if (_sin == null) { _sin = new byte[256]; double a = 0; double da = System.Math.PI / (2.0 * _sin.Length); for (int i = 0; i < _sin.Length; i++, a += da) _sin[i] = (byte)(256 * System.Math.Sin(a)); } } // 1024 = 2 * pi (one period) public int this[int index] { get { index += _offset; index &= 1023; // 1st quadrant? if (index < 0x100) return _sin[index]; // 2nd quadrant? else if (index < 0x200) return _sin[0xff - (index & 0xff)]; // 3rd quadrant? else if (index < 0x300) return -_sin[index & 0xff]; // 4th quadrant else return -_sin[0xff - (index & 0xff)]; } } }
You can easily change the resolution by altering the length of the array and the modulo (1023).
[font="arial, sans-serif;font-size:10.5pt;"]UPDATE: The SineTable class now contains two static instances called "Sin" and "Cos" which are used like this:[/font]
// some arbitrary angleint alpha = 134; // get sine value for angleint sinval = SineTable.Sin[alpha];// get cosine value for angleint cosval = SineTable.Cos[alpha];
#49614 Mayhew Labs MuxShield and TI 74HC4067
Posted by
hanzibal
on 20 May 2013 - 10:43 PM
in
Project Showcase
Hmm...after removing the "const" statements, I basically get 3 errors when trying to compile as an NP2 project.
These two errors:
[font="'courier new', courier, monospace;"]Error 1 The best overloaded method match for 'Microsoft.SPOT.Hardware.AnalogInput.AnalogInput(Microsoft.SPOT.Hardware.Cpu.AnalogChannel)'[/font]
public Ic74HC4067(Cpu.Pin s0, Cpu.Pin s1, Cpu.Pin s2, Cpu.Pin s3, Cpu.Pin common, Cpu.Pin enable, bool analog) : this(new OutputPort(s0, false), new OutputPort(s1, false), new OutputPort(s2, false), new OutputPort(s3, false)){ if (enable != Cpu.Pin.GPIO_NONE) _enable = new OutputPort(enable, true); if (common != Cpu.Pin.GPIO_NONE) { if (analog) _analogRead = new AnalogInput(common); else { _commonWrite = new OutputPort(common, false); _commonRead = _commonWrite; } }}
...refers to this code:
public int ReadValue(){ if (_analogRead == null) throw new InvalidOperationException("CommonIO pin is not specified or not in analog mode."); return _analogRead.Read();}
Michel, are you seeing these too?
#49537 Mayhew Labs MuxShield and TI 74HC4067
Posted by
hanzibal
on 18 May 2013 - 07:56 PM
in
Project Showcase
#49547 Mayhew Labs MuxShield and TI 74HC4067
Posted by
hanzibal
on 19 May 2013 - 04:05 AM
in
Project Showcase
#49558 Mayhew Labs MuxShield and TI 74HC4067
Posted by
hanzibal
on 19 May 2013 - 11:19 AM
in
Project Showcase
#49599 Mayhew Labs MuxShield and TI 74HC4067
Posted by
hanzibal
on 20 May 2013 - 01:59 PM
in
Project Showcase
How did it go, does it work after removing the "const" statement?
can you send me an example to use the digital input?
I'm obviously not Eric, but early in this post he gave an example with three multiplexed digital outputs:
public static void Main() { MuxShield shield = new MuxShield(MuxShield.MuxMode.DigitalOutput, MuxShield.MuxMode.DigitalOutput, MuxShield.MuxMode.DigitalOutput); //Set the pins high so that as we move through the pins, LEDs will light up shield.MUX0.WriteBit(true); shield.MUX1.WriteBit(true); shield.MUX2.WriteBit(true); while (true) { for (byte x = 0; x <= 15; x+=2) { //itterate over the pins shield.CurrentPin = (Ic74HC4067.Pins)x; //blink the onboard led shield.D13LED.Write(!shield.D13LED.Read()); Debug.Print(shield.ToString()); Thread.Sleep(100); } }}
If you need digital input(s), simply modify the three parameters in the call to the constructor according to your needs. You would then use the readBit method to read the pin after having set CurrentPin according to which of the multiplexed inputs you wish to read.
For example, this should give you one multiplexed input and two outputs.
// digital in, out, outMuxShield shield = new MuxShield(MuxShield.MuxMode.DigitalInput, MuxShield.MuxMode.DigitalOutput, MuxShield.MuxMode.DigitalOutput);
#49603 Mayhew Labs MuxShield and TI 74HC4067
Posted by
hanzibal
on 20 May 2013 - 05:54 PM
in
Project Showcase
You can think of a multiplexer like one of those rotating platforms that they used to have in front of train garages in the old days. Pins s0...s3 form a 4 bit number 0...15 that is used to select which of the 16 tracks to use:
http://www.yeeeeee.c...eneralele-1.jpg
I'll have a closer look later but the error could be pull-down mode is not supported on the input pin. Certain combinations are not allowed but I can never remember which. I'll get back shortly.
- Netduino Forums
- → hanzibal's Content
- Privacy Policy