Viki Lcd



#ifdef ULTRALCD #ifdef NEWPANEL //arduino pin which triggers an piezzo beeper #define BEEPER 79 // Beeper on AUX-4 #define LCDPINSRS 70 #define LCDPINSENABLE 71 #define LCDPINSD4 72 #define LCDPINSD5 73 #define LCDPINSD6 74 #define LCDPINSD7 75 //buttons are directly attached using AUX-2 #define BTNEN1 76 #define BTNEN2 77 #. Viki stands for visual kinetic control interface. This control interface comes with a 3' LCD screen so that you can manage your projects without being connected to your computer. The LCD screen contains white pixels on a black background. ViKi also has a micro SD card slot and rotary encoder with push switch.

« Panels » are a combination of a LCD screen, and some sort of input method ( encoder wheel, or buttons ).

They are used to control your machine without having to use a host computer and a USB or Ethernet connection.

To use a Panel, you need to wire it to your Smoothieboard, and to set it up in your configuration file.

This page describes the wiring and configuration for the currently supported panel types.

Supported Panels

The following panels are currently supported by Smoothie :

  • SSD1306 based OLED displays

Supported SPI chips:- ST7565, ST7920, SSD1306

Using non-SPI panels

I2C and parallel panels are not supported directly, however using a cheap Arduino Mini Pro, Uno or Nano
you can use the following I2C panels or a regular Reprap style Parallel style LCD using the universal panel adapter https://github.com/wolfmanjm/universal-panel-adapter and the universal_adapter driver :
  • Most reprap style parallel LCD - Parallel

Configuration

All configuration options

Here are all the configuration options available for the Panel module :

panel.enable true Set to true to enable the panel interface. Panels are a screen, an encoder wheel and/or a set of buttons, used to control your machine.
panel.lcd reprap_discount_glcd Type of panel we are connecting. Each panel has a specific interface so we need to specify which panel we will be connecting. The currently supported panel types are reprap_discount_glcd, st7565_glcd, ssd1306_oled, viki2, mini_viki2 and universal_adapter.
panel.spi_channel 0 SPI channel to use
panel.spi_cs_pin 0.16 CS ( Chip Select ) pin to use, this can be used to have several different devices on the same SPI port, as long as each device has a separate CS pin. Note that the RRD GLCD panel does not support this and requires being alone on it's port.
panel.spi_frequency 500000 SPI port frequency - some panel need it explicitly set
panel.contrast 9 Contrast value for panels that support it ( viki2, mini_viki2 and st7565_glcd )
panel.reverse false If set to true, reverse the screen.
panel.busy_pin nc If using the universal_adapter, this pin can be connected to the adapter to ask it if it is busy or not.
panel.a0_pin nc If using a viki or SSD1306 this is needed to drive the C/D pin on the display
panel.rst_pin nc If using an SSD1306 this pin is sometimes required and connects to the reset pin on the display
panel.encoder_a_pin 3.25!^ A pin for the encoder wheel. Encoders have two pins : A and B. Set to nc if you use no encoder. ^ defines menu move direction
panel.encoder_b_pin 3.26!^ B pin for the encoder wheel. Encoders have two pins : A and B. Set to nc if you use no encoder. ^ defines menu move direction
panel.encoder_resolution 2 the number of pulses the encoder emits per detent/click
panel.click_button_pin 1.30!^ Pin for the click ( “enter” ) button
panel.buzz_pin 1.31 Pin for the buzzer
panel.back_button_pin 2.11!^ Pin for the back button
panel.up_button_pin 0.1! Pin for the up button
panel.down_button_pin 0.0! Pin for the down button
panel.menu_offset 0 On some panels, this value must be set to 1. This is a number of lines to offset the menu lines by on screen.
panel.alpha_jog_feedrate 6000 X jogging feedrate in millimetres/minute. This is used when jogging using the panel screen.
panel.beta_jog_feedrate 6000 Y jogging feedrate in millimetres/minute. This is used when jogging using the panel screen.
panel.gamma_jog_feedrate 200 Z jogging feedrate in millimetres/minute. This is used when jogging using the panel screen.
panel.hotend_temperature 185 Temperature to set the hotend to when using the pre-heating menu item
panel.bed_temperature 60 Temperature to set the bed to when using the pre-heating menu item
panel.external_sd true Set to true if your panel has an external SD card slot, or if you want to connect a second SD card slot to one of your Smothieboard's SPI ports
panel.external_sd.spi_channel 0 Set the SPI channel the external SD card is on
panel.external_sd.spi_cs_pin 2.8 Set the CS ( Chip Select ) pin for the external SD card, this allows you to use multiple devices on the same SPI port, as long as they each have a CS pin
panel.external_sd.sdcd_pin 2.13!^ SD card detect signal pin, set to nc if you don't use a SD card detect signal
custom_menu.menu_name.enable true When set to true, create a new custom menu entry for the panel with the name menu_name. You can create any number of custom entries as long as they have different names. NOTEmenu_name is case sensitive
custom_menu.menu_name.name Power_on The name that will be displayed in the panel's menus
custom_menu.menu_name.command M80_S30|G1_X10 The command that will be executed when the menu entry is selected and clicked. Note that the _ character gets converted to space in the menu and commands ( and must be used instead of the space character ) , and the | character is used to separate multiple commands

Custom menu entries

Menu entries can be added from the config file for simple commands, for instance the following adds a Power on and Power off menu entry.
Note that _ will be converted to a space when displayed in the Menu. Commands can be seperated with a |. If you want to add a menu entry that probes your z-axis you will have to use a command like G30 Z0 followed by a G0 Z10. For this you need a custom menu entry “custom_menu.zprobe.command G30Z0|G0Z10”. This moves the z-axis down untill it hits the probe, sets Z to 0 and moves 10 back up.

Another example for filament change :

External SD card setup

WARNING using the external sdcard for printing from is not recommended, and is NOT supported. Running SPI over long (or even short) cables is problematic, and can cause random hangs and/or corrupted data. I am not aware of a way to fix this other than using differential buffer drivers.

For the RRD GLCD it CANNOT share the same SPI as the LCD so it must be hooked up to the onboard sdcard SPI and use a spare pin for the sdcs.
Also note that an external SDcard sharing the SPI port with the onboard/internal sdcard must be ejected before rebooting as the bootloader does not like the external card. NOTE Smoothie will not boot if the external sdcard is inserted in the RRD LCD sdcard slot at boot time, it must be inserted after it has booted.

If the lcd panel has an sdcard reader it can be enabled with the following config:-

Using the spare button as a Kill switch

The button on the glcd and Viki2 can be wired as a Kill button by following This guide. In that case the
panel.back_button_pin should be commented out.


Showing Smoothie's 'watch' screen

Reprap Discount GLCD

The Reprapdiscount GLCD is a black and white graphical display with an encoder control button that allows you to control your Smoothieboard.

It is one of the most popular options for panel controllers. X1 atom flash file.

Providing power

Power from the 5v line directly, from the 5v uart pin with a decoupling capacitor of at least 0.1uF, from a + pin on an unused endstop, or an external 5V power supply capable of delivering at least 500 mA.

More power

MOAR

If you are using the onboard 5V regulator to step down from 12/24V, check the current draw required for your panel - depending on the color/backlight on your GLCD, it may require >250 mA for the backlight.

The normal recommended 5V regulator will not supply enough current for those panels - if the panel powers up, it will have very low contrast.

Use Recom part R-78E5.0-1.0 instead - it will supply 1 amp (vs 0.5 amps for the normally recommended regulator).

It is available at Digikey, and likely at other major electronics component sites.

See Voltage Regulator.

As an alternative to replacing the R-78E5.0 part on the Smoothieboard, solder a 5V 0.5 amp or 1 amp regulator to the adaptor card in the location marked. Ordinary 7805 regulators will work in that role. See https://en.wikipedia.org/wiki/78xx

Adapter

There is an adapter board to easily connect a ReprapDiscount GLCD to a Smoothieboard with flat cable, howver note this is entirely optional.

You can find information about it at the RRDGLCDAdapter page.

It's sources are available on github.

Note that you may have to solder physical pins to the board for pins 3.25 and 3.26, otherwise the rotary encoder will not work.

Clones

Note that there are a lot of clones of the official RRDÂ GLCD, and their connectors are reversed. If you buy one of them, you need to modify your adapter board, by removing the sockets of the 10-pin connectors and rotating them 180 degrees each.

SPI thermocouples

Wiki Lcd

Because the RRD GLCD does not implement SPI correctly, it has to be alone on it's SPI port. This means you won't be able to use SPI thermocouples and the RRDÂ GLCD together on the same board, unfortunately

Manual wiring

On the back of the GLCD EXP1 is to left and EXP2 is to right, pin 1 is bottom left, pin 2 is top left etc.
5v is EXP1 pin 10, Gnd is EXP1 pin 9

Panucatt viki lcd

You can find a list of pins on the Smoothieboard to connect to the panel here and here.

Pin numbering

5vdc availability presumes a 5vdc source (power from SBUS, 5V input, or optionally installed 5v converter VBB).
Be aware that RRD does not follow proper conventions for pin numbering. The pin 1 indicator on the ribbon is actually pin 10 in the RRD schematic. The image above is numbered according to the RRD inset schematics.


RRD GLCD to Azteeg X5 Mini v1.1 interface board

This interface board is simple to install, eliminates custom cables, frustration, and wire mess.

It is compatible with Azteeg X5 Mini v1.1 motion controller and is available from www.UltiBots.com. Source files are on our GitHub.


Azteeg X5 Mini to RRD GLCD wiring harness

This wiring harness uses three 2×10, one 1×2 .100“ crimp housings and one heat shrinked female pin to connect the RRD GLCD to an Azteeg X5 Mini.

Note: This information is compatible with Azteeg X5 Mini v1.0 motion controllers.

Viki2 from panucatt.com

Viki2 wires to an Azteeg X5 mini with a flat cable as it has 1:1 pin mapping. The ConfigSample for the Azteeg mini has the config settings required, just uncomment them,

The config for Azteeg X5 is different to smoothieboard and is shown in the file https://github.com/Smoothieware/Smoothieware/blob/2f88d440ee3f79cb5202d242967b555fa35c7423/ConfigSamples/AzteegX5Mini/config#L178

Here is an example config for a 4 driver smoothieboard

NOTE a 5 driver does not have enough free pins to use all the features

Using the suggested firmware above the wiring for the Viki 2.0 on a 4 driver smoothieboard is as follows:

This wiring uses this smoothie pin map and this Viki 2.0 wiring guide

5 driver smoothieboard, disables buzzer and uses red led instead

LCD 12864 with ST 7920 driver

Works with the Reprapdiscount GLCD driver and is available for around 7€ or 10$.
Just wire the display unit as indicated.

Rotary Encoder and Push Button

To use the menu system of the smoothie. Wire a Rotary Encoder with a Push Button according to GLCD config above to the pins

It is possible to use the pin 1.22 1.23 1.30 (on the same connector), but in this case do not use corresponding mosfets

LCD Wiring

Power for displaydriver

SPI

Power LED background

AZSMZ 12864 LCD to Smoothieboard

The AZSMZ 12860 panel is a full graphic controller that you can wire to your Smoothieboard.

Astrorock 2000. See the wiring diagram here.

Configuration :

The QU-BD Revolution XL(‘RXL’) 3D Printer lacks a built-in LCD interface, and after more than a year of using the UltiController on my original Ultimaker, I found the need to hook up a computer to be really inconvenient. Plus I just don’t really have the space for it in my work room, leading to a less-than-amusing incident involving a long print, a glass of wine, and a laptop keyboard. It was time for an upgrade!

Originally, QU-BD was planning on offering the Panucatt Viki controller as an optional add-on for their printers, but some supply constraints upset that plan. The controllers are available now, so I ordered one, and recently set about installing it myself. I thought I’d document the process to help others facing the same thing. The specifics below relate to the RXL printer, but in general, most of it should be applicable to any one looking to hook up a Viki controller to X3 electronics – especially if you’re using Repetier firmware, as the RXL does. However, from what I’ve seen online (thanks, Wired1, for the inspiration and info), I believe that Marlin’s Viki implementation also uses the same pinouts for the same things, so it will probably also work as-is for Marlin-based printers too.

I have one of the first RXL’s out of the factory, and mine at least needed me to recompile the firmware with some different settings to actually get the Viki working. I’ll cover the firmware side of things in two other blog posts (here and here) – but for now, this post focuses on the physical steps needs to attach the Viki to the X3.

Not My Problem

First of all, a disclaimer. I’m offering these instructions in good faith, and to the best of my knowledge they document what I did to upgrade my own printer. But if you do this on your printer, then there is a risk that something could go wrong. You might end up destroying your printer or controller electronics, and will probably invalidate the warranty on your printer. So be careful, and be warned. I will not be responsible for whatever you do to break your printer. 🙂

Getting Started

For a start, turn off the printer and unplug it from the mains. Then be sure and ground yourself, so you don’t damage the electronics through static discharge. You need to work on the underside of the printer where the electronics is, so for me the best approach was to slide the x-axis assembly all the way to the back of the bed, and turn the printer upside down over the edge of a table, so that the x-axis hangs off the side. Before doing this, wrap some tape around from the the surface of the basalt bed, across the aluminum frame and round to the underside of the heated bed assembly. This will help prevent the basalt bed from falling out when you turn the printer upside down.

Then turn your attention to the electronics that are now exposed. You’ll need to remove the fan and acrylic plate that covers the Azteeg board. This requires a suitable hex-driver for the M4 machine screws that QU-BD used – although since there’s not much torque needed, a T15 Torx driver works fine.

Carefully lay the fan up out of the way on the power supply, while you work on the rest of it.

If you want to use the SD card reader in the Viki board, you’ll need to disable the built-in one by removing a solder connection under the X3 board. That’s the next section of this page… if you don’t want to do that, you can skip ahead to the section below on hooking up the I2C interface that drives the LCD display and buttons, and then ignore the part later about connecting the SD Card slot, as well.

Enabling the External SD Card

The first step to enabling the external SD card is to unscrew the plastic stand-off pillars that the cooling fan sits on; you may need to use an M3/T10 driver to stop the bolts that project through the bed of the printer from turning as you unscrew the pillars:

Also unplug the USB cable from the board, and unclip the wires from the side of the power-supply, so that you have room to work.

If you’re careful and have some sort of clamp (or assistant) to hold the board for you, you can remove the necessary solder link without unhooking any of the wires on the board. Lift the board off the screws in the corner and, being sure not to overstrain the wires, tip it on its side so you can identify the solder link located just underneath the USB socket:

I used a soldering stand with adjustable alligator clips to hold the corner of the board up. Use a soldering iron to melt the connection and wipe it away. Desoldering braid or some sort of vacuum device may be helpful. Take care that the solder doesn’t roll away and short out any of the other pins – especially if you’re working with the board tipped at an awkward angle. Once you have removed the solder, you should see the separate pads, and if possible should check with a continuity tester that the pads are now isolated, and there isn’t any trace of solder still shorting them together:

Once this is done, you can seat the board back on its corner screws, and re-attach the standoff pillars to hold it in place, while you start hooking up the cables. Also, if you didn’t want to enable the external SD slot, and do scary soldering iron stuff, then this is where you rejoin the story…

Hooking up the I2C Interface: LCD and Buttons

The Viki comes with two identical cables. Each has a single 3×2 block connector on one end, and six single-pin connectors on the other end. Check if yours are the same as shown in the picture below, in terms of the arrangement of the colors. If so, following along should be pretty straight-forward. If not, you’ll have to adjust the color coding accordingly, so the correct pins on the Viki go to the right places on the X3. You might also like to refer to the data sheets for the X3 v1.1 board, and the Viki controller, to see more clearly what goes where, and why.

To use the LCD and the rotary encoder and buttons, you only need to hook up one of the cables. It goes from the upper most of the two blocks of pins on the rear left side of the Viki, and all the wires go to the EXP3 block of pins on the X3 board – just in a different order, so pay attention to how they are arranged in the pictures below.

First, connect one of the cables to the Viki:

I recommend positioning the Viki by the ‘front’ side of the printer, and routing the cables in between the frame and the mirrored base platform, similar to how the y-axis cables are routed. This will allow you to position the controller in front of the printer, or attach it to the front frame for easy access. This photo shows the arrangement after the work is done, and both cables are in place:

The six loose ends of the cable attach as shown below. The EXP3 block is in the middle of the ‘front’ edge of the X3 (i.e., the side towards you when the writing is the right way round) between the X3 and the power supply on an RXL printer:

Attach the individual cables as shown, being careful to precisely place each connector squarely over the pin, and not slip between or bend any of the pins. Note which cable goes where as per the photo, and/or the diagram.

Viki 2 Lcd

That’s all that’s needed if you don’t want the SD card to work (or the reset button, below the SD slot, which is also controlled by the other cable, and doesn’t require any of the desoldering stuff – just connect the black wire on the other cable, as shown below). If you don’t want any of this, then you can skip ahead to the final clean up.

Connecting the SD Card Slot and/or Reset Button

In addition to removing the solder connection on the back of the X3, using the SD card requires you to hook up the second cable between the Viki and the X3. Attach the 6-pin block end to the Viki, underneath the first cable, and route the wires in through the frame again:

Five of the six wires connect adjacent to the blue reset button on the X3 board. Three go into the block of six pins immediately next to button, and the other two connect to the two pins offset slightly , next to the no-longer-used on-board SD card.

The one remaining wire – the black one – hooks into the bottom-right corner of the partly-hidden EXP2 block. This is immediately beside the white wire from the first group of connections. This is the lead that connects to the front ‘reset’ button on the Viki. You can choose to connect just this, and none of the rest of the SD-related pins, or conversely, leave the black one unconnected, if you’re worried about accidental resets:

That’s it! Now all that’s needed is to reassemble everything.

Final Clean Up

The final step is to re-attach the cables into the cable clips, add some extra cable ties to secure the new wires, re-attach the USB cable, and then screw the fan back in place:

What’s next?

If you’re lucky, you’ll now have a working Viki controller! But quite likely – especially with the earliest shipping QU-BD printers – you’ll probably need to update the firmware too. Set the printer back upright, and if your Viki controller isn’t yet in a proper enclosure, make sure that nothing is going to short-out any of the exposed connections on the back of the board! Then power-up the printer and see what happens. At the very least, the LCD should light up. Ideally you’ll see a splash screen, and then a menu display showing current temperatures etc.

But if the firmware isn’t right, you’ll probably just get a blank display, or perhaps – as I did – alternating solid and blank rows. In that case, you’ll need to upgrade the firmware – and for a standard RXL setup, that means building your own Repetier firmware. And that’s the subject of this post and this one…