ArunSinghJ
Posts: 3
Joined: Tue Apr 12, 2016 3:56 pm

Trouble in receiving UART data !

Thu Apr 14, 2016 3:14 pm

I am working on a project for my company. The task is to collect the data from a washing machine using a raspberry pi. I have followed many tutorials, and for reference I have mentioned the steps below,

1. Set up:

From the Machine : 3 wires comes out(DATA, VCC, GND) which is based on UART communication

RASPI: connected my computer and RASPI to common router and accessing RASPI via Putty terminal

UART PINS : In the RASPI Pin 10 : Connected to DATA pin of the machine
and Pin 6: Connected to GND pin of the machine

I am not connecting the VCC pin of the machine to the RASPI (5v), once i blew a Pi by doing so !

2. I disabled the serial console by following the link ,
https://github.com/lurch/rpi-serial-console

3. I have also set the baud rate to 9600,

4. I tried cat /dev/ttyAMA0 which shows me Junk Characters

`ï· Ý[﷏ »Ã viá `ï· Ý[﷏ »Ã viá `ï· Ý[﷏ »Ã viá `ï· Ý[﷏ »Ã viá `ï· Ý[﷏ #!/

5. Tried to do a hexdump and this shows

sudo hexdump -C /dev/ttyAMA0

hexadecimal values, but the values are not the actual data which I am expecting !!

Can anyone help me with this ??

Please !!

quinness
Posts: 17
Joined: Thu Mar 10, 2016 12:02 pm

Re: Trouble in receiving UART data !

Thu Apr 14, 2016 8:06 pm

Question : Does RPi 3 UART/GPIO handle 5 volt ok? Read somewhere that it might destroy GPIO-ports
If your data is inserted in a hex/binary editor you can see that it is much repeated patterns 0b01011011 0b01011011 0b01011011 ... so I would suggest to check the speed of you machine, might be 19200baud edit: or 4800 more probaly because almost every digit is doubled, sometimes inly one time or sometimes three times, but most twice.
Raspian Jessie 2016-02-26 _-=* If there are choices, why complain? *=-_
openSUSE LEAP 42.1 (3 pcs) _-=* Uppland, Sweden *=-_

ArunSinghJ
Posts: 3
Joined: Tue Apr 12, 2016 3:56 pm

Re: Trouble in receiving UART data !

Thu Apr 14, 2016 8:43 pm

Thank you for your suggestion and reply quinness !!!! I am using a Raspi Model B board ! And I am not feeding it 5v, I have ground to ground and data to the receiving serial pin ie, pin 10 of Raspi connected !! I have tried different baud rates but the data is still junk !

And this is what i get by doing a hex dump !

00000340 39 3c 00 18 00 38 78 c6 00 18 00 38 7e 46 00 0e |9<...8x....8~F..|
00000350 00 4e 6a c6 00 18 00 38 78 3c 00 18 00 38 3d 3c |.Nj....8x<...8=<|

quinness
Posts: 17
Joined: Thu Mar 10, 2016 12:02 pm

Re: Trouble in receiving UART data !

Thu Apr 14, 2016 8:53 pm

Shall the data from the machine be human readable?

At what speed is the last result from?
Raspian Jessie 2016-02-26 _-=* If there are choices, why complain? *=-_
openSUSE LEAP 42.1 (3 pcs) _-=* Uppland, Sweden *=-_

ArunSinghJ
Posts: 3
Joined: Tue Apr 12, 2016 3:56 pm

Re: Trouble in receiving UART data !

Thu Apr 14, 2016 9:01 pm

The data is supposed to be in Hexadecimal Format(that's the form of data I am expecting from the machine ). The data which I posted was by Baud Rate 9600, the machine Baud is the same as well !

The thing is I am receiving the data but I am not sure if its encoded or junk or whatever ! :(

quinness
Posts: 17
Joined: Thu Mar 10, 2016 12:02 pm

Re: Trouble in receiving UART data !

Thu Apr 14, 2016 9:31 pm

Little unsure, in your first post the pattern was repeated every 23 byte, and in replay 3 every 18.
So there are a pattern, but if it is garbage or real data... I don't know
Raspian Jessie 2016-02-26 _-=* If there are choices, why complain? *=-_
openSUSE LEAP 42.1 (3 pcs) _-=* Uppland, Sweden *=-_

mastermushi
Posts: 37
Joined: Thu Apr 07, 2016 8:47 am

Re: Trouble in receiving UART data !

Sat Apr 16, 2016 1:07 am

Okay, community. Here is what I have found out in regards to issues with mini UART on Raspberry Pi 3 when config.txt has force_turbo=1

1) Force turbo simply does not work if CPU gouverneur is enabled through "CPU SPEED" plugin for the dashboard.

2) Mini UART has started to crash the speed after latest pi-update operation (Yeap! I had fixed the bluetooth but now mini UART is unstable). And it usually happens if screen had been turned off by idle. Situation is the same as we did not use force_turbo. Fixed by applying sudo stty -F /dev/ttyS0 9600 before any mini UART use
So the fixes are: Do not perform pi-update on new boards if bluetooth works from the box. Moreover, if you do not use bluetooth - do not play with it. Do not install anything for BT! Better not to have this device that have no stable mini UART

Return to “Interfacing (DSI, CSI, I2C, etc.)”