1-line digital thermometer DS18B20 to LinuxCNC
23 May 2013 22:06 #34589
by Blackwind
1-line digital thermometer DS18B20 to LinuxCNC was created by Blackwind
Hi Folks,
One simple question: someone hookup a DS18B20 style temperature sensor (one line comms), to a pin in LCNC?
It could be done?
a specs sheet can fe found here:
DS18B20 Datasheet
Regards
Rick
PS: to moderators, move this topic if is needed.
One simple question: someone hookup a DS18B20 style temperature sensor (one line comms), to a pin in LCNC?
It could be done?
a specs sheet can fe found here:
DS18B20 Datasheet
Regards
Rick
PS: to moderators, move this topic if is needed.
Please Log in or Create an account to join the conversation.
23 May 2013 22:27 #34590
by andypugh
I can't find any references to doing so on the Wiki. However it looks like something that could be relatively easily done in software on the parallel port.
To guarantee < 15uS pulses the software would need to have a "reset" function as used by the parallel port driver, but other than that it looks moderately straightforward so write a HAL module to do it.
en.wikipedia.org/wiki/1-Wire
Replied by andypugh on topic 1-line digital thermometer DS18B20 to LinuxCNC
One simple question: someone hookup a DS18B20 style temperature sensor (one line comms), to a pin in LCNC?
I can't find any references to doing so on the Wiki. However it looks like something that could be relatively easily done in software on the parallel port.
To guarantee < 15uS pulses the software would need to have a "reset" function as used by the parallel port driver, but other than that it looks moderately straightforward so write a HAL module to do it.
en.wikipedia.org/wiki/1-Wire
The following user(s) said Thank You: Blackwind
Please Log in or Create an account to join the conversation.
28 May 2013 20:29 - 28 May 2013 20:30 #34835
by Blackwind
Replied by Blackwind on topic 1-line digital thermometer DS18B20 to LinuxCNC
Hi, andy, thanks for the reply
I have assumed that I had to write hal module to do it, and it seems simple, but thats beyond my current programming skills.
There is some arduino code and libraries for one wire, thats more familiar to me, but has to be ported.
Posted this asking if someone have this 1-wire sorted out, i think is interesting if we could have it.
Regards
Rick
I have assumed that I had to write hal module to do it, and it seems simple, but thats beyond my current programming skills.
There is some arduino code and libraries for one wire, thats more familiar to me, but has to be ported.
Posted this asking if someone have this 1-wire sorted out, i think is interesting if we could have it.
Regards
Rick
Last edit: 28 May 2013 20:30 by Blackwind.
Please Log in or Create an account to join the conversation.
28 May 2013 20:39 #34837
by andypugh
Replied by andypugh on topic 1-line digital thermometer DS18B20 to LinuxCNC
It sounds like fun, so I just ordered a few temperature sensors to play with.I have assumed that I had to write hal module to do it, and it seems simple, but thats beyond my current programming skills.
The following user(s) said Thank You: Blackwind
Please Log in or Create an account to join the conversation.
28 May 2013 20:59 #34842
by Blackwind
Pure human enlightenment, im with you.
Replied by Blackwind on topic 1-line digital thermometer DS18B20 to LinuxCNC
It sounds like fun, so I just ordered a few temperature sensors to play with.I have assumed that I had to write hal module to do it, and it seems simple, but thats beyond my current programming skills.
Pure human enlightenment, im with you.
Please Log in or Create an account to join the conversation.
31 May 2013 03:45 #34994
by andypugh
Replied by andypugh on topic 1-line digital thermometer DS18B20 to LinuxCNC
It looks like there would need to be external hardware, unless you happen to have an open-collector parallel port (bidirectional pins).
www.maximintegrated.com/app-notes/index.mvp/id/3230
Shows a scheme for 2-wire devices which can probably be modified.
www.maximintegrated.com/app-notes/index.mvp/id/3230
Shows a scheme for 2-wire devices which can probably be modified.
Please Log in or Create an account to join the conversation.
07 Jun 2013 19:47 #35401
by Blackwind
Replied by Blackwind on topic 1-line digital thermometer DS18B20 to LinuxCNC
Im confused
correct me if im wrong, pins 1-14-16-17 are always out, 10-11-12-13-15 are always in, but 2 to 9, can be in/out pins, this is an pp specification?
www.linuxcnc.org/docs/2.4/html/hal_parallel_port.html
but this has to be defined when loading a pp driver trough hal, this is the limitation? again, my lack of programming skills baffles me.
correct me if im wrong, pins 1-14-16-17 are always out, 10-11-12-13-15 are always in, but 2 to 9, can be in/out pins, this is an pp specification?
www.linuxcnc.org/docs/2.4/html/hal_parallel_port.html
but this has to be defined when loading a pp driver trough hal, this is the limitation? again, my lack of programming skills baffles me.
Please Log in or Create an account to join the conversation.
07 Jun 2013 20:06 #35403
by BigJohnT
Replied by BigJohnT on topic 1-line digital thermometer DS18B20 to LinuxCNC
Yes, you load the parallel port driver as IN or OUT when you start the configuration.
JT
JT
The following user(s) said Thank You: Blackwind
Please Log in or Create an account to join the conversation.
07 Jun 2013 20:31 #35406
by andypugh
It might be possible to use the pins as in/out in the semi-undocumented "X" mode. But I don't think that creates both sets of HAL pins. (and is only safe with certain models of parallel port)
www.linuxcnc.org/docs/html/hal/parallel_port.html
The problem is that one-wire needs to both be able to drive a pin low to signal to the devices, and set the pin high then read the value back to see if they are pulling it low.
One-wire might be possible with a single pin with changes to X-mode in the parport driver, but only for some parallel ports.
Replied by andypugh on topic 1-line digital thermometer DS18B20 to LinuxCNC
but 2 to 9, can be in/out pins, this is an pp specification?
It might be possible to use the pins as in/out in the semi-undocumented "X" mode. But I don't think that creates both sets of HAL pins. (and is only safe with certain models of parallel port)
www.linuxcnc.org/docs/html/hal/parallel_port.html
The problem is that one-wire needs to both be able to drive a pin low to signal to the devices, and set the pin high then read the value back to see if they are pulling it low.
One-wire might be possible with a single pin with changes to X-mode in the parport driver, but only for some parallel ports.
The following user(s) said Thank You: Blackwind
Please Log in or Create an account to join the conversation.
07 Jun 2013 20:47 #35407
by Blackwind
Replied by Blackwind on topic 1-line digital thermometer DS18B20 to LinuxCNC
have not read that section 1 note "hal and oc", my toughts blinding my vision....
Nice way to find what type of hardware is in pp.
Regards
Rick
Nice way to find what type of hardware is in pp.
Regards
Rick
Please Log in or Create an account to join the conversation.
Time to create page: 0.089 seconds