Showing posts with label printer stuff. Show all posts
Showing posts with label printer stuff. Show all posts

Sunday, September 26, 2010

Video Footage from Lyndon Gray's "The Burrow"

Saturday, September 25, 2010

Dot Matrix Printer Controlled Using Launchpad

Well, how does the Launchpad map to the printer? The first two rows each represent the sixteen characters of the ASCII table starting with "!". These characters can be either strung together into 'phrases' that are printer out all at once, or they can be triggered so that each character is printed individually. The third row contains predefined 'macro phrases' with specific rhythms. The first button of the fourth row controls whether the first two rows print immediately or are strung together as phrases to be printed together.




Friday, September 24, 2010

Dot Matrix Printer Synced and Controlled from Ableton Live

Controlling A Dot Matrix Printer Directly with Arduino

Lyndon Gray's 'The Burrow' calls for a dot matrix printer. However, my BAS120 printer module is broken. So I had to program an Arduino board to speak to the printer directly. Luckily, the protocol is very straightforward. I spliced the Centronics printer cable and soldered a header so I could easily breadboard the connections.

The Centronics connector is a 36-pin connection. Pin 1 is the 'strobe' signal (active low). Pins 2 to 9 are the data bits. Pin 11 is the 'busy' signal. Pin 33 is ground. The 'busy' signal is polled by the Arduino to see whether or not the printer is currently printing. If the printer is not printing, data can be set on the eight data pins. The strobe is then momentarily held low to send the data to the printer.

I then made a Max/MSP patch that takes data and sends it to the printer via a serial USB connection.




Tuesday, November 20, 2007

BAS120 pinout

This post is a follow on to this one.

It is a little unclear which pin on the BAS120 printer module is which. In the images below, RX/TX is white, 5V is red and 0V (gnd) is black.

The easiest way to connect an Arduino board to the module is to solder jumper wires to the three holes (which connect to RX, 0V (gnd) and 5V) as shown below.

These three holes appear incorrectly labeled from the front of the module (red side) because the text refers to the header that is normally used to connect to a basic stamp. The back side (green side) of the module correctly labels these pins (shown in red in the second picture below).

The TX pin is marked on the Arduino as TX. It is pin 1 (the second pin from the bottom) of the digital pins.


Saturday, November 10, 2007

Arduino --> printer (how)

This post is in response to a comment by Carl on an earlier post (see here).

The simplest method to interfacing an Arduino to a dot matrix printer is to use a BAS120 module or core chip (both of which can be bought at Microzed computers in Australia). These chips are designed to be used with Picaxe or Basic Stamp microcontrollers, but work fine with Arduino.

By setting the hardware serial speed of the Arduino to a baud rate of 2400, it is very easy to simply pass information onto the printer from, say, Max/MSP, using a serial interfacing protocol. This is because the printer module also runs at a baud rate of 2400.

It is then simply a matter of connecting the RX pin of the BAS120 module to the TX pin of the Arduino board.

There are a number of useful data byte to remember when using a printer. A '2' wakes the printer up so that it is ready to accept printing commands. A '3' puts the printer to sleep. A '10' followed by a '13' prints a carriage return followed by a line feed. In the case of the printer that has been featured in previous posts (Epson LQ 300), the '10,13' combination actually forced the printer to print. Some printers only start printing when they receive a page feed character (not just a line feed).

As one can see, the code below is very simple and offers no abstraction or symbolic conversion of any kind - all the printing data and manipulation has to occur from the computer end. But of course, it is possible to extend this code considerably such that the Arduino is doing more work.

Arduino Code

byte STX = 2;
byte data;

void setup() {
Serial.begin(2400);
Serial.print(STX);
digitalWrite(1, HIGH);
delay(5);
}

void loop() {
if(Serial.available() > 0) {
data = Serial.read();
Serial.print(data);
}
}

Saturday, November 03, 2007

DK bongos triggering the printer


The Donkey Konga Bongos are triggering the dot matrix printer. Kira the cat seems to find the outcome entertaining.

Video URL: http://www.youtube.com/watch?v=gSRyhGUb3ks

Monday, October 01, 2007

More printer control


I have made a more complex application to control the printer. It is a sequencer that is made up of three layers.

The overarching layer is the SENTENCE STRUCTURE that loops. The SENTENCE STRUCTURE consists of a sequence of up to sixteen steps.

Occupying each step can be either no action (described as NO OUTPUT) or one of eight WORD STRUCTURES (labeled WORD ONE to WORD EIGHT).

The length of the SENTENCE STRUCTURE can be set as well as the speed that each step is read through.

Each WORD STRUCTURE is made up of up to sixteen bits. Each bit can have one of two states, a high state and a low state. In a low state, that point of the WORD STRUCTURE will be a space.

In a high state, that point of the WORD STRUCTURE will be the symbol typed into the HIGH BIT SYMBOL field. The length of the WORD STRUCTURE can be set.

After the contents of the bits has been sent to the printer, a line feed (ASCII number ten) is sent. This causes the printer to print out the WORD STRUCTURE in one action.

Rhythmic features of the structure of the word are present in the sound. Whichever symbol is chosen for a given word determines certain (sometimes subtle) sonic characteristics of the sound as the printer prints.

Sunday, September 30, 2007

Printer drum machine


Demonstration of one page's worth of beats generated by controlling a dot matrix printer.

This instrument is a work in progress. In a way, it is a sign of respect and homage to Paul Slocum and the fantastic things he has done.

Video URL: http://www.youtube.com/watch?v=6xKp5HD8fzg