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.

Steve Hall

Member Since 27 Jan 2011
Offline Last Active Nov 02 2011 03:03 AM
-----

Topics I've Started

I think I killed it :(

11 July 2011 - 10:43 AM

Not sure exactly what I did ... but I have a number of Easydriver boards connected and an external 12V supply plugged into the Netduino. Was removing the USB and knocked the 12V. Everything flashed off for a second ... now both lights are on and the project doesnt work anymore :( I've tried to get SAM-BA running but I have Windows 7 on my laptop nad Vista on the desktop. SAM-BA on 1st connection offers COM1 and I can select the device (at91sam7x512-ek) but when I hit connect the little pop-up selection screen disappears and nothing (although I note that I have a sam-ba_cdc.exe process still running) I've tried the MFDeploy but it can't find the device on USB or COM . Also when I plug-in the Netduino I get a message USB device not recognised. (pics attached) I've tried ... (1) erasing by connecting 3.3V power pin to the gold spot below the 0 pin (5 seconds) and reconnecting (2) having a beer Neither changed anything ... any help appreciated Thanks

How much power is to much ?

19 February 2011 - 10:35 AM

Hi,

I have a 12v 3.0A power adapter powering the netduino.

I need to power a Dual Motion Linear Actuator (ie 2 stepper motors)
-Operating voltage 2.33 VDC
-Current/phase 1.25 A
-Resistance/phase 1.86Ω

also I have the following attached
- 1 DF Robot LCD Keypad shield (connected to 5v)
- 2 Sparkfun Easydriver boards (connected only to the 12v)
- 1 Sparkfun Logic Converter (connected to 3.3v and 5v)
- 1 Phidgets FlexiForce adapter (connected to the 5v)


OK, so my question is ... will these draw too much power and do damage to the Netduino ?

How best to power something like this ?

Thanks

Beginner Help: Pausing threads

13 February 2011 - 09:38 AM

Hi all, I'm new to all the .NET programming stuff so please excuse me if I don't explain this exactly right.

I have an applicataion that controls a stepper motor and an LCD with keypad.

I have the stepper motor and LCD_keypad set up as classes.

My main program is like this
 public class Program
    {
         
        public static void Main()
        {
            Winder _winder = new Winder();

           _winder.Run();

    

            //Keep thre application running 
          Thread.Sleep(Timeout.Infinite);
        }



My Winder program controls the stepper motor as well as controlling menus and taking input from the keypad and putting info onto the LCD.

    class Winder :IDisposable
    {

        // Constants for timer operations
        const int KEY_TIMEOUT = 100; // Milliseconds between menu operations
        const int TURN_OFF = -1;
        const int TURN_ON_NOW = 0;
        const int TURN_ON_SOON = 100;

        // Control Timers
        Timer keyTimer;
       

        public void Run()
        {
            // Initialise LCD            
             LCDKeypad.Initialize();

            // Display the welcome splash
            DisplayWelcome();

            Stepper.Initialize();
            Stepper.Stepmode(0, 0);
            Stepper.Stepmode(1, 0);

            // Set up timer to check for Keys
            keyTimer = new Timer(on_keyTimerTick, null, TURN_ON_NOW, KEY_TIMEOUT);

          
        }

the key timer will check for key-press every 100ms. If a key press is detected it handles appropriately. This part all works nicely.

However, if I instruct the stepper motor to move I need to do the following, which is to send a high-low pulse to the stepper controller (Sparkfun Easydriver) followed by a small pause. When I had my old "in-line' program which involved a do-while-true loop, this code worked fine. However, now, I think the Thread.Sleep(Infinite) is mucking me up.
       public static void Step(int motor, int steps, bool direction,  int timing)
            {
              // Set Direction
               if (motor == 0)
              {
                 directionPort.Write(direction);
               }
               else
               {
                  directionPort_H.Write(direction);
               }

               LCDKeypad.Print(1, 11, "Spin");
               // Step number of required steps
               for (byte i = 0; i < steps; i++)
               {
                 if (motor == 0)
                   {
                    stepPort.Write(false);
                    stepPort.Write(true);
                   }
                 else
                   {
                    stepPort_H.Write(false);
                    stepPort_H.Write(true);
                   }

                 // Pause required time between steps

                 Thread.Sleep(timing);

               }
               LCDKeypad.Print(1, 11,"    ");
            }



The code above will flash "Spin" on and off on the LCD but the motor doesn't move. If I just drop the same code into the mainlin of my program in a do-while loop the motor spins.

How can I "space out" the pulses to the stepper motor when the Threads already asleep indefinitely ?

Any help appreciated.

Thanks :)

2x16 LCD Menu Class ?

09 February 2011 - 11:23 AM

Hi,

I've managed to get an DF Robot LCD Keypad working with the netduinoso I have a 2 x 16 LCD screen and 5 buttons (nominally Up, Down, Left, Right and Select).

I'm wondering if there already has been Menu system built for a 2x16 or one that can be adapted. (I've searched and found little).

I'm happy to have a go building one ... but I've can't recall any 2-line menu system that I'd like to emulate.

Any suggestions on style or good working examples greatly appreciated.

Thanks

Using Analog IO ports ad Digital ?

31 January 2011 - 12:32 PM

another n00bie question (sorry)

My current project is using 10 of the digital IO ports on my Netduino.

I'd like to add this LCDKeypad Shield but I'm not sure I have enough ports left on the Netduino to accomodate the extra required 6 Digital and 2 analog IO ports.

Ports 14 and 15 on my netduino are labeled "Aref" and "Gnd" do these work like standard Digital I/O ports ?

Also, I think that the Analog ports should be able to function as both ... is this also true ?

Thanks

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.