diff --git a/Steno_ProCAT_Flash/docs/4.log b/Steno_ProCAT_Flash/docs/4.log index 6342bc1..23c09b1 100644 --- a/Steno_ProCAT_Flash/docs/4.log +++ b/Steno_ProCAT_Flash/docs/4.log @@ -1,12 +1,12 @@ -This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2015/dev/Debian) (preloaded format=pdflatex 2018.11.28) 20 JUN 2019 03:01 +This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2015/dev/Debian) (preloaded format=pdflatex 2018.11.28) 20 JUN 2019 03:11 entering extended mode restricted \write18 enabled. %&-line parsing enabled. -**/home/layoutdev/Desktop/code/documentation_general/Misc_2019/steno_flash/docs -/4.tex +**/home/layoutdev/Desktop/code/documentation_general/Electronics_Projects_2019/ +Steno_ProCAT_Flash/docs/4.tex -(/home/layoutdev/Desktop/code/documentation_general/Misc_2019/steno_flash/docs/ -4.tex +(/home/layoutdev/Desktop/code/documentation_general/Electronics_Projects_2019/S +teno_ProCAT_Flash/docs/4.tex LaTeX2e <2014/05/01> Babel <3.9l> and hyphenation patterns for 2 languages loaded. (/usr/share/texlive/texmf-dist/tex/latex/base/article.cls @@ -51,12 +51,12 @@ LaTeX Font Info: External font `cmex10' loaded for size {/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] [2] [3] (./4.aux) ) Here is how much of TeX's memory you used: 234 strings out of 495020 - 2695 string characters out of 6181323 + 2764 string characters out of 6181323 50970 words of memory out of 5000000 3522 multiletter control sequences out of 15000+600000 8363 words of font info for 30 fonts, out of 8000000 for 9000 14 hyphenation exceptions out of 8191 - 21i,6n,19p,475b,187s stack positions out of 5000i,500n,10000p,200000b,80000s + 21i,6n,19p,498b,187s stack positions out of 5000i,500n,10000p,200000b,80000s +Babel <3.9l> and hyphenation patterns for 2 languages loaded. +(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls +Document Class: article 2014/09/29 v1.4h Standard LaTeX document class +(/usr/share/texlive/texmf-dist/tex/latex/base/size11.clo +File: size11.clo 2014/09/29 v1.4h Standard LaTeX file (size option) +) +\c@part=\count79 +\c@section=\count80 +\c@subsection=\count81 +\c@subsubsection=\count82 +\c@paragraph=\count83 +\c@subparagraph=\count84 +\c@figure=\count85 +\c@table=\count86 +\abovecaptionskip=\skip41 +\belowcaptionskip=\skip42 +\bibindent=\dimen102 +) (./5.aux) +\openout1 = `5.aux'. + +LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 6. +LaTeX Font Info: ... okay on input line 6. +LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 6. +LaTeX Font Info: ... okay on input line 6. +LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 6. +LaTeX Font Info: ... okay on input line 6. +LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 6. +LaTeX Font Info: ... okay on input line 6. +LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 6. +LaTeX Font Info: ... okay on input line 6. +LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 6. +LaTeX Font Info: ... okay on input line 6. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <12> on input line 8. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <8> on input line 8. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <6> on input line 8. + [1 + +{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] [2] [3] +Overfull \hbox (13.6647pt too wide) in paragraph at lines 122--122 +[] \OT1/cmtt/m/n/10.95 packed_data[1] = (raw_data[ 5] << 6) /* S- */ //Have + to move[] + [] + + +Overfull \hbox (25.16208pt too wide) in paragraph at lines 122--122 +[] \OT1/cmtt/m/n/10.95 | (raw_data[ 4] << 4) /* T- */ //chan +ge values.[] + [] + + +Overfull \hbox (13.6647pt too wide) in paragraph at lines 122--122 +[] \OT1/cmtt/m/n/10.95 | (raw_data[22] << 5) /* -B */ // wa +s dupe 0[] + [] + +[4] +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <10.95> on input line 126. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <9> on input line 126. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <5> on input line 126. + [5] (./5.aux) ) +Here is how much of TeX's memory you used: + 245 strings out of 495020 + 2901 string characters out of 6181323 + 53970 words of memory out of 5000000 + 3530 multiletter control sequences out of 15000+600000 + 9891 words of font info for 35 fonts, out of 8000000 for 9000 + 14 hyphenation exceptions out of 8191 + 24i,8n,19p,968b,187s stack positions out of 5000i,500n,10000p,200000b,80000s + +Output written on 5.pdf (5 pages, 128539 bytes). +PDF statistics: + 56 PDF objects out of 1000 (max. 8388607) + 39 compressed objects within 1 object stream + 0 named destinations out of 1000 (max. 500000) + 1 words of extra memory for PDF output out of 10000 (max. 10000000) + diff --git a/Steno_ProCAT_Flash/docs/5.pdf b/Steno_ProCAT_Flash/docs/5.pdf new file mode 100644 index 0000000..f7dd3b9 Binary files /dev/null and b/Steno_ProCAT_Flash/docs/5.pdf differ diff --git a/Steno_ProCAT_Flash/docs/5.tex b/Steno_ProCAT_Flash/docs/5.tex new file mode 100644 index 0000000..eb11117 --- /dev/null +++ b/Steno_ProCAT_Flash/docs/5.tex @@ -0,0 +1,130 @@ +\documentclass[11pt]{article} +%Gummi|065|=) +\title{ProCAT Flash and Plover} +\author{Steak Electronics} +\date{2019} +\begin{document} + +\maketitle +\section{Overview} +I want to use a ProCAT flash with Plover. The ProCAT Flash is a stenography machine. It allows for faster typing, and less strain. Plover is a FOSS Stenography project. +\section{Work Log} +\subsection{Not All ProCAT Flash's will work with Plover} +Some of the plover docs mention that a ProCAT flash will work with a RJ11 to DB9 cable, and that the protocol can be set to Baron. My device must be an older firmware as there is no option to change the protocol, and in fact the RJ11 appears to be only for outbound calling... There is a modem option, and it allows you to call a number. It appears to be for actually calling a phone line. + +Instead, there is an arduino sketch of someone who has previously tapped into the serial out of the IO Expander (essentially the board that reads the keys), and helpfully outlined the process. By cutting the motherboard out of the picture, and driving the IO board directly from a 5V Arduino, one can use the ProCAT without the need for its built in modem. Neat. + +\subsection{Reading from a ProCAT Flash with an Arduino} +There is a six pin ribbon cable that must be cut in half, and then the arduino connected to it. This is a minimally invasive hack. I can always put the cable back. Let's begin. + +The ink ribbon can be easily removed to gain better access to the IO board. The Shift Registers are TI 74HC165 which means this board may be able to be repaired, if needed. There is a conformal coating on the board, both sides. Funny how laptops don't bother with conformal coatings for waterproofing. + +Vcc is pin 16, and Gnd is 8. Tracing that back to the 6 pin cable to confirm the pinout of the arduino sketch is right, +\subsubsection{Never Believe the Internet} +The pinout of the sketch was wrong, for my flash. To be fair, my flash is not a Stentura 200, so that's why. +My pinout is: +\begin{verbatim} +On ribbon cable going from left to right looking from above. + +RIBBON CABLE: +1 SH/LD (shift) +2 GND +3 CLK +4 PWR +5 Serial Out +6 ??? Goes to Resistor +(INSERT PICTURE) + +On my IO board, the pins are staggered, so there is 1,2,3, + then another column of 4,5,6 (columns start at the top, +1 being a square pad). Confusing. + +IO BOARD PADS +1 ??? Goes to Resistor +2 PWR +3 GND +4 Serial Out +5 CLK (goes underneath a resistor, then to all clocks) +6 SH/LD +(INSERT PICTURE) +\end{verbatim} +These pins on the IO board are also soldered to pads (not holes) and fragile. Shit design. Tiny wires. I disconnected one just trying to follow the wires. Also they put some tape w/grease on the wires, and have them in a different order on the PCB from what the ribbon cable wiring is. Shit. Nothing I can't handle, however. + +There are three rails going on the top (bottom?) of the IO board. These are CLOCK, SH/LD, and Power. GND is a copper flood on the top (bottom?) of the IO board. Make sure to double check the pins line up with what you are connecting after building this. + +If you look closely on the circuit board for the IO expander, you might see labels for the Pins. I have G for gnd, + for Pwr, C for clk, etc.. +\subsection{Let's solder new wires on the IO board} +I don't need to use the ribbon cable. Instead, let's take off the wires and use my own cable. I might make a PCB to fit inside the Flash... I'll need to edit the Arduino sketch too. + +Not only the IO board, but I'll also need to attach wires to the metal chassis or frame somewhere inside. The Pins of the Steno short the IO expander to ground so I need to have the Arduino connected to chassis as well. + +Very carefully, I used solder wick to remove all solder from the existig pins. Making sure to tin the tip before using wick each time. After removing all the solder, I pushed through the pins to remove the conformal coating from the other side. Then I passed some wires through the (fairly thick) PCB. Not too hard, but it helps to have experience here. + + +\subsection{Arduino Sketch} + +I made some edits to the Arduino sketch. One thing noteworthy to myself is the +\begin{verbatim} + /* + * All inputs are pulled up. Pressing a key shorts +the circuit to + * ground. + * + * We invert the logic here to convert to more + conventional positive + * logic. + */ + pressed = !digitalRead(DATA_IN); +\end{verbatim} +Haven't see the !variable logic before. Only in booleans, if(!true)... + + +The mapping of the pins on the ProCAT flash is different from the Stentura, so some deciphering was necessary. I ended up brute forcing some of it, as I couldn't figure out exactly how it was different, with relation to the previous setup. + +I also added the debounce logic from one of the repos into the code. And added some serial debug notes. All said and done, the device connected into Plover and worked without issue. Nice. + +Here is the mapping that took 1-2 hours to decipher, and the end result (see also arduino folder). + +\begin{verbatim} +void construct_data(char raw_data[], char packed_data[]) +{ + packed_data[0] = 0x80; + packed_data[1] = (raw_data[ 5] << 6) /* S- */ //Have to move + arrays entries around here, if you are going to + | (raw_data[ 4] << 4) /* T- */ //change values. + Need all 24 bits. + | (raw_data[ 3] << 3) /* K- */ + | (raw_data[ 2] << 2) /* P- */ + | (raw_data[ 1] << 1) /* W- */ + | (raw_data[ 0] << 0); /* H- */ + + packed_data[2] = (raw_data[ 15] << 6) /* R- */ + | (raw_data[ 14] << 5) /* A- */ + | (raw_data[ 13] << 4) /* O- */ + | (raw_data[ 12] << 3); /* * */ + + packed_data[3] = (raw_data[11] << 3) /* -E */ + | (raw_data[10] << 2) /* -U */ + | (raw_data[9] << 1) /* -F */ + | (raw_data[8] << 0); /* -R */ + + packed_data[4] = (raw_data[23] << 6) /* -P */ // was 14 + | (raw_data[22] << 5) /* -B */ // was dupe 0 + | (raw_data[21] << 4) /* -L */ + | (raw_data[20] << 3) /* -G */ + | (raw_data[19] << 2) /* -T */ + | (raw_data[18] << 1) /* -S */ + | (raw_data[17] << 0); /* -D */ + + packed_data[5] = (raw_data[6] << 6) /* # */ // + | (raw_data[16] << 0); /* -Z */ +} +\end{verbatim} +The Gemini PR protocol is reasonable to deal with, and this hack worked out well. + +\section{Conclusion} +The ProCAT Flash is similar to the Stentura 400 but not identical. Due to that, the arduino sketch needed to be customized somewhat to interface with the Shift Registers. Also, the pinout of the ribbon cable was different. Otherwise, thanks to the original efforts of the first steno-arduino sketch, I was able to make this old ProCAT Flash output to Plover without using the internal Motherboard, nor the RJ11 connection. Thanks to this, I now have a real steno machine that cost no more than \$100 including shipping. \footnote{This price is comparable to what it would've cost for a home built keyboard solution. But is the value the same? I doubt it. The machining of the key levers on this ProCAT is miles beyond a PCB and some switches.} + +I feel using a genuine Steno machine was the right choice to starting down this road, as I don't want to deal with the toys or half baked solutions made by some hackers who are selling home built keyboards.\footnote{There is also the issue that the switches on these keyboard all require 10-30 something of force for each key, whereas the ProCAT only requires 10-20 of force for the first key, whereas all subsequent keys, are free of strain. A small difference, but the devil is in the details. You can't beat the real thing.} However, I will say, that once I'm comfortable with this, I might get one of those keyboards, add a few extra keys on\footnote{By keys, I mean I plan to make a custom keyboard solution. Rotaries, Slide pots, etc... All the fun interfacing things.}, and make my own custom keyboard for interfacing with GNU Linux. + +\end{document} diff --git a/Steno_ProCAT_Flash/docs/5.tex~ b/Steno_ProCAT_Flash/docs/5.tex~ new file mode 100644 index 0000000..64ad465 --- /dev/null +++ b/Steno_ProCAT_Flash/docs/5.tex~ @@ -0,0 +1,82 @@ +\documentclass[11pt]{article} +%Gummi|065|=) +\title{ProCAT Flash and Plover} +\author{Steak Electronics} +\date{2019} +\begin{document} + +\maketitle +\section{Overview} +I want to use a ProCAT flash with Plover. The ProCAT Flash is a stenography machine. It allows for faster typing, and less strain. Plover is a FOSS Stenography project. +\section{Work Log} +\subsection{Not All ProCAT Flash's will work with Plover} +Some of the plover docs mention that a ProCAT flash will work with a RJ11 to DB9 cable, and that the protocol can be set to Baron. My device must be an older firmware as there is no option to change the protocol, and in fact the RJ11 appears to be only for outbound calling... There is a modem option, and it allows you to call a number. It appears to be for actually calling a phone line. + +Instead, there is an arduino sketch of someone who has previously tapped into the serial out of the IO Expander (essentially the board that reads the keys), and helpfully outlined the process. By cutting the motherboard out of the picture, and driving the IO board directly from a 5V Arduino, one can use the ProCAT without the need for its built in modem. Neat. + +\subsection{Reading from a ProCAT Flash with an Arduino} +There is a six pin ribbon cable that must be cut in half, and then the arduino connected to it. This is a minimally invasive hack. I can always put the cable back. Let's begin. + +The ink ribbon can be easily removed to gain better access to the IO board. The Shift Registers are TI 74HC165 which means this board may be able to be repaired, if needed. There is a conformal coating on the board, both sides. Funny how laptops don't bother with conformal coatings for waterproofing. + +Vcc is pin 16, and Gnd is 8. Tracing that back to the 6 pin cable to confirm the pinout of the arduino sketch is right, +\subsubsection{Never Believe the Internet} +The pinout of the sketch was wrong, for my flash. To be fair, my flash is not a Stentura 200, so that's why. +My pinout is: +\begin{verbatim} +On ribbon cable going from left to right looking from above. + +RIBBON CABLE: +1 SH/LD (shift) +2 GND +3 CLK +4 PWR +5 Serial Out +6 ??? Goes to Resistor +(INSERT PICTURE) + +On my IO board, the pins are staggered, so there is 1,2,3, + then another column of 4,5,6 (columns start at the top, +1 being a square pad). Confusing. + +IO BOARD PADS +1 ??? Goes to Resistor +2 PWR +3 GND +4 Serial Out +5 CLK (goes underneath a resistor, then to all clocks) +6 SH/LD +(INSERT PICTURE) + +\end{verbatim} +These pins on the IO board are also soldered to pads (not holes) and fragile. Shit design. Tiny wires. I disconnected one just trying to follow the wires. Also they put some tape w/grease on the wires, and have them in a different order on the PCB from what the ribbon cable wiring is. Shit. Nothing I can't handle, however. + +There are three rails going on the top (bottom?) of the IO board. These are CLOCK, SH/LD, and Power. GND is a copper flood on the top (bottom?) of the IO board. Make sure to double check the pins line up with what you are connecting after building this. + +If you look closely on the circuit board for the IO expander, you might see labels for the Pins. I have G for gnd, + for Pwr, C for clk, etc.. +\subsection{Let's solder new wires on the IO board} +I don't need to use the ribbon cable. Instead, let's take off the wires and use my own cable. I still wish the pads were holes, but I'm not making a new PCB for the IO board (though that is feasible). I might however make a PCB to fit inside the Flash... I'll need to edit the Arduino sketch too. + +Not only the IO board, but I'll also need to attach wires to the metal chassis or frame somewhere inside. The Pins of the Steno short the IO expander to ground so I need to have the Arduino connected to chassis as well. + + + +\subsection{Arduino Sketch} + +I made some edits to the Arduino sketch. One thing noteworthy to myself is the +\begin{verbatim} + /* + * All inputs are pulled up. Pressing a key shorts +the circuit to + * ground. + * + * We invert the logic here to convert to more + conventional positive + * logic. + */ + pressed = !digitalRead(DATA_IN); +\end{verbatim} +Haven't see the !variable logic before. Only in booleans, if(!true)... + + +\end{document} diff --git a/Steno_ProCAT_Flash/docs/6.aux b/Steno_ProCAT_Flash/docs/6.aux new file mode 100644 index 0000000..9030c5d --- /dev/null +++ b/Steno_ProCAT_Flash/docs/6.aux @@ -0,0 +1,9 @@ +\relax +\@writefile{toc}{\contentsline {section}{\numberline {1}Overview}{1}} +\@writefile{toc}{\contentsline {section}{\numberline {2}Work Log}{1}} +\@writefile{toc}{\contentsline {subsection}{\numberline {2.1}Not All ProCAT Flash's will work with Plover}{1}} +\@writefile{toc}{\contentsline {subsection}{\numberline {2.2}Reading from a ProCAT Flash with an Arduino}{1}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {2.2.1}Never Believe the Internet}{2}} +\@writefile{toc}{\contentsline {subsection}{\numberline {2.3}Let's solder new wires on the IO board}{3}} +\@writefile{toc}{\contentsline {subsection}{\numberline {2.4}Arduino Sketch}{3}} +\@writefile{toc}{\contentsline {section}{\numberline {3}Conclusion}{5}} diff --git a/Steno_ProCAT_Flash/docs/6.log b/Steno_ProCAT_Flash/docs/6.log new file mode 100644 index 0000000..21fefe7 --- /dev/null +++ b/Steno_ProCAT_Flash/docs/6.log @@ -0,0 +1,101 @@ +This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2015/dev/Debian) (preloaded format=pdflatex 2018.11.28) 20 JUN 2019 03:25 +entering extended mode + restricted \write18 enabled. + %&-line parsing enabled. +**/home/layoutdev/Desktop/code/documentation_general/Electronics_Projects_2019/ +Steno_ProCAT_Flash/docs/6.tex + +(/home/layoutdev/Desktop/code/documentation_general/Electronics_Projects_2019/S +teno_ProCAT_Flash/docs/6.tex +LaTeX2e <2014/05/01> +Babel <3.9l> and hyphenation patterns for 2 languages loaded. +(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls +Document Class: article 2014/09/29 v1.4h Standard LaTeX document class +(/usr/share/texlive/texmf-dist/tex/latex/base/size11.clo +File: size11.clo 2014/09/29 v1.4h Standard LaTeX file (size option) +) +\c@part=\count79 +\c@section=\count80 +\c@subsection=\count81 +\c@subsubsection=\count82 +\c@paragraph=\count83 +\c@subparagraph=\count84 +\c@figure=\count85 +\c@table=\count86 +\abovecaptionskip=\skip41 +\belowcaptionskip=\skip42 +\bibindent=\dimen102 +) +No file 6.aux. +\openout1 = `6.aux'. + +LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 6. +LaTeX Font Info: ... okay on input line 6. +LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 6. +LaTeX Font Info: ... okay on input line 6. +LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 6. +LaTeX Font Info: ... okay on input line 6. +LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 6. +LaTeX Font Info: ... okay on input line 6. +LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 6. +LaTeX Font Info: ... okay on input line 6. +LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 6. +LaTeX Font Info: ... okay on input line 6. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <12> on input line 8. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <8> on input line 8. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <6> on input line 8. +[1 + +{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] [2] [3] +Overfull \hbox (13.6647pt too wide) in paragraph at lines 122--122 +[] \OT1/cmtt/m/n/10.95 packed_data[1] = (raw_data[ 5] << 6) /* S- */ //Have + to move[] + [] + + +Overfull \hbox (25.16208pt too wide) in paragraph at lines 122--122 +[] \OT1/cmtt/m/n/10.95 | (raw_data[ 4] << 4) /* T- */ //chan +ge values.[] + [] + + +Overfull \hbox (13.6647pt too wide) in paragraph at lines 122--122 +[] \OT1/cmtt/m/n/10.95 | (raw_data[22] << 5) /* -B */ // wa +s dupe 0[] + [] + +[4] +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <10.95> on input line 126. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <9> on input line 126. +LaTeX Font Info: External font `cmex10' loaded for size +(Font) <5> on input line 126. + [5] (./6.aux) ) +Here is how much of TeX's memory you used: + 243 strings out of 495020 + 2889 string characters out of 6181323 + 53970 words of memory out of 5000000 + 3530 multiletter control sequences out of 15000+600000 + 9891 words of font info for 35 fonts, out of 8000000 for 9000 + 14 hyphenation exceptions out of 8191 + 24i,8n,19p,968b,187s stack positions out of 5000i,500n,10000p,200000b,80000s + +Output written on 6.pdf (5 pages, 128539 bytes). +PDF statistics: + 56 PDF objects out of 1000 (max. 8388607) + 39 compressed objects within 1 object stream + 0 named destinations out of 1000 (max. 500000) + 1 words of extra memory for PDF output out of 10000 (max. 10000000) + diff --git a/Steno_ProCAT_Flash/docs/6.pdf b/Steno_ProCAT_Flash/docs/6.pdf new file mode 100644 index 0000000..60d90c7 Binary files /dev/null and b/Steno_ProCAT_Flash/docs/6.pdf differ diff --git a/Steno_ProCAT_Flash/docs/6.tex b/Steno_ProCAT_Flash/docs/6.tex new file mode 100644 index 0000000..eb11117 --- /dev/null +++ b/Steno_ProCAT_Flash/docs/6.tex @@ -0,0 +1,130 @@ +\documentclass[11pt]{article} +%Gummi|065|=) +\title{ProCAT Flash and Plover} +\author{Steak Electronics} +\date{2019} +\begin{document} + +\maketitle +\section{Overview} +I want to use a ProCAT flash with Plover. The ProCAT Flash is a stenography machine. It allows for faster typing, and less strain. Plover is a FOSS Stenography project. +\section{Work Log} +\subsection{Not All ProCAT Flash's will work with Plover} +Some of the plover docs mention that a ProCAT flash will work with a RJ11 to DB9 cable, and that the protocol can be set to Baron. My device must be an older firmware as there is no option to change the protocol, and in fact the RJ11 appears to be only for outbound calling... There is a modem option, and it allows you to call a number. It appears to be for actually calling a phone line. + +Instead, there is an arduino sketch of someone who has previously tapped into the serial out of the IO Expander (essentially the board that reads the keys), and helpfully outlined the process. By cutting the motherboard out of the picture, and driving the IO board directly from a 5V Arduino, one can use the ProCAT without the need for its built in modem. Neat. + +\subsection{Reading from a ProCAT Flash with an Arduino} +There is a six pin ribbon cable that must be cut in half, and then the arduino connected to it. This is a minimally invasive hack. I can always put the cable back. Let's begin. + +The ink ribbon can be easily removed to gain better access to the IO board. The Shift Registers are TI 74HC165 which means this board may be able to be repaired, if needed. There is a conformal coating on the board, both sides. Funny how laptops don't bother with conformal coatings for waterproofing. + +Vcc is pin 16, and Gnd is 8. Tracing that back to the 6 pin cable to confirm the pinout of the arduino sketch is right, +\subsubsection{Never Believe the Internet} +The pinout of the sketch was wrong, for my flash. To be fair, my flash is not a Stentura 200, so that's why. +My pinout is: +\begin{verbatim} +On ribbon cable going from left to right looking from above. + +RIBBON CABLE: +1 SH/LD (shift) +2 GND +3 CLK +4 PWR +5 Serial Out +6 ??? Goes to Resistor +(INSERT PICTURE) + +On my IO board, the pins are staggered, so there is 1,2,3, + then another column of 4,5,6 (columns start at the top, +1 being a square pad). Confusing. + +IO BOARD PADS +1 ??? Goes to Resistor +2 PWR +3 GND +4 Serial Out +5 CLK (goes underneath a resistor, then to all clocks) +6 SH/LD +(INSERT PICTURE) +\end{verbatim} +These pins on the IO board are also soldered to pads (not holes) and fragile. Shit design. Tiny wires. I disconnected one just trying to follow the wires. Also they put some tape w/grease on the wires, and have them in a different order on the PCB from what the ribbon cable wiring is. Shit. Nothing I can't handle, however. + +There are three rails going on the top (bottom?) of the IO board. These are CLOCK, SH/LD, and Power. GND is a copper flood on the top (bottom?) of the IO board. Make sure to double check the pins line up with what you are connecting after building this. + +If you look closely on the circuit board for the IO expander, you might see labels for the Pins. I have G for gnd, + for Pwr, C for clk, etc.. +\subsection{Let's solder new wires on the IO board} +I don't need to use the ribbon cable. Instead, let's take off the wires and use my own cable. I might make a PCB to fit inside the Flash... I'll need to edit the Arduino sketch too. + +Not only the IO board, but I'll also need to attach wires to the metal chassis or frame somewhere inside. The Pins of the Steno short the IO expander to ground so I need to have the Arduino connected to chassis as well. + +Very carefully, I used solder wick to remove all solder from the existig pins. Making sure to tin the tip before using wick each time. After removing all the solder, I pushed through the pins to remove the conformal coating from the other side. Then I passed some wires through the (fairly thick) PCB. Not too hard, but it helps to have experience here. + + +\subsection{Arduino Sketch} + +I made some edits to the Arduino sketch. One thing noteworthy to myself is the +\begin{verbatim} + /* + * All inputs are pulled up. Pressing a key shorts +the circuit to + * ground. + * + * We invert the logic here to convert to more + conventional positive + * logic. + */ + pressed = !digitalRead(DATA_IN); +\end{verbatim} +Haven't see the !variable logic before. Only in booleans, if(!true)... + + +The mapping of the pins on the ProCAT flash is different from the Stentura, so some deciphering was necessary. I ended up brute forcing some of it, as I couldn't figure out exactly how it was different, with relation to the previous setup. + +I also added the debounce logic from one of the repos into the code. And added some serial debug notes. All said and done, the device connected into Plover and worked without issue. Nice. + +Here is the mapping that took 1-2 hours to decipher, and the end result (see also arduino folder). + +\begin{verbatim} +void construct_data(char raw_data[], char packed_data[]) +{ + packed_data[0] = 0x80; + packed_data[1] = (raw_data[ 5] << 6) /* S- */ //Have to move + arrays entries around here, if you are going to + | (raw_data[ 4] << 4) /* T- */ //change values. + Need all 24 bits. + | (raw_data[ 3] << 3) /* K- */ + | (raw_data[ 2] << 2) /* P- */ + | (raw_data[ 1] << 1) /* W- */ + | (raw_data[ 0] << 0); /* H- */ + + packed_data[2] = (raw_data[ 15] << 6) /* R- */ + | (raw_data[ 14] << 5) /* A- */ + | (raw_data[ 13] << 4) /* O- */ + | (raw_data[ 12] << 3); /* * */ + + packed_data[3] = (raw_data[11] << 3) /* -E */ + | (raw_data[10] << 2) /* -U */ + | (raw_data[9] << 1) /* -F */ + | (raw_data[8] << 0); /* -R */ + + packed_data[4] = (raw_data[23] << 6) /* -P */ // was 14 + | (raw_data[22] << 5) /* -B */ // was dupe 0 + | (raw_data[21] << 4) /* -L */ + | (raw_data[20] << 3) /* -G */ + | (raw_data[19] << 2) /* -T */ + | (raw_data[18] << 1) /* -S */ + | (raw_data[17] << 0); /* -D */ + + packed_data[5] = (raw_data[6] << 6) /* # */ // + | (raw_data[16] << 0); /* -Z */ +} +\end{verbatim} +The Gemini PR protocol is reasonable to deal with, and this hack worked out well. + +\section{Conclusion} +The ProCAT Flash is similar to the Stentura 400 but not identical. Due to that, the arduino sketch needed to be customized somewhat to interface with the Shift Registers. Also, the pinout of the ribbon cable was different. Otherwise, thanks to the original efforts of the first steno-arduino sketch, I was able to make this old ProCAT Flash output to Plover without using the internal Motherboard, nor the RJ11 connection. Thanks to this, I now have a real steno machine that cost no more than \$100 including shipping. \footnote{This price is comparable to what it would've cost for a home built keyboard solution. But is the value the same? I doubt it. The machining of the key levers on this ProCAT is miles beyond a PCB and some switches.} + +I feel using a genuine Steno machine was the right choice to starting down this road, as I don't want to deal with the toys or half baked solutions made by some hackers who are selling home built keyboards.\footnote{There is also the issue that the switches on these keyboard all require 10-30 something of force for each key, whereas the ProCAT only requires 10-20 of force for the first key, whereas all subsequent keys, are free of strain. A small difference, but the devil is in the details. You can't beat the real thing.} However, I will say, that once I'm comfortable with this, I might get one of those keyboards, add a few extra keys on\footnote{By keys, I mean I plan to make a custom keyboard solution. Rotaries, Slide pots, etc... All the fun interfacing things.}, and make my own custom keyboard for interfacing with GNU Linux. + +\end{document}