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.

Igor Kondrasovas's Content

There have been 57 items by Igor Kondrasovas (Search limited from 17-April 23)


By content type

See this member's


Sort by                Order  

#46545 Backup Battery

Posted by Igor Kondrasovas on 02 March 2013 - 09:05 PM in Netduino Plus 2 (and Netduino Plus 1)

Hello,

 

I would like some tips about using a secondary power source (like a battery) to make sure that if my main power supply (on the power jack) goes down, my Netduino stills run.

 

I was thinking about using a secondary 5V battery attached to VIN pin. My questions are:

 

1 - Can I power Netduino using both the power jack and the VIN pin at the same time?

2 - If yes, will the battery power be used only when the main power is off? I am afraid that maybe the battery power will also be consumed....

 

Any other advice?

 

Thank you,

 

Igor.

 




#44581 ADC Breakout instead of AnalogicInput

Posted by Igor Kondrasovas on 29 January 2013 - 10:26 PM in Netduino Plus 2 (and Netduino Plus 1)

Hello,

 

We are working in a project where we have to read data from electronic weight scales. The signals will come in 4-20mA signals that must be processed by Netduino Plus.

 

Suppose we solve the current to voltage conversion and deliver 0 to 3,3V to the Netduino analog input. We know there is some noise and some filtering may have to be applied. I believe this is common to most class of microcontrollers.

 

In order to minimize this noise, we were thinking about using some external ADC with SPI or I2C interface, like the Adafruit ADS1015 or MCP3008.

 

I would like to know if using these (or any other) chips or breakout boards will potentially provide lower noise levels? I mean, do they have a better noise immunity/treatment compared to the native Netduino ADC filter?

 

 

Thank you,

 

Igor.




#44008 Introducing Netduino Plus 2

Posted by Igor Kondrasovas on 23 January 2013 - 12:09 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi Chris,

 

Can you give us a little update about what are the news regarding Power Management on Netduino Plus 2? There is an interesting topic here on this post, but I would like to know if there is something else missing that is exclusive to ND+2

 

Thank you,

 

Igor.




#39370 Error: Failed allocation for 434 blocks, 5208 bytes

Posted by Igor Kondrasovas on 14 November 2012 - 07:17 PM in General Discussion

Hi Igor,

Good thinking.

The interrupts should be queued (and NETMF will actually drop some if you get too many, to prevent overflows).

But yes, if you get too many queued up...you could eventually run out of memory. This is more of an issue on Netduino Plus 1 than Netduino Plus 2, but it's true for any devboard.

Chris

P.S. Are you getting any glitching (extra state switching) on your input? Or is it an accurate pulse?


Hum...so there is no "nesting" on the interrupt handlers. In fact they are queued an stays on the queue until the previous interrupt handler if finished, right? Like a FIFO behavior.

Pulses seems to be accurate. With a 2KHz input pulse (generated by a PWM on another Netduino) I got stable readings. Should it make difference if I set InterruptPort to use pullup?

Thanks,

Igor.



#39362 Error: Failed allocation for 434 blocks, 5208 bytes

Posted by Igor Kondrasovas on 14 November 2012 - 06:38 PM in General Discussion

With the word 'failed' it makes the message seem like something is messed up.

Thanks for the quick reply Chris.


Hello Chris,

Sorry for bringing back this thread, but I am also experiencing something similar when making some fast input readings using interrupts.

My scenario is similar to this thread: http://forums.netdui...goodbye-net-mf/

After upgrading to firmware 4.2 I started to get these "Failed allocation for X blocks". To verify if my app was still running I put some LED blinking, but it seems the app is crashing.

I would like to confirm if my thinking is correct:

As my test app does not allocate much objects but it does use interrupts, I suspect the memory is missing due to the "nested interrupts". In other words, during the interrupt handling my application receives a new interrupt request that is also handled before the first interrupt is completely treated. So after some time there will be no RAM enough for saving such a huge stack, correct?

I tried to change the InterruptMode to InterruptLevelHigh instead and the error messages were gone. This way I would "avoid" having nested interrupts as I reactivate it only at the end of the handler. Obviously I will loose input pulses this way...

Igor.



#39349 High Resolution Quad Encoder Problem

Posted by Igor Kondrasovas on 14 November 2012 - 05:19 PM in General Discussion


All I did was to reinfoce duty cycle after setting a new frequency. Then I could get reading around 3.5KHz! After that my Netduino Classic stucked. I will upgrade it to .NET 4.2 and run the tests again as soon as I can, than I let you know the results.

Thank you,

Igor.


Well, I did the tests running Firmware 4.2 and I got similar results as reported in this thread: http://forums.netdui...goodbye-net-mf/

Now I will make some readings about what this erros message is and why it is hapenning. Either way, I think I will have to use an external componet for encoder reading.

Igor.



#38941 High Resolution Quad Encoder Problem

Posted by Igor Kondrasovas on 10 November 2012 - 07:53 PM in General Discussion

Hello, Today I tried the same scenario using an Arduino to receive the pulses (acting like the component that will count pulses). As soon I started the tests I realized I got the same strange behavior when the frequency was around 30Hz. So, I was pretty sure I was doing something silly in my pulse generator code. As I don't have an oscilloscope in hands here, I doubted if the PWM class was keeping the duty cycle to 50% (as declared on the PWM construtor) after I set a new frequency. And I realized it was not! so the problem was when I increased frequency, I was also indirectly increasing the relative dutycycle (since the duration was fixed) until we got a fixed true logic level on the PWM output. That was the reson I could not read after 32 Hz (2x16Hz). All I did was to reinfoce duty cycle after setting a new frequency. Then I could get reading around 3.5KHz! After that my Netduino Classic stucked. I will upgrade it to .NET 4.2 and run the tests again as soon as I can, than I let you know the results. Thank you, Igor.



#38861 High Resolution Quad Encoder Problem

Posted by Igor Kondrasovas on 09 November 2012 - 04:10 PM in General Discussion

Ijor,

I haven't tried anything like that but whould like to try it with the new Netduino Plus 2 if mine comes in this weekend. Can you post the code that you used for the test so I can get a fair test for comparision against a Netduino Plus 1.

Chuck


Hello Chuck,

It would be nice if you could share your results as well. I suspect something is wrong, since 30hz is very low. The other reason is that after 30Hz, instead of losing some pulses it seems my application is loosing all of them, since the counting goes to practically zero pulses per second.

The following code shows the "Encoder" application that will count the received pulses on the digital input 0 using interrupts and display the counted pulses every second, reseting the counter.

namespace Encoder
{
    public class Program
    {
        private static InterruptPort encoderIn;
        private static int pulses;

        public static void Main()
        {
            encoderIn = new InterruptPort(Pins.GPIO_PIN_D0, true, Port.ResistorMode.Disabled, Port.InterruptMode.InterruptEdgeHigh);
            encoderIn.OnInterrupt += new NativeEventHandler(encoderIn_OnInterrupt);
            pulses = 0;

            while (true)
            {
                Debug.Print("Frequency=" + pulses.ToString());
                
                pulses = 0;
                Thread.Sleep(1000);
            }
        }

        static void encoderIn_OnInterrupt(uint data1, uint data2, DateTime time)
        {
            pulses++;
        }

    }
}


The following code generates a PWM pulse to simulate encoder behavior. When you turn the potentiometer on the anolog input the frequency increases. 16Hz is the slowest PWM pulse I could set.


namespace GeradorSinal
{
    public class Program
    {
        public static void Main()
        {
            PWM pwm = new PWM(PWMChannels.PWM_PIN_D9, 16, 0.5, false);
            AnalogInput pot = new AnalogInput(AnalogChannels.ANALOG_PIN_A0, 10);

            while (true)
            {
                pwm.Frequency = 16 + pot.Read() * 100;
                Debug.Print("Frequency=" + pwm.Frequency.ToString());
                
                System.Threading.Thread.Sleep(1000);
            }
        }

    }
}



#38763 High Resolution Quad Encoder Problem

Posted by Igor Kondrasovas on 08 November 2012 - 05:10 PM in General Discussion

There's a couple of ways you can deal with your scenario. If your PID controller is for speed only then the only problem you'll face is convergence speed and possible overshoot depending on your performance specification. Even if the interrupt frequency basically matches the transport delay of the netduino hardware/framework, you just design your PID outer control loop as fast as the device can.

Position control for 3600 interrupts/sec is going to be hard. Depending on how smooth the control needs to be, you would probably have to slow the motor down. If you have to maintain a particular speed range then you'll most likely have jerky position control from lack of controller bandwidth and transport delay.

Although the netduino is capable of 100ns precision timing, most timing functions have 1ms precision. Do you have an option of a lower resolution encoder or do you need to have ridiculously fine position control?


I did the following test today to have a rough estimative of how fast a Netduino can handle interrupts:

1 - Create a small application on a Netduino Plus to use PWM to ouput signal pulses to simulate encoder pulses (only a single pulse for testing). I used a precision potentiometer to send pulses in frequences from 16 Hz (the minum value I could set) until a bit more than 100Hz.

2 - Create another small app in another Netduino to read the signals from the other Netduino using interrupts (edge high only). The interrupt routine simply incremented a variable that stores pulses. In the main loop, I print the pulse counts on the debug window and reset the counter.

The results are: Running at 16Hz, everything goes fine. Actually everything goes fine until about 30Hz, where my second netduino seems to be loosing pulses.

Does anyone else have similar (or different) results to share?

Thank you,

Igor.



#38682 High Resolution Quad Encoder Problem

Posted by Igor Kondrasovas on 07 November 2012 - 06:27 PM in General Discussion

Well, I understand the concept and I dont have a problem writing the code for say a 2.4GHz processor x86 with a 4 GBs of ram sampling time of around 1e-6 second easily, the problem I had over here was using this high resolution encoder with a netduino thats all. Just to put things in perspective, if the shaft is rotating at 3 revs/second (180 rpm which is not much )thats 1200*3 = 3600 interrupts/second. I just need help on generating an efficient enough code for the netduino to be able to handle all that along side of some computation thats all. Like I said I am just not used to micro-framework.


Hello Ahmed,

Did you make any progress to use your encoder directly into Netduino? What were the results? Any progress?

Thank you,

Igor.



#37354 SPI.configuration and L6470 Stepper Driver

Posted by Igor Kondrasovas on 17 October 2012 - 11:31 PM in Netduino 2 (and Netduino 1)

Hi Kristoffer, Can you please give us some update about how the usage of this driver L6470 is going? I am planning to use it in a new project with Netduino Classic and would like to know how was your experience. Did you develop some kind of driver or library for it? Thank you, Igor.



#36658 Compiling problems on new devenv

Posted by Igor Kondrasovas on 06 October 2012 - 10:38 PM in General Discussion

Hi Igor,

The .NET MF SDK tools have a dependency on an older version of NETMF. Windows 8 seems to prompt users to install .NET 3.5 if an application needs it, but it may have trouble detecting that for build tools and such.

Sorry for any troubles this may have caused you. Are you up and running now?

Chris


Hi Chris,

Let me forward this information and if I am still in trouble I will let you know.

Thank you very much,

Igor.



#36657 Compiling problems on new devenv

Posted by Igor Kondrasovas on 06 October 2012 - 10:21 PM in General Discussion

This problem has been already discussed a few times in the forum, have a look for example at Build error 0x80131700. The solution is to install .NET Framework 3.5, or use a config file for MetaDataProcessor.exe.


Hello CW2, thank you for the reply,

I always look for answers before starting a new thread, but I could not find anything related on the forum search. Thank you anyway.

Igor.



#36644 Compiling problems on new devenv

Posted by Igor Kondrasovas on 06 October 2012 - 06:37 PM in General Discussion

Hello, Today one of my students experienced a problem while installing the free tools to work with Netduino. He is using a 64-bit Windows 8 RTM + Visual C# Express 2010 + .NET Micro Framework SDK 4.2 + Netduino SDK 4.2 64-bit. When he creates a new project, there is a very strange compiling error (shown in the attached image): Description: 0x80131700 File: MMP Has anyone experienced the same problem? How can I track down what is going on. I already removed/reinstalled everything with no effect. I appreciate any suggestions! Thank you, Igor.

Attached Thumbnails

  • erro.png



#36336 Visual C# Express 2010 ISO Download

Posted by Igor Kondrasovas on 01 October 2012 - 01:53 AM in Visual Studio

1348923675[/url]' post='36256']
Igor,

As both Charles and I mentioned the sixth one down is an ISO. It is not a web installer. It is a 649MB ISO file. I downloaded and installed it on a test system before I posted the info.


Sorry guys, did not paied attention on the 6th item stuff.
Thank you,
Igor



#36333 Netduino Console

Posted by Igor Kondrasovas on 01 October 2012 - 12:55 AM in Project Showcase

Hello Bandage, Congratulations for the project!! How hard it will be if had to use the message mechanism you created without the user interface? Imagine that I want to exchange messages to Netduino from an existing desktop application I already have? Another question is: What is the connection type between Netduino and the PC? Serial? Thank you for the nice work! Igor



#36255 Visual C# Express 2010 ISO Download

Posted by Igor Kondrasovas on 29 September 2012 - 12:54 PM in Visual Studio

Hi Charles,

I am not sure if this is what you mean, but there is an "all-in-one" ISO available on the microsoft website. It says you can use it for free for 30 days, after that you need to register for a free key. I am not familiar with the express versions, so my apologies if this is wrong. The download is available at http://www.microsoft...#d-2010-express, 6th item from the top.



Sorry but the URL you mention makes you download a "installer" and I need an internet connections for that. I want a "redistributable package" or something.

Thank you,

Igor.



#36253 Introducing MicroWorkflow for Netduino

Posted by Igor Kondrasovas on 29 September 2012 - 12:47 PM in Project Showcase

Congratulation Mario!! Nice work!

I can wait to make my first test one it. As a teacher, I am planning to create a robotics platform based on Netduino. It would be great if I could use MicroWorkflow to help students with their first programming experience!

I know there is a interesting tool called Scratch. And there is also a hack of it called "Arduino for Scratch" that I was having a look recently.

Is MicroWorkflow open-souce?


Thank you,

Igor.



#36194 Visual C# Express 2010 ISO Download

Posted by Igor Kondrasovas on 28 September 2012 - 04:54 PM in Visual Studio

Hi, It seems after VS2012 lauch, the 2010 Express versions do not have .ISO file download option anymore. It seems that only web installation is available. I need to have the .ISO for 2010 version to run my Netduino projects and the .ISO download is important to install in classes I teach. The Internet connections are not fast and reliable so we will loose too much time usint the download install. Do you know where I can download the ISOs ? Thank you, Igor.



#35888 RTC on Adafruit Data Logging Shield

Posted by Igor Kondrasovas on 24 September 2012 - 12:41 PM in Netduino 2 (and Netduino 1)

Hi,

I have the Adafruit data logging shield on my netduino. The SD card works fine and I would also like to use the real time clock feature.

How do i use this?

Thanks,



Hello meterMan,

What is the SD card size limitation for the Adafruit data logging shield? I could not find any information on the site.


Thanks,

Igor.



#35664 Netduino Plus 1 Firmware v4.2.0 (update 1)

Posted by Igor Kondrasovas on 20 September 2012 - 09:48 PM in Netduino Plus 2 (and Netduino Plus 1)

At first glance, are you setting the frequency to 1Hz? That may be too slow for the 16-bit PWM. Can you change that to a faster frequency (perhaps 100 Hz?) and see if that works?

Chris


You see, I was right about making something silly! :blink:

It is working great now!

I think I know what you mean being too slow. The PWM works with the micro controller internal counters and they cannot count up to such a big value. This is what happens when you do not have to look at datasheets to program !

Thank you,

Igor.



#35658 Netduino Plus 1 Firmware v4.2.0 (update 1)

Posted by Igor Kondrasovas on 20 September 2012 - 09:23 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi Chris, here you go:

Hi Igor,


Can you share the code which is throwing the exception?

Chris


public static void Main()

{

Microsoft.SPOT.Hardware.PWM led = new Microsoft.SPOT.Hardware.PWM(PWMChannels.PWM_PIN_D9, 1, 0.5, false);

led.Start();

System.Threading.Thread.Sleep(Timeout.Infinite);

}

The exception is thrown on the led constructor. Please tell me I am doing something silly :-)






#35653 Netduino Plus 1 Firmware v4.2.0 (update 1)

Posted by Igor Kondrasovas on 20 September 2012 - 09:12 PM in Netduino Plus 2 (and Netduino Plus 1)

Hum... so it seems I have problem after updating firmware to 4.2.0 update 1.

I created a new Netduino Plus project and instantiated a new PWM class. When I start debugging the deployment is succeeded but I got an unhandled exception "System.InvalidOperationException" in Microsoft.SPOT.Hardware.dll

Here are the device capabilities (from MFDeploy tool):

HalSystemInfo.halVersion: 4.2.0.0

HalSystemInfo.halVendorInfo: Netduino Plus (v4.2.0.1) by Secret Labs LLC

HalSystemInfo.oemCode: 34

HalSystemInfo.modelCode: 177

HalSystemInfo.skuCode: 4097

HalSystemInfo.moduleSerialNumber: 00000000000000000000000000000000

HalSystemInfo.systemSerialNumber: 0000000000000000

ClrInfo.clrVersion: 4.2.0.0

ClrInfo.clrVendorInfo: Netduino Plus (v4.2.0.1) by Secret Labs LLC

ClrInfo.targetFrameworkVersion: 4.2.0.0

SolutionReleaseInfo.solutionVersion: 4.2.0.0

SolutionReleaseInfo.solutionVendorInfo: Netduino Plus (v4.2.0.1) by Secret Labs LLC

SoftwareVersion.BuildDate: Sep 19 2012

SoftwareVersion.CompilerVersion: 410894

FloatingPoint: True

SourceLevelDebugging: True

ThreadCreateEx: True

LCD.Width: 0

LCD.Height: 0

LCD.BitsPerPixel: 0

AppDomains: True

ExceptionFilters: True

IncrementalDeployment: True

SoftReboot: True

Profiling: False

ProfilingAllocations: False

ProfilingCalls: False

IsUnknown: False


What do you suggest? I already tried changing USB ports and reseting the PC.

I was using firmware 4.2.0 before and it was OK...

Igor.



#35634 PWN classes after 4.2 firmware upgrade

Posted by Igor Kondrasovas on 20 September 2012 - 07:38 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi Chris,

Hi Igor,
Absolutely. The new PWM classes base everything off of a 1MHz clock so frequency and period are both calculated using microsecond precision.

Chris


Great!

I used 1MHz as an example. Can I use the same clock frequency as the micro controller (48 MHz)? Is there any limit?

I have no application for that at the moment. Just trying to answer some questions!

Thank you,

Igor.



#35629 PWN classes after 4.2 firmware upgrade

Posted by Igor Kondrasovas on 20 September 2012 - 07:02 PM in Netduino Plus 2 (and Netduino Plus 1)

We have fixed the issue and will be posting updated firmware (4.2.0.1) later today.

For those interested...the PWM prescaler on SAM7X is (48MHz / (2^x)). We were calculating it as (48MHz / x). Since this figure is then divided by 48, a prescaler of 1 was driving the PWM clock at 500KHz instead of 1MHz as intended.

Chris


Hi Chris,

With this new PWM class available from 4.2.0, are PWM classes still running at 10KHz? Can I specify a greater frequency using this new PWM constructor overload. For instance, can I specify frequency_Hz parameter something like 1000000 and run a PWM at 1MHz?

public PWM(Cpu.PWMChannel channel, doublefrequency_Hz, double dutyCycle, bool invert);

Sorry, I have no oscilloscope here to check.

Thank you,

Igor.




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.