Dallas 1-Wire Support
#1
Hello -

After several hours wasted trying to get the board to boot up (don't use unetbootin!) I finally managed to get Ubuntu installed
on the Pine 64 2Gb. I am trying to get it to read a Dallas 1-wire sensor from the GPIO Headers (Using pin 4).

I've installed the ported GPIO library for the Pi which doesn't seem to be able to read the device.

Has anyone managed to read data from the Dallas 1-Wire interface yet?

Also I read somewhere that the Pine64 supports analog connections - what pins support analog sensors?
  Reply
#2
(05-10-2016, 03:01 AM)ItsDave Wrote: Hello -

After several hours wasted trying to get the board to boot up (don't use unetbootin!) I finally managed to get Ubuntu installed
on the Pine 64 2Gb. I am trying to get it to read a Dallas 1-wire sensor from the GPIO Headers (Using pin 4).

I've installed the ported GPIO library for the Pi which doesn't seem to be able to read the device.

Has anyone managed to read data from the Dallas 1-Wire interface yet?

Also I read somewhere that the Pine64 supports analog connections - what pins support analog sensors?

Here are described pins of Raspberry PI bus, Euler Bus, Exp bus and Wifi/BT bus.
http://files.pine64.org/doc/Pine%20A64%2...160119.pdf

I suppose you mean Raspberry PI bus GPIO4 (RPI pin7) because RPI pin4 is 5V VCC.
Here is table where a community member tested the GPIO pins (PINE seems to have different GPIO numbers than Raspberry PI)
http://joey.hazlett.us/pine64/pine64_pins.html

Raspberry PI bus doesn't have ADC (Analog to Digital Converter). You can use MCP3004/MCP3008 chip to achieve this.
https://learn.adafruit.com/reading-a-ana...spberry-pi (step by step guide)
https://cdn-shop.adafruit.com/datasheets/MCP3008.pdf (MCP3008 datasheet)

Here is guide for DS18B20 1Wire temperature sensor for Raspberry PI.
https://learn.adafruit.com/adafruits-ras...ng/ds18b20
  Reply
#3
(05-10-2016, 04:37 AM)peterz Wrote:
(05-10-2016, 03:01 AM)ItsDave Wrote: Hello -

After several hours wasted trying to get the board to boot up (don't use unetbootin!) I finally managed to get Ubuntu installed
on the Pine 64 2Gb. I am trying to get it to read a Dallas 1-wire sensor from the GPIO Headers (Using pin 4).

I've installed the ported GPIO library for the Pi which doesn't seem to be able to read the device.

Has anyone managed to read data from the Dallas 1-Wire interface yet?

Also I read somewhere that the Pine64 supports analog connections - what pins support analog sensors?

Here are described pins of Raspberry PI bus, Euler Bus, Exp bus and Wifi/BT bus.
http://files.pine64.org/doc/Pine%20A64%2...160119.pdf

I suppose you mean Raspberry PI bus GPIO4 (RPI pin7) because RPI pin4 is 5V VCC.
Here is table where a community member tested the GPIO pins (PINE seems to have different GPIO numbers than Raspberry PI)
http://joey.hazlett.us/pine64/pine64_pins.html

Raspberry PI bus doesn't have ADC (Analog to Digital Converter). You can use MCP3004/MCP3008 chip to achieve this.
https://learn.adafruit.com/reading-a-ana...spberry-pi (step by step guide)
https://cdn-shop.adafruit.com/datasheets/MCP3008.pdf (MCP3008 datasheet)

Here is guide for DS18B20 1Wire temperature sensor for Raspberry PI.
https://learn.adafruit.com/adafruits-ras...ng/ds18b20

Thanks for your reply, although I am currently a little confused by it! The links you have added refer to getting the DS18B20 working with an RPi rather then a Pine64 which is something i've already achieved (or i'd be posting on the Rpi forums)....

However, the same doesn't seem to work on the Pine64 (although I have just noticed the difference in the GPIO numbers - I shall try that this evening). On the Pi once connected the sensor is mounted at /sys/bus/devices/w1/ but I can't seem to find a similar location for the Pine.
  Reply
#4
[quote pid='9118' dateline='1462887408']
Thanks for your reply, although I am currently a little confused by it! The links you have added refer to getting the DS18B20 working with an RPi rather then a Pine64 which is something i've already achieved (or i'd be posting on the Rpi forums)....

However, the same doesn't seem to work on the Pine64 (although I have just noticed the difference in the GPIO numbers - I shall try that this evening). On the Pi once connected the sensor is mounted at /sys/bus/devices/w1/ but I can't seem to find a similar location for the Pine.
[/quote]

This just the theory for now, because I don't have my pine yet.
GPIO should be working. I have seen some threads on this forum related to connected LED and i2c.

For 1 wire I'm not sure.
Some python libraries were ported to PINE as well.

I plan to test this (and other sensors and peripherals) once I receive my PINE (who know when).

Tllim posted on this forum about IR reciver (3 pins) is actually also 1 wire bus.
Perhaps that works already. But again I can't test anything until I receive my PINE. Sad
  Reply
#5
Did you have loaded the proper kernel driver for that ?
I think the w1-gpio driver is not even enabled in the current kernel from longsleep.
You need to enable it and compile new kerne as well as to tweak the device-tree to specify which pin to use.

@peterz, you've mentioned IR receiver, but this is completely different thing, it is not using Dallas 1 wire protocol.
  Reply
#6
(05-10-2016, 08:16 AM)martinayotte Wrote: Did you have loaded the proper kernel driver for that ?
I think the w1-gpio driver is not even enabled in the current kernel from longsleep.
You need to enable it and compile new kerne as well as to tweak the device-tree to specify which pin to use.

@peterz, you've mentioned IR receiver, but this is completely different thing, it is not using Dallas 1 wire protocol.

I suspected this may be the case - although doing so is out of my depth Sad
  Reply
#7
I will give it a try and if I succeed, I will submit a PR to Simon (longsleep) ...
  Reply
#8
I wish you luck!

If you need anyone to test anything just shout Smile
  Reply
#9
Well - w1 is disabled intentionally as i did not want to handle blacklisting to avoid constant bit-banging / interrupts this module generates when loaded (and afaik it loads automatically when not blacklisted). Let me know in the PR if that is not the case or if i am wrong and it does not constantly bit-bank for no reason when loaded Smile
  Reply
#10
(05-10-2016, 08:16 AM)martinayotte Wrote: Did you have loaded the proper kernel driver for that ?
I think the w1-gpio driver is not even enabled in the current kernel from longsleep.
You need to enable it and compile new kerne as well as to tweak the device-tree to specify which pin to use.

@peterz, you've mentioned IR receiver, but this is completely different thing, it is not using Dallas 1 wire protocol.

@martinayotte,

This is thread where tllim mentioned about 1-wire bus for IR receiver
http://forum.pine64.org/showthread.php?tid=353
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Question RGB LED Matrix support? foxnox 1 4,245 12-29-2017, 06:52 PM
Last Post: psychedup
  RaZberry Module (z-wave) need support to get it working! Luxus 13 18,711 11-03-2016, 02:04 AM
Last Post: Luxus
  USB WIFI Dongle Support InCognito 3 6,510 01-20-2016, 11:27 AM
Last Post: tllim

Forum Jump:


Users browsing this thread: 1 Guest(s)