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.

Stefan W.'s Content

There have been 153 items by Stefan W. (Search limited from 29-March 23)


By content type

See this member's


Sort by                Order  

#27556 Assign Analog input value to PWM output

Posted by Stefan W. on 18 April 2012 - 03:49 PM in Netduino 2 (and Netduino 1)

To answer "how do you convert an int to an unsigned int", you cast it: (that's the (uint)
            while (true)
            {
                irValue = irSensor.Read();
                irValue = irValue / 5;
                if (irValue > 100)
                    irValue = 100;
                pwm.SetDutyCycle((uint)irValue);
            }
I also added a safeguard so that the value doesn't get bigger than 100 (100 is full-on for pwm).



#27445 Electronics 101 book recommendation

Posted by Stefan W. on 17 April 2012 - 09:10 AM in General Discussion

Also not a book, but for me, when I started with electronics, a simulator like LTSpice has been invaluable - you can try stuff without frying things ;) i.e. test if your transistor switch works and how much current is drawn from the microcontroller etc. But that's just in addition to a book, it obviously does not teach you physics :)



#27085 hardware quirk and bugs

Posted by Stefan W. on 12 April 2012 - 06:26 PM in Netduino 2 (and Netduino 1)

You weren't too slow, your post has more helpful information than mine :) and your suggestion about not driving optocouplers/LEDs directly is certainly right.



#27071 hardware quirk and bugs

Posted by Stefan W. on 12 April 2012 - 03:41 PM in Netduino 2 (and Netduino 1)

What "input with pullup" means is that there effectively is a resistor between 3v3 & the pin. This resistor limits the current, so using leds to check is not adequate (the current might simply be so low that you don't see the led lighting up), you need a scope or a fast multimeter to check. There is also no way to turn a digital ouput on 50%.



#27060 hardware quirk and bugs

Posted by Stefan W. on 12 April 2012 - 01:13 PM in Netduino 2 (and Netduino 1)

How do you determine this?

On start up, only pin 3 and pin 7 fire high,
and pin 3 looks like its only 50 percent, but only happens for like 5
seconds. Then the program starts. It looks like a hardware quirk.


IIRC, on startup the microcontroller uses all pins as input with pullup enabled, then, after the startup-routine (bootloader and so on) is finished, the program starts ... so what's in your code will not take effect immediately after boot.



#26857 Analog Input Quirk

Posted by Stefan W. on 10 April 2012 - 11:54 AM in Netduino 2 (and Netduino 1)

Well, the thing that is missing is that in this way the "high" level is 3.4V. If your 5V I2C device does register 3.4V as "high" reliably, then this solution will work (however you will leak 5V/(2k2Ohm +4k7Ohm) = 0.72 mA, which is not much in itself, may be an issue if you are running from battery - you could cut the connection to +5V and simply connect +3.3V from Netduino, which does not produce this excess current). If it does not, your best bet is a logic level converter like http://www.sparkfun....nverter-v10.pdf (which is basically just a MOSFET with pullups on both sides - 5V on the module side, 3.3V on the netduino side).



#26367 Redacted 00101100

Posted by Stefan W. on 04 April 2012 - 09:54 AM in General Discussion

Setup a task to change stuff on midnight. Definitely ;)



#26142 AnalogInput Repeatability

Posted by Stefan W. on 30 March 2012 - 08:35 AM in Netduino 2 (and Netduino 1)

It's a major shame that the 3.3V is so bouncy. When I hook my meter up to the 3.3V supply on the board it looks stable (this is using the Neetduino's 3.3v regulator), but I don't have the ability to see changes of short duration.


Yes, to see power supply noise you need an oscilloscope, not a multimeter. And the values you see now are "normal" - the last bits of the measurement are usually "noise".



#26040 Powering the Netduino via another Shield

Posted by Stefan W. on 28 March 2012 - 09:51 AM in Netduino Plus 2 (and Netduino Plus 1)

You can power the netduino from shield pins, where you have essentially 2 choices: regulated 5V into the 5V pin or unregulated into the Vin pin (7.5 - 12.0 VDC - a little more forgiving than that in reality, this is the tech specs). If your shield does one of that, it's fine.



#26020 What's going on with the >= operator?

Posted by Stefan W. on 27 March 2012 - 04:49 PM in Netduino Plus 2 (and Netduino Plus 1)

The IEEE specification does not mention any epsilon, and as you've seen most people actually have less knowledge about floating points than they'd need - also there are severe misconceptions like

A double is a double... They all have the same precision

flying around ... leading to bugs like this ;)



#25908 Is it possible to power on/off the 3V3 pin?

Posted by Stefan W. on 23 March 2012 - 07:11 PM in General Discussion

If you truly need 3V3 there, you'd need to use a voltage regulator with an enable/disable input, as a transistor incurs a voltage drop.



#25705 Need some I2C help

Posted by Stefan W. on 19 March 2012 - 12:19 PM in General Discussion

Out of interest, what's that software you are showing in the images (not fritzing ;))?



#25093 Servo Jitters

Posted by Stefan W. on 05 March 2012 - 06:38 AM in General Discussion

There's other ways to make it faster (don't push/pop from a list, instead use a plain array and cycle the index that you are using). However, your main problem is that you only have an accelerometer to measure the orientation of your setup, and accelerometers are jittery in itself - also, for an accelerometer gravity is indistinguishable from you accelerating your hand, so it's expected that your readings are off when you move your hand. What you'd need to do would be to couple the accelerometer with a gyro, and then combine the measurements e.g. complementary filtering - see this Presentation for example.



#22441 Gyroscope Module L3G4200D help

Posted by Stefan W. on 04 January 2012 - 03:58 PM in Netduino 2 (and Netduino 1)

Please look in the specs of your gyro sensor if two transaction without stop-condition between them are needed.


Judging from the arduino sample code, it isn't needed.



#21890 Goodbye .NET MF?

Posted by Stefan W. on 20 December 2011 - 12:42 AM in Netduino 2 (and Netduino 1)

Hello Mario!

At first let me say thanks for presenting your clear view of the netduino. I'm conform with resolving complex requirements in managed code and sourcing the simple stuff out.

But I'm not really sure, if this is an economic way. Before adding a second unit for counting the pulses, I will try to write a driver. I found some tutorials in the net and I understand the technic.


Unless you are going for a large number of units, adding a chip is the economic way. You don't need an original/full arduino, for this an attiny should suffice, those cost you $2 with circuitry or something. Now, I don't know what your time is worth to you, but you'll need way more time changing the netduino firmware ...



Just one question left. Why adding a driver to the firmware for doing this work is not the recommend way? Are there technical problems or is it 'just' against the philosophy of netduino?


Best regards,

Frank


The above is the reason :)



#21738 Pinout Cards

Posted by Stefan W. on 15 December 2011 - 09:46 PM in General Discussion

It can be used for general purpose IO - i.e., using it as an OutputPort or an InputPort.



#21543 Logging 2.5ms strain curves.

Posted by Stefan W. on 10 December 2011 - 01:30 PM in General Discussion

Off-topic, but i ended up looking up the specs of the DSO nano, and found http://www.seeedstud...1.html?cPath=77, which has to be the greatest product title ever.



#21526 Logging 2.5ms strain curves.

Posted by Stefan W. on 09 December 2011 - 11:34 PM in General Discussion

The arduino is only able to reach a 9600Hz sampling rate for the adc, so it will not suffice.



#21406 Forum topics color

Posted by Stefan W. on 06 December 2011 - 08:41 PM in General Discussion

Well, colors are not absolute, especially on LCD screens colors depend a lot on the screen - the links are readable for me (although i'll say that the choice is suboptimal and a darker color would be better)



#21390 Forum topics color

Posted by Stefan W. on 06 December 2011 - 03:25 PM in General Discussion

If you install stylish (https://chrome.googl...jfgmeleoegfcffe - it's free), i made a quick style for you that changes the link color to black (with a grey border so the links on dark background are still visible) - not that pretty, but should be easier on your eyes ... it's at http://userstyles.or...ck-topic-titles



#21020 Analog reading accuracy

Posted by Stefan W. on 27 November 2011 - 02:30 PM in General Discussion

Did you try the usual methods to stabilize the voltages, like in http://highfieldtale...highfieldtales/ - connect aref to 3v3 via a inductor, use a (fast) capacitor between aref and ground and a "big" one between 3v3 and ground?



#20880 Why does the SPI library only have WriteRead()?

Posted by Stefan W. on 23 November 2011 - 02:05 AM in Netduino 2 (and Netduino 1)

The image from the logic analyzer looks like you switched the clock and chip select pins.



#20687 4-digit shield

Posted by Stefan W. on 16 November 2011 - 11:15 AM in General Discussion

binary<->hex conversion is pretty simple, you take groups of 4 binary digits and convert them - you don't need to make a table for the whole byte - 0x78 is 0111 1000 in binary (you can convert the 7 and 8 seperately - works because 16 is a power of 2).



#20670 4-digit shield

Posted by Stefan W. on 15 November 2011 - 09:51 PM in General Discussion

You just need to translate the binary literals to decimal or hex literals - B1000000 is 0x40/64 (as you already have), the rest are zero, add those to the data array that you have (although i don't see the reason for your second execute - that doesn't have an analogy in the arduino part).



#20559 IO PIns state during reset or powerup

Posted by Stefan W. on 13 November 2011 - 11:22 PM in Netduino Plus 2 (and Netduino Plus 1)

A pulldown is not a good solution, as Mario has explained. I don't know why this keeps getting suggested. What you're having effectively then is
o 3v3
  |      
 .-.     
 | |     
 | | 15k 
 '-'     
  |      
  o-----o GPIO
  |      
 .-.     
 | |     
 | | 2k2  
 '-'     
  |      
  o GND

(if i remember the pullup value correctly) which will mean that you read about 0.42V at boot, which might not be logic low for everything. Also, in this setup, you waste ~1.5mA when you want to drive the pin high later ...




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.