Welcome! Log In Create A New Profile

Advanced

Reprap Full Graphic Smart Controller jog not working

Posted by Gannicus 
Reprap Full Graphic Smart Controller jog not working
June 05, 2017 06:27PM
Hey guys. Recently had to take my printer apart, and when I put it back together, the LCD works, but the knob doesn't jog. I can click it, and go from the hud to the menu system, but once in there, I can't scroll through the menus.

I've tried it with another LCD I had for a CNC project still in the packaging, with new header board and cables, I even went so far as to try it on a BRAND new arduino and ramps board ( again, that I bought for the CNC project ) with NOTHING else plugged in but the power from the USB to my laptop. I'd also have you know, I tried 4 different USB cables, to rule that out. Including two of those short big blue ones the arduinos come with.

I check the potentiometer and I'm not sure exactly HOW to test this particular kind? I don't have an autosensing OHMS multimeter. I reflowed all the solder connections for the pot, because they looked like crap, and still...it behaves the same way.

Thoughts? Suggestions on how to test this further?
Re: Reprap Full Graphic Smart Controller jog not working
June 05, 2017 06:58PM
Its not a potentiometer (variable resistor)

Its just 2 switches (well 3 if you including the select button)
Known as a Rotary Encoders

See [howtomechatronics.com] for details.

So just turn the knob slowly and check the continuity , it should go on off on off..., check both outputs
Re: Reprap Full Graphic Smart Controller jog not working
June 05, 2017 07:02PM
Quote
Dust
Its not a potentiometer (variable resistor)

Its just 2 switches (well 3 if you including the select button)
Known as a Rotary Encoders

See [howtomechatronics.com] for details.

So just turn the knob slowly and check the continuity , it should go on off on off..., check both outputs

Hey Dust, Thanks for the knowledge pal! I had no idea. Ok...so I did test that, and I got continuity across the board like you said.
So what could be the problem with not being able to scroll through the menu system??
Re: Reprap Full Graphic Smart Controller jog not working
June 05, 2017 08:09PM
Use the test code on that page, just change outputA and outputB to the pins used on the mega
Its different for each type of display
for RRD full graphics smart controller its pins 35 and 37

Upload this code and open the arduino serial monitor use 9600 baud to see the output.

NB this will overwrite your firmware, so make sure you can put it back first, or use a test board.



    /*     Arduino Rotary Encoder Tutorial
     *      
     *  by Dejan Nedelkovski, www.HowToMechatronics.com
     *  
     */
     
     #define outputA 35     
     #define outputB 37
     int counter = 0; 
     int aState;
     int aLastState;  
     void setup() { 
       pinMode (outputA,INPUT);
       pinMode (outputB,INPUT);
       
       Serial.begin (9600);
       // Reads the initial state of the outputA
       aLastState = digitalRead(outputA);   
     } 
     void loop() { 
       aState = digitalRead(outputA); // Reads the "current" state of the outputA
       // If the previous and the current state of the outputA are different, that means a Pulse has occured
       if (aState != aLastState){     
         // If the outputB state is different to the outputA state, that means the encoder is rotating clockwise
         if (digitalRead(outputcool smiley != aState) { 
           counter ++;
         } else {
           counter --;
         }
         Serial.print("Position: ");
         Serial.println(counter);
       } 
       aLastState = aState; // Updates the previous state of the outputA with the current state
     }

Edited 1 time(s). Last edit at 06/05/2017 08:10PM by Dust.
Re: Reprap Full Graphic Smart Controller jog not working
June 05, 2017 08:25PM
Ok...I've got the program on the arduino. How do I connect the LCD directly to the arduino? Do I continue to use the ramps board? That's how I have it now, and nothing is showing in the monitor at 9600 baud.
Re: Reprap Full Graphic Smart Controller jog not working
June 05, 2017 09:54PM
still use ramps and lcd interface board.

It should say Position: at least once and then when ever you move the knob...
Re: Reprap Full Graphic Smart Controller jog not working
June 06, 2017 06:10AM
Yeah, doesn't say anything. Terminal window is completely blank.
Re: Reprap Full Graphic Smart Controller jog not working
June 06, 2017 07:22AM
Just trying it myself...

himm that eg sucks...

The following works on my RRD GLCD

 /* Read Quadrature Encoder
  * Connect Encoder to Pins encoder0PinA, encoder0PinB, and +5V.
  *
  * Sketch by max wolf / www.meso.net
  * v. 0.1 - very basic functions - mw 20061220
  *
  */  


 int val; 
 int encoder0PinA = 31;
 int encoder0PinB = 33;
 int encoder0Pos = 0;
 int encoder0PinALast = LOW;
 int n = LOW;

 void setup() { 
   pinMode (encoder0PinA,INPUT);
   pinMode (encoder0PinB,INPUT);
   Serial.begin (9600);
 } 

 void loop() { 
   n = digitalRead(encoder0PinA);
   if ((encoder0PinALast == LOW) && (n == HIGH)) {
     if (digitalRead( encoder0PinB ) == LOW) {
       encoder0Pos--;
     } else {
       encoder0Pos++;
     }
     Serial.print (encoder0Pos);
     Serial.print ("/");
   } 
   encoder0PinALast = n;
 }

a far simpler test is

/*
  Button

 Turns on and off a light emitting diode(LED) connected to digital
 pin 13, when pressing a pushbutton attached to pin 2.


 The circuit:
 * LED attached from pin 13 to ground
 * pushbutton attached to pin 2 from +5V
 * 10K resistor attached to pin 2 from ground

 * Note: on most Arduinos there is already an LED on the board
 attached to pin 13.


 created 2005
 by DojoDave [www.0j0.org]
 modified 30 Aug 2011
 by Tom Igoe

 This example code is in the public domain.

 [www.arduino.cc]
 */

// constants won't change. They're used here to
// set pin numbers:
const int buttonPin = 31;     // the number of the pushbutton pin
const int ledPin =  13;      // the number of the LED pin

// variables will change:
int buttonState = 0;         // variable for reading the pushbutton status

void setup() {
  // initialize the LED pin as an output:
  pinMode(ledPin, OUTPUT);
  // initialize the pushbutton pin as an input:
  pinMode(buttonPin, INPUT);
}

void loop() {
  // read the state of the pushbutton value:
  buttonState = digitalRead(buttonPin);

  // check if the pushbutton is pressed.
  // if it is, the buttonState is HIGH:
  if (buttonState == HIGH) {
    // turn LED on:
    digitalWrite(ledPin, HIGH);
  } else {
    // turn LED off:
    digitalWrite(ledPin, LOW);
  }
}

This will blink the led on the ramps as you twist the knob

this only uses one switch

also change
const int buttonPin = 31; to
const int buttonPin = 33;

to test the other switch in the encoder

for completeness change to const int buttonPin = 35 to test the selection button

Edited 3 time(s). Last edit at 06/06/2017 07:35AM by Dust.
Re: Reprap Full Graphic Smart Controller jog not working
June 06, 2017 07:52PM
None of those did ANYTHING.
Re: Reprap Full Graphic Smart Controller jog not working
June 06, 2017 09:05PM
What type of LCD display is it?
Re: Reprap Full Graphic Smart Controller jog not working
June 06, 2017 09:08PM
Reprap Discount Full Graphic Smart Controller
[www.biqu.equipment]

Edited 1 time(s). Last edit at 06/06/2017 09:09PM by Gannicus.
Re: Reprap Full Graphic Smart Controller jog not working
June 06, 2017 09:13PM
The link you provided doesn't even have an encoder....

How about a actual picture from the machine?
Re: Reprap Full Graphic Smart Controller jog not working
June 06, 2017 09:29PM
[cdn.shopify.com]

Sorry didn't realize that one didn't have the encoder. LOL
Re: Reprap Full Graphic Smart Controller jog not working
June 07, 2017 05:14PM
Was a bad LCD expansion board. Fixed. Thanks for the assistance Dust.
Sorry, only registered users may post in this forum.

Click here to login