Pages: [1]   Go Down
Author Topic: Printing Sound!  (Read 557 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am new to arduino (and electronics for that matter) and need help with an art project I am currently working on.  I want to hook up a microphone sensor module to an arduino uno and print the sound information it reads using a dot-matrix printer.  The printed image does not have to make pictures or words or sense - it just has to print data that is generated by noise - kind of like a seismograph picking up vibrations. The dot-matrix printer I am using is the Epson LX-300+II and it has a USB, SERIAL and PARALLEL port. Is it possible to bypass the epson print commands and send information straight from the arduino to the printer through one of these ports or do I have to use a computer with the printer driver?  I feel like this is too simple to actually be possible and I am missing something through my lack of experience and knowledge.  Any help would be appreciated! 
Logged

UK
Offline Offline
Shannon Member
****
Karma: 184
Posts: 11173
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Do you specifically want to use an Arduino for this? A PC with an audio input and USB printer attached would make this relatively easy to do on the PC in whatever language you want.
Logged

I only provide help via the forum - please do not contact me for private consultancy.

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 170
Posts: 12456
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


What you could relatively easy do is to make a volume seismogram (Or whatever it is called).

You need to connect the microphone to the analogport of the Arduino.
Connect the printer to serial.
setup[]
  Set the baudrate
  Send a ESC-P sequence to the printer to set it in graphical mode.

loop[]
  sample the analogport as fast as you the Arduino can.
  map this on 0..8
  print a graphical character that is 0,1,2,3,4,5,6,7,8 dots above each other (see manual how to do this)

If the printer can do 24 pixels at once you can even make a "hi-res variation"
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Offline Offline
Edison Member
*
Karma: 22
Posts: 1164
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
The dot-matrix printer I am using is the Epson LX-300+II and it has a USB, SERIAL and PARALLEL port. Is it possible to bypass the epson print commands and send information straight from the arduino to the printer through one of these ports or do I have to use a computer with the printer driver? 
You probably don't need a driver (if you use the serial or parallel port).  There is a clue in the specs since it lists a couple of different character sets.   In the old days (before Windows) the printer's user manual would com with an ASCII chart and a list of "escape codes" for switching-on bold, underline, using graphics etc.   

Since all that stuff is now normally taken care of by the driver, and basically hidden from the user, and no longer  needed he programmer, it might be hard to find.    The good news is that Epson standardized the codes to work on most of their printers.  (Sending ASCII text is simple, but I don't remember how to "directly" print graphics.)
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 170
Posts: 12456
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


google on ESC P  -> http://en.wikipedia.org/wiki/ESC/P  - a 6 part manual with all codes

or - http://webpages.charter.net/dperr/links/esc_p2.htm - a quick list -> search for bitmap images
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Pages: [1]   Go Up
Jump to: