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 22-May 23)


By content type

See this member's


Sort by                Order  

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




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

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

Version: 4.2.0 Update 1 (version 4.2.0.1)

This firmware requires use of the .NET Micro Framework v4.2 SDK (QFE2) and Netduino 4.2.0.1 SDK.


Hi Chris,

Is Netduino 4.2.0.1 SDK available at: http://www.netduino....bit_NETMF42.exe url?

When I try to install, it says is from August! Is that correct?

Another question (this is to understand how the fix process takes place): If the update was in the PWM class, and this class is on NETMF 4.2, why do you have to update Netduino SDK? Wouldn't it be a NETMF SDK update?

Thank you,


Igor



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



#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 :-)






#34627 Netduino Plus Firmware v4.2.0

Posted by Igor Kondrasovas on 03 September 2012 - 08:39 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi Igor,


The ADC precision is 10-bits. There is just the one option.

Chris


Thank you Chris,


My question was due to the fact the new AnalogInput class constructor on netmf 4.2.0 has an overload that you can specify precision. So, if you do not use it, what is the default value? This seems not to be detailed on MSDN.

Thank you for the answer!

Igor.



#34616 Netduino Plus Firmware v4.2.0

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

Hi Chris, Do you know what is the default precision for the new AnalogInput class? Could not find anywhere and would like to make sure I can only specify the channel if using Netduino. Thanks!



#34331 ADC Reading wrong?

Posted by Igor Kondrasovas on 28 August 2012 - 07:22 PM in Netduino Plus 2 (and Netduino Plus 1)

Hi Igor,


Large and irregular current draws like Ethernet traffic can create ripples on the 3V3 rail and therefore a bit of bounce on analog readings.

Generally microcontroller developers will average out several readings which gives more accurate readings.

If you're having trouble getting a good analog input, there are quite a few ways to deal with that. One option is to average out analog inputs. Another is to flash your board with the non-Ethernet firmware (or simply unplug the Ethernet cable). The best real-world solution is to place a 100uF cap between the 3V3 and GND headers...providing some bulk smoothing on the 3V3 rail.

We have taken a similar approach with the Netduino Go hardware line, using a fast-response DC-DC switch on the mainboard and placing bulk smoothing caps on the Shield Base to help offset sudden current draws (from other modules).

Chris


That's sounds great for me!

Thank you,



#34325 ADC Reading wrong?

Posted by Igor Kondrasovas on 28 August 2012 - 02:01 PM in Netduino Plus 2 (and Netduino Plus 1)

That's very helpful feedback.

The analog inputs do not block the Ethernet interrupts when they measure readings. We may need to tweak this so that all interrupts are disabled temporarily. That's not a bad thing to do if we're conducting a quick operation--but for extended readings it could be troublesome.

We'll explore it. Thank you again for the testing.

Chris


Hi Chris,

Is there any progress about this (since it is a relatively old post)? Am I writing to say that even today, I might get better results with Netduino classic firmware?


Regards,

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.



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



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



#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);
            }
        }

    }
}



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



#34966 An early look at the RS-232 GoModule specs...

Posted by Igor Kondrasovas on 10 September 2012 - 04:05 PM in Netduino Go


Extended temperature range
We understand that you'll use your Netduino Go both indoors and outdoors. And some users will lock them in industrial plants or subject them to harsher environments.

To help enable these scenarios, we're using a high-end version of the RS-232 interface chip which supports industrial temperature ranges. Of course the premium RS-232 DB9 plug supports these temperatures as well.

Chris


Great News Chris!

What about RS-485? Any plans for that?


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.



#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



#34389 Arduino Motor Shield rev3 driver / library

Posted by Igor Kondrasovas on 29 August 2012 - 06:26 PM in Netduino Go

Hi Igor,


So sorry, this thread is in the Netduino Go forum so I assumed that you were using a Shield Base.


Yes, that should work. You can also bend the pins (on the bottom of the shield) for pin3/pin11 instead of using them as digital inputs; you'll need to connect the pwm pins as mentioned...


We have used the DFRobot and Adafruit shields without any noticeable issues.

Chris


Hi Chris,

My bad posting on the wrong forum.

I think now I got the trick: PWM control to these boards (including the Motor Shield Rev3 and potentially the other ones) are performed on the "enable" pins of L298 chip, so the chip is enabled/disabled accordingly to the PWM duty cycle. Datasheet says 2.5V is OK for high level detection.

The other shield configuration is usually performed using onboard jumpers.

I bought some shields and I will test them when they arrive. Then I will post something in Portuguese for Brazilian community.

Thanks,

Igor.



#34385 Arduino Motor Shield rev3 driver / library

Posted by Igor Kondrasovas on 29 August 2012 - 05:38 PM in Netduino Go

Hi Igor,


Here you go:
http://arduino.cc/en...noMotorShieldR3

Chris


Hi Chris,

Thank you for the reply. On the page you mentioned, PWMA (motor a) and PWMB (motor B) pins are D3 and D11 respectively. These pins are not PWM outputs on Netduino. Is that OK if my application (on Netduino):

1 - Set pin3 and pin11 as digital inputs;

2 - Use pin5 and pin10 as PWM outputs;

3 - connect pin5 to pin3 and pin10 to pin11;

I think someone else should have a better option...

I know .NET Micro Framework Toolbox has support for Adafruit, DFRobot motor shields, but I guess they assume you have are using a 5V TTL logic board, right?


Thanks,

Igor



#34350 Arduino Motor Shield rev3 driver / library

Posted by Igor Kondrasovas on 28 August 2012 - 11:12 PM in Netduino Go

Yes, I have, but nothing for stepper motors. I only have experience with servo motors and regular 'hobby' motors (DC motors)

I've written code for the Adafruit Motorshield, available here:
http://netmftoolbox....ruitMotorshield

It may help understanding the principles of PWM itself.



Hello Stefan,

Do you think that Netduino 3.3V logic level can cause any problems on driving generic Arduino (5V) motor shields based on the L298 bridge? I am not aware of this bridge details, so I am not sure if it takes actually the PWM pulses or the average voltage. In case of second option, we could never be able to run the DC motors at maximum speed, right?

I was having a look at the datasheet, and although I did not find the information there, I believe this bridge uses the LOGIC SUPPLY VOLTAGE VSS input voltage to compare with the average voltage generated by the PWM. However, the minimum value accepted is 4.5V..

What do you think?

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.



#34381 Arduino Motor Shield rev3 driver / library

Posted by Igor Kondrasovas on 29 August 2012 - 04:24 PM in Netduino Go

Hi Chris,

Hi Igor,


If you're using the Arduino "REV3" motor shield, you should be good. It has an IOREF pin which reads the 3V3 voltage from the mainboard...and should adjust accordingly as needed.

Chris


I think you mean Adafruit's motor shield, right? Do you have a quick tip on how to make sure it is REV3? I am looking at Adafruit website and not revision is specified nor if there is any IOREF pin.


Thanks,

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.



#32354 Servo Control with Netduino

Posted by Igor Kondrasovas on 20 July 2012 - 01:16 PM in General Discussion

Hello Arbiter, Let me share the progress I did. It seems this servo works well with PWM pulse duration from 1000 to 2000 ms. This servo seems to move up to 60 degrees. As I am not used to work with servos, I was scared with the strange noise, but after looking at the Netduino wiki servo experiment video, the noise seems to be very similar. Regarding the code on oomlout, I changed the min an max variables to 1000 and 2000 respectively. This improved the results but is still not the same as the code on the wiki. I suspect this is due to the fact code on oomlout gets the desired position in degrees and calculates the corresponding pulse duration (casted to uint). This will lead to very specific values. I added a breakpoint after the servo.setpulse call and there are some values the servo seems not to like (jitter). Well, the answer to my original question seems to be "YES", I can drive the servo using 3.3 volts. It would be great if you could share your results. Thanks, 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.