R-A
Posts: 48
Joined: Sun Sep 11, 2016 4:59 pm
Contact: Website

Raspberry Pi communicating with ARPI600

Sun Jun 24, 2018 3:19 pm

Hi,

I brought an ARPI600 adapter board for my Raspberry Pi 3 Model B but cannot get any information back from it.

I would like to read AC and DC Voltages using the ADC chip, TLC1543 on the ARPI600 board, but cannot seem to get any communications going.

Had anyone gotten this board to work on a Raspberry Pi 3 Model B?
I'm using a Raspberry Pi 3 Model B with 7" LCD Touch screen and Mini USB Wireless Keyboard

R-A
Posts: 48
Joined: Sun Sep 11, 2016 4:59 pm
Contact: Website

Re: Raspberry Pi communicating with ARPI600

Mon Jun 25, 2018 2:04 pm

Can anyone help with this, please?

Part of the problem, I guess, is that the instructions on the website are outdated (and I'm not getting any support from Waveshare).

In the first section they say I need to disable the serial port from /etc/inittab - which doesn't exist anymore on Debian Jessie or Sketch (I use a Raspberry Pi 3 Model B
Run the code:
sudo nano /etc/inittab
And modify the following lines:
#Spawn a getty on Raspberry Pi serial line
T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100
into:
#Spawn a getty on Raspberry Pi serial line
#T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100
Press the keys Ctrl+X, and select the option Y to save the modification.

So I disabled it via these commands instead:

Code: Select all

sudo systemctl stop [email protected]
But that caused a kernel panic and I had to reinstall Raspbian Sketch get the Pi working again.


Without disabling the serial console, I'm not sure if the Raspberry Pi can communicate with the ARPI600 board, and their Wiki is too vague to confirm this.
I'm using a Raspberry Pi 3 Model B with 7" LCD Touch screen and Mini USB Wireless Keyboard

User avatar
DougieLawson
Posts: 33858
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: Raspberry Pi communicating with ARPI600

Mon Jun 25, 2018 2:07 pm

You should use sudo raspi-config to disable the serial console. It edits all the stuff for you.
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

2012-18: 1B*5, 2B*2, B+, A+, Z, ZW, 3Bs*3, 3B+

Any DMs sent on Twitter will be answered next month.

R-A
Posts: 48
Joined: Sun Sep 11, 2016 4:59 pm
Contact: Website

Re: Raspberry Pi communicating with ARPI600

Mon Jun 25, 2018 4:42 pm

DougieLawson wrote:
Mon Jun 25, 2018 2:07 pm
You should use sudo raspi-config to disable the serial console. It edits all the stuff for you.
Ok, so I disabled the serial console this way, but that only allowed me to communicate with the Raspberry Pi using a Serial console from my PC, instead of using Putty.


But I am simply not getting any information back from the ADC chip. Although I don't have a battery for the RTC (which I don't need), I could get information back from it so the board works


Code: Select all

[email protected]:~# i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- 51 -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
[email protected]:~# hwclock -r
hwclock: Cannot access the Hardware Clock via any known method.
hwclock: Use the --debug option to see the details of our search for an access method.
[email protected]:~# hwclock -r --debug
hwclock from util-linux 2.29.2
hwclock: cannot open /dev/rtc: No such file or directory
No usable clock interface found.
hwclock: Cannot access the Hardware Clock via any known method.
[email protected]:~# sudo hwclock -r --debug
hwclock from util-linux 2.29.2
hwclock: cannot open /dev/rtc: No such file or directory
No usable clock interface found.
hwclock: Cannot access the Hardware Clock via any known method.


[email protected]:~# modprobe i2c-dev
[email protected]:~# echo pcf8563 0x51 > /sys/class/i2c-adapter/i2c-1/new_device
[email protected]:~# hwclock -r
2018-06-25 18:30:53.679593+0200
[email protected]:~# hwclock -r --debug
hwclock from util-linux 2.29.2
Using the /dev interface to the clock.
Assuming hardware clock is kept in UTC time.
Waiting for clock tick...
/dev/rtc does not have interrupt functions. Waiting in loop for time from /dev/rtc to change
...got clock tick
Time read from Hardware Clock: 2018/06/25 16:30:58
Hw clock time : 2018/06/25 16:30:58 = 1529944258 seconds since 1969
Time since last adjustment is 1529944258 seconds
Calculated Hardware Clock drift is 0.000000 seconds
2018-06-25 18:30:57.119015+0200
There is no "official download" of the code they're referring to on that website so I did some google search and got a few different version, but both gave me the same results:

Running the c code, I got this:

Code: Select all

[email protected]:/home/pi/ARPI600/program/AD_TLC1543# ./tlc1543
AD: 0000
AD: 0960
AD: 0026
AD: 0000
AD: 0000
AD: 0576
It repeats like that.

Running the python code, I got the following:

Code: Select all

"tlc1543.py" 43L, 840C written
AD: 244
AD: 384
AD: 324
AD: 344
AD: 348
AD: 428
AD: 337
AD: 346
AD: 405
AD: 396
AD: 359
AD: 382
AD: 464
AD: 381
AD: 362


As a test, I have the center pin of a POT connected to A0, with +5V and Ground connected to the external pins of the POT. Using the same breadboard and layout on an Arduino Nano gives me various voltages when I turn the POT, and I expected to get the same using this board.
I'm using a Raspberry Pi 3 Model B with 7" LCD Touch screen and Mini USB Wireless Keyboard

User avatar
DougieLawson
Posts: 33858
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: Raspberry Pi communicating with ARPI600

Mon Jun 25, 2018 5:22 pm

Add this

Code: Select all

dtoverlay=i2c-rtc,pcf8563
enable_uart=1
to /boot/config.txt and reboot to get your RTC working and enable the serial.
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

2012-18: 1B*5, 2B*2, B+, A+, Z, ZW, 3Bs*3, 3B+

Any DMs sent on Twitter will be answered next month.

R-A
Posts: 48
Joined: Sun Sep 11, 2016 4:59 pm
Contact: Website

Re: Raspberry Pi communicating with ARPI600

Mon Jun 25, 2018 8:24 pm

DougieLawson wrote:
Mon Jun 25, 2018 5:22 pm
Add this

Code: Select all

dtoverlay=i2c-rtc,pcf8563
enable_uart=1
to /boot/config.txt and reboot to get your RTC working and enable the serial.
Thanx,
Do you know how to get some analogue values from the ADC? Preferably in Python
I'm using a Raspberry Pi 3 Model B with 7" LCD Touch screen and Mini USB Wireless Keyboard

User avatar
DougieLawson
Posts: 33858
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: Raspberry Pi communicating with ARPI600

Mon Jun 25, 2018 8:42 pm

No, sorry. You'll have to read the datasheet for it.
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

2012-18: 1B*5, 2B*2, B+, A+, Z, ZW, 3Bs*3, 3B+

Any DMs sent on Twitter will be answered next month.

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

Who is online

Users browsing this forum: No registered users and 13 guests