Friday, 10 February 2017

geeetech Reprap Smart controller LCD12864 on re-arm controller

I finally got my re-arm! in case you some how missed it.

I set it up following the quick start guides on
Installed the latest firmware, no issues, used the eg config.txt and basic commands worked as expected. (just the controller powered over usb at this stage)

Then I went to plug in my GLCD, which I gave up on on using atmega based machines a long time ago as being too resource hungry.

Problem..   The re-arm supports the reprap discount GLCD, I have a geeetech GLCD, close, but not identical.

The documentation show this following image

And they provide the special cable with the separated 5v line.

If you look at this image you notice you cannot see the key on the lcd adaptor sockets. They are are the back side from this view.

Now if we take a look at the geeetech one
You can clearly see that the key on the ramps lcd adaptor is on the opposite side.  So we cannot use the provided special cable as the key makes us plug it in backwards breaking out the wrong pin.

I checked out the circuit and it looks compatible apart from the socket keys.

I wired it in using some prototyping wires

You only need 7 cables.
Lets define Top left on the adepter and the GLCD pictured as pin 1, and bottom right is pin 10.
Its simply wired pin 1 to pin 1 and pin2 to pin 2 up to and up including pin 5.
Then skip to pin 9 (black, gnd), which also goes to pin 9
On the GLCD pin 10 (red) is the 5v supply and needs to be wired to the 5v line of the re-arm as pictured in the guide.

And setup the firmware, as documented.

# Panel See
panel.enable                                 true            # set to true to enable the panel code
# Example reprap_discount_glcd
panel.lcd                                    reprap_discount_glcd             # set type of panel
panel.spi_channel                            0                 # set spi channel to use P0_18,P0_15 MOSI,SCLK
panel.spi_cs_pin                             0.16              # set spi chip select
panel.encoder_a_pin                          3.25!^            # encoder pin
panel.encoder_b_pin                          3.26!^            # encoder pin
panel.click_button_pin                       2.11!^            # click button
panel.encoder_resolution                     4                 # override number of clicks to move 1 item (default is 4)
#panel.button_pause_pin                      1.22^             # kill/pause set one of these for the auxilliary button on viki2
#panel.back_button_pin                       1.22!^            # back button recommended to use this on EXP1
panel.buzz_pin                               1.30              # pin for buzzer on EXP2

This mostly works! (yea I haven’t remove the protective plastic yet)
But the encoder is backwards.

To fix this you just need to tweak the provided config a little.

Just swap the encoder pins over

panel.encoder_a_pin                          3.25!^            # encoder pin
panel.encoder_b_pin                          3.26!^            # encoder pin


panel.encoder_a_pin                          3.26!^            # encoder pin
panel.encoder_b_pin                          3.25!^            # encoder pin

The GLCD and encoder work as expected now.

NB I have not tested the SD card at this time.

No comments:

Post a Comment