개발자/라즈베리파이4

아쿠아포닉스 ORP 센서 EZO™ Carrier Board 연결 3

지구빵집 2023. 2. 1. 10:07
반응형

 

 

여기서는 Half-Cell Isolator EZO™ Carrier Board를 사용하여 ORP 회로 보드에서 데이터를 모니터링하는 방법을 살펴본다. 연결은 이전 회로보드를 사용할 때와 동일하다. 다음은 캐리어 보드 이미지와 Specification을 나타낸다.

 

 

EZO Carrier Board Specufication

 

OFF 핀을 낮음으로 설정하면 Half-Cell Isolator EZO™ 캐리어 보드가 꺼집니다 연결된 EZO™ 회로를 사용합니다. 전류 소비량은 3.8mA로 감소할 것입니다. OFF 핀을 사용하지 않는 경우 연결되지 않은 상태로 두거나 VCC로 연결합니다. 아래 연결도를 참고하세요.

 

EZO Carrier Board 핀 연결

 

 

캐리어 보드를 사용하는 환경에서도 이전 Embeded ORP Circuit 연결한 것처럼 동일하게 연결하고 테스트하였다. 결과는 동일하게 잘 나온다.(아래 연결도와 Test 코드 결과 참고) 물론 4.7k 풀업저항도 연결하였다.

 

 

라즈베리파이와 Embeded ORP Circuit 연결도

 

$ sudo i2cdetect -y 1

 

프로그램은 연결된 각 I2C 장치에 대한 정보를 알려주고, 아래는 I2C 주소(0x63)가 사용 중임을 나타낸다.  

 

연결이 되었다면 다음 프로그램을 실행하여 센서에 연결하고 시험을 진행한다.

 

$ cd ~/Raspberry-Pi-sample-code

 

$ sudo python i2c.py 를 실행하면 아래와 같이 실행하는 화면을 볼 수 있다. 간단한 사용법과 명령어를 아래에 나타낸다.  

 

 

pi@raspberrypi:~/Raspberry-Pi-sample-code $ sudo python i2c.py

>> Atlas Scientific I2C sample code
>> Any commands entered are passed to the default target device via I2C except:
  - Help
      brings up this menu
  - List
      lists the available I2C circuits.
      the --> indicates the target device that will receive individual commands
  - xxx:[command]
      sends the command to the device at I2C address xxx
      and sets future communications to that address
      Ex: "102:status" will send the command status to address 102
  - all:[command]
      sends the command to all devices
  - Poll[,x.xx]
      command continuously polls all devices
      the optional argument [,x.xx] lets you set a polling time
      where x.xx is greater than the minimum 1.50 second timeout.
      by default it will poll every 1.50 seconds
>> Pressing ctrl-c will stop the polling

--> ORP 98
>> Enter command: poll, 3
-------press ctrl-c to stop the polling
Success ORP 98: -450.3
-------press ctrl-c to stop the polling
Success ORP 98: -448.6
-------press ctrl-c to stop the polling
Success ORP 98: -448.9
-------press ctrl-c to stop the polling
Success ORP 98: -447.8
-------press ctrl-c to stop the polling
Success ORP 98: -443.9
-------press ctrl-c to stop the polling
Success ORP 98: -445.4
-------press ctrl-c to stop the polling
Success ORP 98: -450.1

 

 

 

반응형