Interfacing Arduino with Ericsson chatboard

I am trying to interface my Arduino with an Ericsson CHA-01 chatboard:

I have found various websites with information to do this, but I can get it to work. One of the sites is Keyboard advance. What I have found (some from other websites) is:

  • VCC should be 5V
  • Serial transmission is at TTL level at 9600,N,8,1
  • The keyboard uses about 200mah

When I wasn't aware about the amp draw, I have tried to use the 5V directly from Arduino. That didn't work. I contacted Ericsson and they told me that I should expect the chatboard to draw 200mah. So, I set up a breadboard with a voltage regulator. Powered it with 9V from an adapter and the 5V from regulator goes to VCC on the chatboard.

I have used the SoftwareSerial to receive data on pin 2 (Arduino) at 9600kbps. I get data, also if I don't type (maybe even just if I don't type) but it is all garbage (characters like: ÅÄÖËÜåäöëü). It's even a constant stream of garbage. I seem to get some data (sometimes) when power to the chatboard is disconnected.

If someone can come up with hints where to look at, I am happy to hear from you!

Tonight I will post code.

hej jds,

not sure if it will help as this old news. but you can just take out the atmega on your arduino and use the RX TX pins then to communicate directly from the keyboard to you computer. i've never used "software serial" on the arduino, so can't comment on its reliabilty. but i think it could be helpful for debugging to rule out programming issues.

you could also easily try different baud rates. the keyboards serial specs you wrote seem quite promising, though sometimes these mobile phone things are more complicated as they seem. i'm thinking of some kind of sony ericsson hand shaking at a different baud rate first or a an amperage check so that it wouldn't work with neither less nor more than 200mA.

(you write 200mAh, this doesn't tell us about the peaks, still the arduino power regulator or USB should have no problems in providing the current for this thing)

i think a SE phone would be able to recognize the attached keyboard and model. so who knows, maybe they even built in something so that the keyboard can identify the attached phone!?

best, kuk

i forgot:

you dont know about the character encoding of the keyboard, do you? if the garbage you get is reproducable (always the same for a certain key) it's probably no garbage. and don't let the garbage (when no key is pressed) discourage you. when debuggig midi-input, i experienced the same with my (midi)keyboard and this gave me leepless nights. when i got the hardware right i learned, that the keyboard was just sending some status information continouusly, which could just be ignored.

Hi Kuk,

not sure if it will help as this old news. but you can just take out the atmega on your arduino and use the RX TX pins then to communicate directly from the keyboard to you computer. i've never used "software serial" on the arduino, so can't comment on its reliabilty. but i think it could be helpful for debugging to rule out programming issues.

I think this would be a nice test to start with. So, to be sure I understand this correctly: I can remove the Atmega chip from the socket on the Arduino, connect the rx and tx coming from the chatboard to pins 0 & 1 on Arduino and then connect the Arduino (through USB) to my PC?

If it would work this way, that would be nice! I will play a little with baudrate too.

Thanks

JD

i forgot:

you dont know about the character encoding of the keyboard, do you? if the garbage you get is reproducable (always the same for a certain key) it's probably no garbage. and don't let the garbage (when no key is pressed) discourage you. when debuggig midi-input, i experienced the same with my (midi)keyboard and this gave me leepless nights. when i got the hardware right i learned, that the keyboard was just sending some status information continouusly, which could just be ignored.

I am getting garbage all the time... I can't see very well if there is a change in the data when I press a key.

I think this would be a test thing to start with. So, to be sure I understand this correctly, I can remove the Atmega chip from the socket on the Arduino, connect the rx and tx coming from the chatboard to pins 0 & 1 on Arduino and then connect the Arduino (through USB) to my PC?

yes. you'll have to connect ground to ground too though, even if you power the keyboard form an external source!

Cool, thanks!

I haven't connected ground to Arduino ground currently (I connected chatboard ground to the ground pin of the vreg). Could that cause the garbage?

JD

I am getting garbage all the time... I can't see very well if there is a change in the data when I press a key.

that's hard, i agree. in that case it wouldn't be bad to use a programmable environment rather than a plain serial port data viewer.
regarding my hard time with midi, i programmed the arduino to light up an led as response to certain serial byte.

whatever character encoding the keyboard uses, if you pick a rondom number from 0-255, chances are that there is a button for it, which you can try to find out.

still i'd avoid using the software serial until you've had at least some success.

kuk

we're fast. i probably should wait a little before writing responses on responses :slight_smile:

Cool, thanks!

I haven't connected ground to Arduino ground currently (I connected chatboard ground to the ground pin of the vreg). Could that cause the garbage?

JD

yes. it is. devices need a common ground to interpret the ones and zeros of each other.
note that you will have to connect the keyboard to both "grounds", effectively connecting "all grounds" to one common. i wasn't sure if that was clear.

kuk

yes, it was going fast... then I had to go home... end of the day...

Ok, I have all grounds connected together now. In my original setup, there was some kind of pattern:

ð ð à à à ÀþÀþÀü?ü?ü?ü???? ð à à àþÀþÀþÀü?ü?ü?ü?ü?À???À ð à à à à àþÀþÀþÀüÀþ?ü?ü
?øààÀà ð ð à à ÀþÀþÀüÀü?ü?øàààÀ ð à àþÀþÀþÀü?ü?ü?ø?øààà ð à àþÀþÀþÀþ?ü?ü?ü?øààà
ð à à àþÀþÀü?ü?ü?øààà ð ð à À ÀþÀþ?ü?ü?ü?øàà ð à à àþÀþÀþÀü?ü?ü?øààà à à àþÀþÀü?
ü?ü?ø?øàà à à à À ÀþÀüÀü?üàààà ð à à ÀþÀþ?ü?ü?üàààà ð à à ÀþÀþ?ü?ü?üàààà à à àþÀ
þÀü?ü?ü?ø?øàà ð à à ÀþÀü?ü?ü?üààà ð à à àþÀþÀü?ü?üààà ð à àþÀþÀþ?ü?ü?øÀà ð à à à
þÀþÀþÀü?ü?øààà à à àþÀþÀþ?ü?ü?øÀà ð ð à ÀþÀþÀü?ü?ø?üààà à à àþÀþÀþÀü?ü?øààà à à
àþÀþÀü?ü?ü?øàà ð à à ÀþÀþ?ü?ü?øàààà à à ÀþÀüÀü?ü?øÀà ð ð à àþÀþÀü?ü?ü?ø?øàÀ à àþ
àþÀþ?þ?ü?ü?øÀÀ ð à àþÀþÀü?ü?ü?øàÀ ð ð à àþÀþÀþ?ü?ü?øÀÀ ð à àþÀþÀþ?ü?ü?øÀÀÀ à à à
þÀþÀü?ü?üÀÀÀÀ à àþÀþÀþÀþ?ü?üàÀÀ ð à à àþÀþÀü?ü?ü?ø?øÀ ð à à àþÀþÀþ?ü?ü?øààà à à
àþÀþÀü?øÀÀ ð à àþÀþÀü?ø? þÀü?ø ?À   üøÀ ð øøà à ð ð à à Àü?ø?ü?ø?ø?ð? à ÀþÀþÀþÀ
ü?üÀü?ü?ø à? ð ð ð àþÀ

I powered everything off and removed the Atmega168 from my Arduino NG. After connecting again, I used Hyperterminal to see if I got in any data. Nothing....

Any ideas Kuk?

Edit: The characters show a little different in Hyperteminal, the copy/past changed it. I think it is still ok to see if there is a pattern.

the page you mentioned states that the keyboard would only function after pressing the sms button.
otherwise i'm not sure. if the keyboard sends data you should be able to see it in hyperterminal if you were able to use this with your arduino before. even with the wrong baud rate something should show up.

did you connect both pins (1 & 5) to Vcc on the keyboard like shown on that site?

GBA ----------- Chatboard 
2 --------------- 4 (Chatboard serial in) 
3 -------[R]----- 2 (Chatboard serial out) 
6 --------------- 3 (GND) 
1 --------------- 1 and 5 (Vcc) 
1kohm is a suitable value for the resistor R, but you can really use anything between 470ohm - 10kohm. 
Both pin 1 and 5 on the chatboard must be connected to pin 1 on the GBA link port.

I completely overlooked the resistor that is needed. I hope I haven't damaged anything...

Project is on hold for a day or 2 now to get the resistor (it's about time I get a box with resistors that are used often :D)

i'm positive that the missing resistor didn't destroy your board. plus i don't see why it is needed at all. 470[ch937] - 10k[ch937] is quite a large range anyway. maybe it's a gameboy specific thing?

if you look at the Diecimila schematics, there are 1k[ch937] resistors between each the TX/RX pins and the FTDI chip. so i guess another 1k wouldn't make much of a difference. 10k probably couldn't even work, because of the pulldown resistor on the RX in the new design. (i can't find it in the schematics, but i remember that there is one on the newer boards... anyone knows abou that?)

do you use a Diecimila or older arduino?

I am using an Arduino NG. Not sure if there are many versions for this NG, I bought it at Sparkfun's, about 1.5 year ago.

Ok, had a little time to test with the resistor... to little or no avail. There is less garbage, but it's still there.

Strange thing is that I am getting data with no power connected to the keyboard. I guess softwareserial is causing that...

I have to investigate some more in how to write my program I think...