Sat 17 of Nov, 2018 [20:27 UTC]
  add
Menu [hide]
  Blogs
  FAQs
  Surveys
Online users
95 online users
Adsense
This website is:

backlinks print

Pigator Onewire Installation


Onewire

Front view plug / Stecker von vorn

3-yellow (+5V - 350mA fused) / 4-green (OW) / 5-red (OW) / 6-black_or_white (GND)

Make sure i2c is active! On RPi2 you need to add to /boot/config.txt:
dtparam=i2c_arm=on

load (you may add module to /etc/modules) or:
sudo modprobe i2c_dev


To access the 1Wire bus do:
sudo apt-get install owfs


edit /etc/owfs.conf to:
#server: FAKE = DS18S20,DS2405
server: i2c = ALL:ALL


restart service and have a look:
sudo /etc/init.d/owserver restart
sudo /etc/init.d/owhttpd restart
  1. browse to http://ip_or_raspberry:2121
sudo owfs --i2c=ALL:ALL --allow_other /mnt/
ls /mnt

RTC

The extension ist equipped with an backed up Real Time Clock. It stores its energy in an on-board supercapacitor. This will last for about 3 days.
access the RTC by:
sudo echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-1/new_device
sleep 2
sudo hwclock

setting RTC by:
sudo hwclock -w

set system time from RTC during startup (i.e. in /etc/rc.local):
sudo hwclock -s

Than let Raspberry know that we have a real-Time-clock:
sudo apt-get remove fake-hwclock
sudo rm /etc/cron.hourly/fake-hwclock
sudo update-rc.d -f fake-hwclock remove
sudo rm /etc/init.d/fake-hwclock
sudo update-rc.d hwclock.sh enable

Modul connector

RPis serial port /dev/ttyAMA0 (or ttyS0) ist directly connected to modul. Other assignments as below:


Many modules use the Low-Level? RESET pin. To enable those you must pull RESET HIGH by doing:
sudo echo 22 > /sys/class/gpio/export
sudo echo out > /sys/class/gpio/gpio22/direction
sudo echo 1 > /sys/class/gpio/gpio22/value

for High-Level? RESET modules i.e. EnOcean? TCM310 do:
sudo echo 22 > /sys/class/gpio/export
sudo echo out > /sys/class/gpio/gpio22/direction
sudo echo 0 > /sys/class/gpio/gpio22/value

Bootload PIM

if test ! -d /sys/class/gpio/gpio22; then echo 22 > /sys/class/gpio/export; fi
echo out > /sys/class/gpio/gpio22/direction
echo 0 > /sys/class/gpio/gpio22/value

if test ! -d /sys/class/gpio/gpio27; then echo 27 > /sys/class/gpio/export; fi
echo out > /sys/class/gpio/gpio27/direction
echo 0 > /sys/class/gpio/gpio27/value

echo 1 > /sys/class/gpio/gpio22/value
sleep 1
echo 1 > /sys/class/gpio/gpio22/value
echo in > /sys/class/gpio/gpio27/direction
echo 27 > /sys/class/gpio/unexport

EEPROM

The configuration EEPROMs are available at:
  • PIGATOR board EEPROM -> sudo hexdump /sys/class/i2c-adapter/i2c-1/1-0057/eeprom
  • MODUL SLOT EEPROM -> sudo hexdump /sys/class/i2c-adapter/i2c-1/1-0050/eeprom
The EEPROMs are write protected, programmed at manufacture - but currently mostly empty...
You might need to load proper kernel driver before accessing the EEPROMs:
echo "24c02 0x50" > /sys/class/i2c-adapter/i2c-1/new_device
echo "24c02 0x57" > /sys/class/i2c-adapter/i2c-1/new_device


Created by: tostmann last modification: Wednesday 29 of November, 2017 [16:52:28 UTC] by tostmann


Adsense

local temperature
facebook
Pictures
thumbnail
CCD version 2
Gallery: CCD
RSS Wiki RSS Blogs RSS Image Galleries RSS File Galleries