Printing on an IR printer
inaki
Posts: 262
I am trying to use an IR printer to print from a SX28.
The printer is a 82240, the one used with HP calculators. It is nice to use as a printing device on embedded systems because it is small, wireless and battery operated.
The printer uses 32768Hz modulating frequency. Data·is encoded as·bursts of 427us.
I think I have the righ carrier, about exactly 32768hz, the right pulses width, about 427us, the right led, about 980nm and the right software that encodes the data (I think it is right!).
However, despite my efforts I am unable to print anything on the printer.
I get the modulating 32768hz signal from a precission oscillator that gives a·square wave·between 0 and 4,8V.
The modulating signal goes to a NAND gate(74LS00) as one input. The other gate input is a digital signal that I generate from a SX28 OUTPUT pin,·which is set LOW or HIGH according to the·pulse I want to send. I calculate the duration of the SX signal using PAUSEUS. When both signals are HIGH at the gate input·the level at the OUTPUT is LOW.·At this output pin·is attached an IR led that goes through a resistor to +5V. That is to say, when the gate output is LOW the IR led is ON. Obviously the led is ON only when the modulating signal is HIGH and the SX pin is also HIGH.
The communication is unidirectional, that is to say, there is no emitting diode on the printer side. So all the timing control lies on the SX side, which is good becasue I don't need to read signals back. For starters I have tried to print a single 'A' character, probably the simplest thing that can be printed on this printer.
A problem I can see with this approach·is that·the SX signal·is out of sync with respect to the modulating signal so I can get cut cycles at the begining or at the end of a burst which might affect the transmision.··Other than this I cannot see the problem with my scheme. Anyone sees any problem with it ?
Note: an interface to the 82240 appeared on Circuit Cellar Feb.1995 but I don't have this issue so I could not compare with other implementations.
Post Edited By Moderator (Chris Savage (Parallax)) : 12/4/2005 10:24:20 PM GMT
The printer is a 82240, the one used with HP calculators. It is nice to use as a printing device on embedded systems because it is small, wireless and battery operated.
The printer uses 32768Hz modulating frequency. Data·is encoded as·bursts of 427us.
I think I have the righ carrier, about exactly 32768hz, the right pulses width, about 427us, the right led, about 980nm and the right software that encodes the data (I think it is right!).
However, despite my efforts I am unable to print anything on the printer.
I get the modulating 32768hz signal from a precission oscillator that gives a·square wave·between 0 and 4,8V.
The modulating signal goes to a NAND gate(74LS00) as one input. The other gate input is a digital signal that I generate from a SX28 OUTPUT pin,·which is set LOW or HIGH according to the·pulse I want to send. I calculate the duration of the SX signal using PAUSEUS. When both signals are HIGH at the gate input·the level at the OUTPUT is LOW.·At this output pin·is attached an IR led that goes through a resistor to +5V. That is to say, when the gate output is LOW the IR led is ON. Obviously the led is ON only when the modulating signal is HIGH and the SX pin is also HIGH.
The communication is unidirectional, that is to say, there is no emitting diode on the printer side. So all the timing control lies on the SX side, which is good becasue I don't need to read signals back. For starters I have tried to print a single 'A' character, probably the simplest thing that can be printed on this printer.
A problem I can see with this approach·is that·the SX signal·is out of sync with respect to the modulating signal so I can get cut cycles at the begining or at the end of a burst which might affect the transmision.··Other than this I cannot see the problem with my scheme. Anyone sees any problem with it ?
Note: an interface to the 82240 appeared on Circuit Cellar Feb.1995 but I don't have this issue so I could not compare with other implementations.
Post Edited By Moderator (Chris Savage (Parallax)) : 12/4/2005 10:24:20 PM GMT
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
I was able to get an IR remote control to work on an SX28 using Sony's 38kH carrier. I did the carrier in Code on the SX. here's what I used.
This is not all the code, just the parts that due with sending the carrier signal. Hope this helps. Note that I was running at 50Mhz to be able to get the timimg @ 38kHz.
Eventually I have managed to put my design to work. The problem was the encoding of the signal, not the hardware. It happens that the signal is preceded by a burst that is badly specified on the documentation. I have had to open the printer and measure the actual signals received from an actual HP calculator. This way I discovered that my start signal was wrong. Now it works !
I had to hook a scope to a circuit and see what the Sony IR remote was sending to get my timings to work well. I also had to zoom at far enough to see that the Sony repeats the sequence 5 times.