Panelolu
Release status: working
Description | RepRap electronics controller, with LCD, SD card, reset and rotary encoder.
|
License | GPL
|
Author | |
Contributors | |
Based-on | |
Categories | |
CAD Models | |
External Link |
Contents
Introduction
You can use this page as a guide for wiring up any SD card/LCD/encoder/reset combination to your electronics.
Panelolu is an LCD and rotary encoder with a click button control solution which derives from the PanelMax Prusa by tommyc. It allows control of a 3D printer running Marlin firmware and Sanguinololu or similar electronics directly without having to have a computer connected. Stand-out features are the ability to start and stop prints, control print speed while printing and change many calibration settings - saving these to the memory on the ATmega 1284 (EEPROM) so they are persistent if you turn the printer on and off. Continuing with tommyc's design the panelolu has mounting brackets for the Prusa mendel or other threaded rod based printers. The brackets are separate from the enclosure so they can simply be replaced with a different design for a different mounting solution.
The Panelolu is designed to use as little soldering as possible (if the breadboard comes pre-assembled and the LCD with plugs fitted then no soldering is required at all) and to allow an easy upgrade path. It uses the SDSL card reader, so if you already have one there is no need to get another. Rather than soldering wires directly to the LCD, headers have been fitted so future changes can re-use the LCD simply.
The schematic is a little tangled but each wire can be traced from the Sanguinololu - through the 24 way IDC connector and ribbon cable to its final destination in the enclosure. A 22 way IDC connector would have worked fine but they are hard to find so we use a 24 way and don't plug in pins 23 and 24.
Where to buy
Various kits are available that combine LCD, SD Card, rotary encoder, and reset; some also include a Piezo electric buzzer, though there is no spare pin on the Sanguinololu to connect it to. RAMPS can, and other electronics may be able to.
The Panelolu is available from eMaker Shop and ebay
Other examples are available such as this offering from [1] and variations on the Panelolu on thingiverse: http://www.thingiverse.com/thing:35440 and http://www.thingiverse.com/thing:28332
Files
The enclosure is on thingiverse.com, as an OpenScad file and STL.
Assembly instructions
These instructions are from Think3DPrint3D blog.
Step 1 - Tools and components
Tools
The Panelolu can be assembled with a few basic tools:
- Allen Key for the M3 socket head fastenings
- Cross head screw driver for the SDSL and breadboard mounting screws
- Small needle nose pliers for crimping connectors
- wire cutters
If you are assembling the breadboard you will also need a soldering iron and solder.
BOM
The components are as in the picture below:
- Rotary encoder - Farnell
- Reset switch (generic) - online UK
- Potentiometers (generic) - online UK
- LCD Panel - Hitachi HD-44780 based 4x20 column display, or clone/something similar. You can use 2x16 or 2x20, though the enclosure may not fit. The one used here is something like UK; the PCB is 98mm x 60mm, the display area is 76mm x 25.2mm.
Most LCD panels come with mounting holes for M2.5 screws, but I prefer to drill these out slightly and use M3, the enclosure has M3 holes but they should work ok with M2.5 if you prefer to use that.
Step 2 - Assemble the breadboard and the LCD connectors.
Circuit boards are available - see circuit boards - and T3dP3d supply them with their kits. If you get the kit, ignore this step and move to step 3 - the breadboard instructions below are only necessary if you want to source your own components.
NOTE: these instructions are for a the breadboard assembled with the click encoder on the right of the panel as you look at it from the front - If you want it on the left then mirror the layout.
The schematic contains the circuit diagram for the breadboard. It is laid out to minimise the number of jumper wires required - many of the connections can be bridged.
An absolute minimum of 4 rows and 29 columns are needed in order to fit the screw holes in. The components are placed as shown:
and from underneath:
As shown on the left of the picture of the underside the encoder's mounting legs have been bent round to hold it securely to the board.
The picture below shows the different circuits.
To start with make the direct connections for "ENC 1", "CONT", "BRT" and "RST".
Next use small lengths of wire to make the remaining connections. Leave as little excess wire as you are comfortable with, as it will be easier to fit into the housing:
Solid lines are wire, dotted lines solder connections.
Now do the LCD: Solder the 6 way right angle headers onto the LCD pins 1-6 and 11-16. The picture shows shrouded headers but normal right-angle pin headers are fine.
Step 3 - Fit the SDSL and 24 way IDC sockets
Using the cable numbering from the cable picture, you are connecting wires number 13-22 into the SDSL plug. Note the polarity as shown in the pictures. Ensure you leave at least 10 cm of length on the cable past the plug, as this will make wiring the remaining connections easier.
The easiest way to fit IDC connectors without a proper (and expensive) tool is to use a small vice. Ensure the cable is in square in the connector and the the pressure applied by the vice is even - don’t rush this bit! The back should click into the connector.
The 24 way IDC socket is fitted in the same way; ensure you use pins 1-22 of the socket (a 22 way socket would be even better but hard to find)
Step 4 - Fitting the crimp connectors.
There are three 6-way connectors and a 2 way connector that use crimp terminals. These can be crimped using small needle nose pliers if you don't have a crimping tool. Nophead has an excellent video on how to crimp them.
I found it easiest to identify the wires for each connector from the circuit diagram and the photo below and cut them to length before fitting the pins. Be sure not to make them too short!
The 12V and ground pins on the expansion header are not used by Panelolu but I have left the wires so they can be connected to something else if required. The pieces of wire offcuts in the picture are used to make the connections between the various sockets (as shown in thicker green wires in the schematic near the top of the blog post). Leave these a little longer than the minimum distance to assist with assembly at the end. On some pins you will need to connect two wires to one pin:
Once complete the assembled cable should look like this:
Step 5 - Assemble
It is easiest to first screw on the SDSL socket and the bread board with the LCD in position, then the strain relief and finally bring the two halves together to plug in the 4 connectors. Although the SDSL itself can be fitted once completely assembled it's easier to fit it at this stage ensuring the orientation is correct.
Close it all up, being careful not to trap any wires. The length of socket setscrews used will depend on the mounting solution. There is a 5th small screw to hold the bottom of the case below the click encoder closed.
To come: I will do a second post about mounting once I have some better pictures of it mounted on a prusa and my Mendel 90 mounting solution sorted.
Connecting it to your board
Sanguinololu
Just plug it into the header pins on the Sanguinololu board, checking it's the right way around. There are no spare pins on the Sanguinololu to connect a buzzer to.
RAMPS
Taken from http://blog.think3dprint3d.com/2012/11/panelolu-on-ramps-and-printrboard-issues.html
RAMPS provides lots more pins for input/output than Sanguinololu, but they are spread out around the board. You won't be able to use the 24-way IDC connector, and there are no pins on the board for 12V to be passed through, so the first two wires on the ribbon connector are unused and can be taken off, to leave a 20-wire ribbon cable. You'll have to trace each wire to it's respective pin, but by referring to the following diagram and tables, you should be able to connect it up. Just take your time, it worked first try for me!
While the Panelolu kit doesn't integrate a buzzer, RAMPS can support one by using one of the spare pins. There are spare wires on the ribbon cable that can be utilised, and a small enough buzzer might be accommodated inside the standard housing.
Using this diagram for reference, connect the wires to the AUX-3/SPI and AUX-4 connectors on the RAMPS board (this is for RAMPS 1.3; 1.4 has the same pin-out, not sure about 1.2 and earlier):
This table shows the pins that the ribbon cable connects to on the Sanguinololu, and the equivalent on RAMPS:
Ribbon Cable number | Function | Pin Sanguinololu | Pin RAMPS |
1 | GND | GND | NA |
2 | 12V | 12V | NA |
3 | LCD 1 (VSS - Ground) LCD 5 (RW - Read/Write) LCD 16 (K - Backlight Anode-) Breadboard GND for encoder, switch, contrast, reset. |
GND | GND (AUX-4) (or GND on the I2C connector) |
4 | LCD 2 (VDD 3.3 to 5v) 5V on breadboard, for brightness |
5V | 5V (AUX-4) (or 5V on the I2C connector) |
5 | LCD 14 (DB7 - data bit) | A4 | D29 (AUX-4) |
6 | LCD 4 (RS - register select) | PWM D12 | D16 (AUX-4) |
7 | LCD 13 (DB6 - data bit) | A3 | D27 (AUX-4) |
8 | Encoder1 | TX1 D11 | D35 (AUX-4) |
9 | LCD 12 (DB5 - data bit) | A2 | D25 (AUX-4) |
10 | Encoder2 | RX1 D10 | D37 (AUX-4) |
11 | LCD 11 (DB4 - data bit) | A1 | D23 (AUX-4) |
12 | LCD 6 (E - clock) | SDA D17 | D17 (AUX-4) |
13 | SD (CS pin) | A0 | D53 (AUX-3) |
14 | (via SDSL plug, NC) Encoder click | SCL D16 | D31 (AUX-4) |
15 | (via SDSL plug, NC, could be buzzer+ in RAMPS) | (D33 (AUX-4) if fitting buzzer) | |
16 | (via SDSL plug, NC) | ||
17 | SD Ground | GND | GND (AUX-3) |
18 | (via SDSL plug, NC) Reset | RST | D39, D41, D43, D45, D47 or D32 on AUX-4 or D49 on AUX-3 |
19 | SD (DI pin) | MOSI | MOSI D51 (AUX-3) |
20 | SD (SCK pin) | SCK | SCK D52 (AUX-3) |
21 | SD 5V | 5V | 5V (AUX-3) |
22 | SD (DO pin) | MISO | MISO D50 (AUX-3) |
23 | NA | NA | |
24 | NA | NA | |
Other | LCD 3 (VO - contrast adjuster) to C on breadboard | ||
Other | LCD 15 (A - Backlight Anode ) to B on breadboard (brightness) |
Here is the above, sorted for each connector on RAMPS:
AUX-4
Ribbon Cable number | Function | Pin Sanguinololu | Pin RAMPS |
6 | LCD 4 RS (register select) | PWM D12 | D16 |
12 | LCD 6 E (clock) | SDA D17 | D17 |
11 | LCD 11 DB4 | A1 | D23 |
9 | LCD 12 DB5 | A2 | D25 |
7 | LCD 13 DB6 | A3 | D27 |
5 | LCD 14 DB7 | A4 | D29 |
14 | SD, encoder click | SCL D16 | D31 |
(Piezo Buzzer ) | D33 | ||
8 | Encoder1 | TX1 D11 | D35 |
10 | Encoder2 | RX1 D10 | D37 |
3 | Ground | GND | GND |
4 | 5V | 5V | 5V |
AUX-3 / SPI
Ribbon Cable number | Function | Pin Sanguinololu | Pin RAMPS |
17 | SD Ground | GND | GND |
NC | NC | ||
20 | SD (SCK pin) | SCK | SCK D52 |
13 | SD (CS pin) | A0 | D53 |
22 | SD (DO pin) | MISO | MISO D50 |
19 | SD (DI pin) | MOSI | MOSI D51 |
21 | SD 5V | 5V | 5V |
NC | D49 |
Printrboard
Firmware
COMMON
In Configuration.h:
Line 190-205:
#define EEPROM_SETTINGS //to disable EEPROM Serial..... // please keep turned on if you can. #define EEPROM_CHITCHAT #define ULTIPANEL #ifdef ULTIPANEL #define NEWPANEL //enable this if you have a clicencoder panel #define SDSUPPORT #define ULTRA_LCD #define LCD_WIDTH 20 #define LCD_HEIGHT 4
In Configuration_adv.h:
Line 163:
//#define SDCARDDETECTINVERTED
SANGUINOLOLU
In order to use this you need a 1284P in your Sanguinololu and the Marlin firmware needs the changes that I mentioned in my previous post and have pasted here as well:
In Configuration.h:
Line 34:
#define MOTHERBOARD 62
In pins.h:
making sure to be within the sanguinololu pin definition part of the file. For my pins.h this was lines 557 - 657. I added the following 34 lines, copied from the RAMPS section of the pins.h
#ifdef ULTRA_LCD #ifdef NEWPANEL //we have no buzzer installed #define BEEPER -1 //LCD Pins #define LCD_PINS_RS 4 #define LCD_PINS_ENABLE 17 #define LCD_PINS_D4 30 #define LCD_PINS_D5 29 #define LCD_PINS_D6 28 #define LCD_PINS_D7 27 //The encoder and click button #define BTN_EN1 11 //must be a hardware interrupt pin #define BTN_EN2 10 //must be hardware interrupt pin #define BTN_ENC 16 //the switch //not connected to a pin #define SDCARDDETECT -1 //from the same bit in the RAMPS Newpanel define //encoder rotation values #define encrot0 0 #define encrot1 2 #define encrot2 3 #define encrot3 1 #define BLEN_C 2 #define BLEN_B 1 #define BLEN_A 0 #endif //Newpanel #endif //Ultipanel