jmlynesjr

Member Since: May 29, 2012

Country: United States

  • News - Ladder Logic | about 11 months ago

    Many if not most roller-coasters since the 1970s have been controlled by PLCs. Allen-Bradley was involved and pushed to continuously provide faster and higher capacity PLCs for this application area.

    Industrial technicians aren’t software engineers and in many cases are mechanics. Ladder logic is easily taught to these techs which allows the tech to troubleshoot low to medium complexity problems on their own. The engineer(s) are probably not on-site or even in-country at this point in time.

    Pneumatic controls are still heavily used in nuke plant controls due to the slow, expensive process required to qualify any new equipment for that environment. Utilities keep equipment forever, so you’ll see a mix of technologies still in-use.

    James

  • News - Your March Caption Contes… | about a year ago

    Leasing office space by the square inch is great for the bottom line.

  • News - Remembering Aaron Swartz | about a year ago

    The criminal “justice” system is a black hole that when you are on the outside you can’t see in, and when you are sucked into it, you can never get out. Just being charged ruins you, regardless of whether you are eventually plead or convicted.

  • Product COM-10596 | about a year ago

    PP: Yes, could just be a flaky unit. I don’t have an o-scope to check it out in detail. Works ok for my needs as is. Worth $2.95 plus the BOB. I have a polled version also that works about the same as the interrupt version. Haven’t tried hardware debounce yet. I saw timer based code out there as well. With the 32bit 80mhz chipKIT I’m not worried about a few cycles.

    James

  • Product LCD-09396 | about a year ago

    Check the wiki for the HD44780. The chip supports commands that aren’t mentioned in the datasheet.

    James

  • News - Welcoming Our New Robot F… | about a year ago

    Are you feeding your modifications back to the manufacturer for inclusion in the next machine upgrade? And of course you could then be a beta tester and get a second machine out of the deal. Or even become the US rep… James

  • Product COM-10596 | about a year ago

    After trying several versions of the decoding methods listed in the references in “Documents” above, below listed is what I have found to work best for me. This encoder seems to have a lot of jitter/bounce/noise and apparently doesn’t stay where set, as you can get outputs without moving the shaft. The 3ms delay/software debounce seems to clear up most of this, but counts seem to be getting missed as well. I think hardware debounce will be needed to clean this up further.

    James

    // RotaryEncoderISR3.pde
    
    // Interrupt driven rotary encoder library for the chipKIT UNO
    // Uses the Pin Change Library by Majenko from the chipKIT Forum
    //                  http://sourceforge.net/projects/chipkitcn
    
    // Uses Sparkfun Rotary Encoder - Illuminated(Red/Green) COM-10956
    // and Sparkfun Rotary Encoder Breakout - Illuminated(Red/Green) BOB 10954
    
    // Last Modified: 12/30/2012 James M. Lynes, Jr.
    
    // The average rotary encoder has three pins, seen from front: A C B
    // Clockwise rotation A(on)->B(on)->A(off)->B(off)
    // CounterCW rotation B(on)->A(on)->B(off)->A(off)
    // and maybe a push switch with another two pins and led backlights
    // usually the rotary encoders three pins have the ground pin in the middle
    
    // Rotary encoder decoding using two interrupt lines.
    
    // (Original Program sketch is for SparkFun Rotary Encoder sku: COM-09117)
    // Adapted from code at: home.online.no/~togalaas/rotary_encoder
    // Connect the middle pin of the three to ground.
    // The outside two pins of the three are connected to
    // digital pins 14 and 15
    
    
    #include ChangeNotification.h
    
    int encoderPin1 = 14;                                    // Pin 14 / A0 / CN_4
    int encoderPin2 = 15;                                    // Pin 15 / A1 / CN_6
    
    volatile int number = 0;                        // Testnumber, print it when it changes value,
                                                    // used in loop and both interrupt routines
    volatile boolean halfleft = false;              // Used in both interrupt routines
    volatile boolean halfright = false;             // Used in both interrupt routines
    
    int oldnumber = number;
    
    void setup(){
      Serial.begin(9600);
      pinMode(encoderPin1, INPUT);
      digitalWrite(encoderPin1, HIGH);                  // Turn on internal pullup resistor
      pinMode(encoderPin2, INPUT);
      digitalWrite(encoderPin2, HIGH);                  // Turn on internal pullup resistor
      attachInterrupt(CN_4, isr_A, FALLING);        // Call isr_2 when digital pin 2 goes LOW
      attachInterrupt(CN_6, isr_B, FALLING);        // Call isr_3 when digital pin 3 goes LOW
      Serial.println("Starting Driver");
    }
    
    void loop(){
      if(number != oldnumber){                      // Change in value ?
        Serial.println(number);                     // Yes, print it (or whatever)
        oldnumber = number;
      }
    }
    
    void isr_A(){                                           // A went LOW
      delay(3);                                             // Debounce time
                                                            // Trade off bounce vs missed counts
      int bits = PORTB;                                     // Atomic read of encoder inputs
      int LSB = (bits >> 2) & 0x01;
      int MSB = (bits >> 4) & 0x01;
    
      if(LSB == LOW){                                   // A still LOW ?
        if(MSB == HIGH && halfright == false){          // CW
          halfright = true;                                 // One half click clockwise
        } 
        if(MSB == LOW && halfleft == true){             // CCW
          halfleft = false;                                 // One whole click counter-
          number--;                                         // clockwise
        }
      }
    }
     void isr_B(){                                          // B went LOW
      delay(3);                                             // Debounce time
                                                            // Trade off bounce vs missed counts
      int bits = PORTB;                                     // Atomic read of encoder inputs
      int LSB = (bits >> 2) & 0x01;
      int MSB = (bits >> 4) & 0x01;
    
      if(MSB == LOW){                                   // A still LOW ?
        if(LSB == HIGH && halfleft == false){           // CCW
          halfleft = true;                                  // One half  click counter-
        }                                                   // clockwise
        if(LSB == LOW && halfright == true){                // CW
          halfright = false;                                // One whole click clockwise
          number++;
        }
      }
    }
    
  • News - Python and GPS Tracking T… | about a year ago

    I use Perl and the Device::SerialPort::Arduino library from CPAN. This is very easy to use also.

    I use the chipKIT UNO version of the Arduino family.

    James

  • Product COM-11443 | about a year ago

    Just got this display working with a chipKIT UNO board using I2C. Connected the +5v, GND, SCL, & SDA lines. No pull-up resistors were required(the internal pull-ups are enabled on the backpack).

    The chipKIT is a 3.3v device(with 5v also available on-board), and I have seen no problems with the backpack having any trouble reading this logic level. i.e. it doesn’t look like a level converter will be necessary.

    I wrote a driver based on the Github Repo examples referenced above. I have written drivers for SPI and Serial also, but have not tested these at this time.

    Think out how you intend to mount/test this board BEFORE you solder in the pin headers. I didn’t. DUH! I populated the 10 pins on the long side and 4 pins on a short side and now the board won’t plug into my prototyping board. So, I’m connecting with jumpers.

    This release of the display seems nice and bright.

    James, KE4MIQ

    Update1: I now have the SPI and Serial drivers working. Still no problem with the chipKIT 3.3v levels.

    Update2: Code posted on http://www.chipkit.org/forum/ Topic: “Sparkfun 7-Segment Serial Display - COM-11443”

  • Product BOB-08745 | about a year ago

    Read this appnote. Print the schematic and compare to the BOB schematic. All will make sense! Thanks for the reference Quazar. Gotta get some of these on order as my chipKIT Uno is a 3.3v device.

No public wish lists :(