Quantcast

DS18B20 with eLua + Mizar32

classic Classic list List threaded Threaded
7 messages Options
gduarte gduarte
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

DS18B20 with eLua + Mizar32

Hello,

I recently bought a DS18B20 temperature sensor, but I got no idea how to connect it to Mizar32 and grab data from eLua. This is the datasheet:

http://datasheets.maximintegrated.com/en/ds/DS18B20.pdf

Which interface I have to use, UART, some PWM pin??

Any help is appreciated ;)

Cheers

--
Gabriel Duarte
Linux User #471185
Rio de Janeiro / RJ
http://genericdev.wordpress.com/

_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
BogdanM BogdanM
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: DS18B20 with eLua + Mizar32

Hi,


On Tue, May 21, 2013 at 8:52 PM, Gabriel Duarte <[hidden email]> wrote:
Hello,

I recently bought a DS18B20 temperature sensor, but I got no idea how to connect it to Mizar32 and grab data from eLua. This is the datasheet:

http://datasheets.maximintegrated.com/en/ds/DS18B20.pdf

Which interface I have to use, UART, some PWM pin??

Any help is appreciated ;)

Neither, you'd have to use 1-Wire (https://en.wikipedia.org/wiki/1-Wire). We don't have support in eLua  for that yet, although it should be relatively easy to implement.

Best,
Bogdan


Cheers

--
Gabriel Duarte
Linux User #471185
Rio de Janeiro / RJ
http://genericdev.wordpress.com/

--
You received this message because you are subscribed to the Google Groups "Mizar32" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 


_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
gduarte gduarte
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: DS18B20 with eLua + Mizar32

Hi!

The question is just how to send and get data, , what interface I have to use to send and receive data from the sensor. The rest, like decoding data, CRC, I'll implement myself.

Cheers


2013/5/21 Bogdan Marinescu <[hidden email]>
Hi,


On Tue, May 21, 2013 at 8:52 PM, Gabriel Duarte <[hidden email]> wrote:
Hello,

I recently bought a DS18B20 temperature sensor, but I got no idea how to connect it to Mizar32 and grab data from eLua. This is the datasheet:

http://datasheets.maximintegrated.com/en/ds/DS18B20.pdf

Which interface I have to use, UART, some PWM pin??

Any help is appreciated ;)

Neither, you'd have to use 1-Wire (https://en.wikipedia.org/wiki/1-Wire). We don't have support in eLua  for that yet, although it should be relatively easy to implement.

Best,
Bogdan


Cheers

--
Gabriel Duarte
Linux User #471185
Rio de Janeiro / RJ
http://genericdev.wordpress.com/

--
You received this message because you are subscribed to the Google Groups "Mizar32" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
You received this message because you are subscribed to the Google Groups "Mizar32" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Gabriel Duarte
Linux User #471185
Rio de Janeiro / RJ
http://genericdev.wordpress.com/

_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
BogdanM BogdanM
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: DS18B20 with eLua + Mizar32

Hi,


On Tue, May 21, 2013 at 9:05 PM, Gabriel Duarte <[hidden email]> wrote:
Hi!

The question is just how to send and get data, , what interface I have to use to send and receive data from the sensor. The rest, like decoding data, CRC, I'll implement myself.

And that is exactly what I was telling you. The interface is called 1-Wire, check the wikipedia link from my previous e-mail. Some MCUs have 1-Wire implemented in hardware, but only very few of them, so your best shot is to emulate it with a GPIO pin. I did this once and from what I remember it was quite an easy job.

Best,
Bogdan
 

Cheers


2013/5/21 Bogdan Marinescu <[hidden email]>
Hi,


On Tue, May 21, 2013 at 8:52 PM, Gabriel Duarte <[hidden email]> wrote:
Hello,

I recently bought a DS18B20 temperature sensor, but I got no idea how to connect it to Mizar32 and grab data from eLua. This is the datasheet:

http://datasheets.maximintegrated.com/en/ds/DS18B20.pdf

Which interface I have to use, UART, some PWM pin??

Any help is appreciated ;)

Neither, you'd have to use 1-Wire (https://en.wikipedia.org/wiki/1-Wire). We don't have support in eLua  for that yet, although it should be relatively easy to implement.

Best,
Bogdan


Cheers

--
Gabriel Duarte
Linux User #471185
Rio de Janeiro / RJ
http://genericdev.wordpress.com/

--
You received this message because you are subscribed to the Google Groups "Mizar32" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
You received this message because you are subscribed to the Google Groups "Mizar32" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Gabriel Duarte
Linux User #471185
Rio de Janeiro / RJ
http://genericdev.wordpress.com/

--
You received this message because you are subscribed to the Google Groups "Mizar32" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 


_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
gduarte gduarte
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: DS18B20 with eLua + Mizar32

Ok!

I thought that 1-Wire were only the protocol. Should I use UART from GPIO in Miza32 to emulate? I have seen some Arduino examples and they use PWM ports to read data, do not know if it's the same in eLua.


2013/5/21 Bogdan Marinescu <[hidden email]>
Hi,


On Tue, May 21, 2013 at 9:05 PM, Gabriel Duarte <[hidden email]> wrote:
Hi!

The question is just how to send and get data, , what interface I have to use to send and receive data from the sensor. The rest, like decoding data, CRC, I'll implement myself.

And that is exactly what I was telling you. The interface is called 1-Wire, check the wikipedia link from my previous e-mail. Some MCUs have 1-Wire implemented in hardware, but only very few of them, so your best shot is to emulate it with a GPIO pin. I did this once and from what I remember it was quite an easy job.

Best,
Bogdan
 

Cheers


2013/5/21 Bogdan Marinescu <[hidden email]>
Hi,


On Tue, May 21, 2013 at 8:52 PM, Gabriel Duarte <[hidden email]> wrote:
Hello,

I recently bought a DS18B20 temperature sensor, but I got no idea how to connect it to Mizar32 and grab data from eLua. This is the datasheet:

http://datasheets.maximintegrated.com/en/ds/DS18B20.pdf

Which interface I have to use, UART, some PWM pin??

Any help is appreciated ;)

Neither, you'd have to use 1-Wire (https://en.wikipedia.org/wiki/1-Wire). We don't have support in eLua  for that yet, although it should be relatively easy to implement.

Best,
Bogdan


Cheers

--
Gabriel Duarte
Linux User #471185
Rio de Janeiro / RJ
http://genericdev.wordpress.com/

--
You received this message because you are subscribed to the Google Groups "Mizar32" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
You received this message because you are subscribed to the Google Groups "Mizar32" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Gabriel Duarte
Linux User #471185
Rio de Janeiro / RJ
http://genericdev.wordpress.com/

--
You received this message because you are subscribed to the Google Groups "Mizar32" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
You received this message because you are subscribed to the Google Groups "Mizar32" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Gabriel Duarte
Linux User #471185
Rio de Janeiro / RJ
http://genericdev.wordpress.com/

_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
Tony-12 Tony-12
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: DS18B20 with eLua + Mizar32

Maxim has a lot of information on 1-wire. 
Bit-banging is probably the default choice. 
Maxim does sell RS232 to 1-wire (DS9097U) and USB to 1-wire adapters; the DS9097U is about USD30 at Digikey.
Another choice is to use a dedicated 1-wire master such as the DS2482S-100 (I2C to 1-wire bus master; 8-pin SOIC; <USD2 at Digikey).

--Tony


On Tue, May 21, 2013 at 11:18 AM, Gabriel Duarte <[hidden email]> wrote:
Ok!

I thought that 1-Wire were only the protocol. Should I use UART from GPIO in Miza32 to emulate? I have seen some Arduino examples and they use PWM ports to read data, do not know if it's the same in eLua.


2013/5/21 Bogdan Marinescu <[hidden email]>
Hi,


On Tue, May 21, 2013 at 9:05 PM, Gabriel Duarte <[hidden email]> wrote:
Hi!

The question is just how to send and get data, , what interface I have to use to send and receive data from the sensor. The rest, like decoding data, CRC, I'll implement myself.

And that is exactly what I was telling you. The interface is called 1-Wire, check the wikipedia link from my previous e-mail. Some MCUs have 1-Wire implemented in hardware, but only very few of them, so your best shot is to emulate it with a GPIO pin. I did this once and from what I remember it was quite an easy job.

Best,
Bogdan
 

Cheers


2013/5/21 Bogdan Marinescu <[hidden email]>
Hi,


On Tue, May 21, 2013 at 8:52 PM, Gabriel Duarte <[hidden email]> wrote:
Hello,

I recently bought a DS18B20 temperature sensor, but I got no idea how to connect it to Mizar32 and grab data from eLua. This is the datasheet:

http://datasheets.maximintegrated.com/en/ds/DS18B20.pdf

Which interface I have to use, UART, some PWM pin??

Any help is appreciated ;)

Neither, you'd have to use 1-Wire (https://en.wikipedia.org/wiki/1-Wire). We don't have support in eLua  for that yet, although it should be relatively easy to implement.

Best,
Bogdan


Cheers

--
Gabriel Duarte
Linux User #471185
Rio de Janeiro / RJ
http://genericdev.wordpress.com/

--
You received this message because you are subscribed to the Google Groups "Mizar32" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
You received this message because you are subscribed to the Google Groups "Mizar32" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Gabriel Duarte
Linux User #471185
Rio de Janeiro / RJ
http://genericdev.wordpress.com/

--
You received this message because you are subscribed to the Google Groups "Mizar32" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
You received this message because you are subscribed to the Google Groups "Mizar32" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Gabriel Duarte
Linux User #471185
Rio de Janeiro / RJ
http://genericdev.wordpress.com/

_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev


_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
hrh1818 hrh1818
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: DS18B20 with eLua + Mizar32

In reply to this post by gduarte
On 5/21/2013 1:05 PM, Gabriel Duarte wrote:
Hi!

The question is just how to send and get data, , what interface I have to use to send and receive data from the sensor. The rest, like decoding data, CRC, I'll implement myself.

Cheers


Most people use a GPIO pin to connect to a One Wire device.
An alternate approach is to use a RS232 interface as shown in the following link to connect to One Wire devices.
<http://www.instructables.com/id/1-wire-communication-interface/>

Here is a One Wire overview.
<http://www.maximintegrated.com/app-notes/index.mvp/id/1796>
I strongly recommend you read the first two paragraphs.

Howard




2013/5/21 Bogdan Marinescu <[hidden email]>
Hi,


On Tue, May 21, 2013 at 8:52 PM, Gabriel Duarte <[hidden email]> wrote:
Hello,

I recently bought a DS18B20 temperature sensor, but I got no idea how to connect it to Mizar32 and grab data from eLua. This is the datasheet:

http://datasheets.maximintegrated.com/en/ds/DS18B20.pdf

Which interface I have to use, UART, some PWM pin??

Any help is appreciated ;)

Neither, you'd have to use 1-Wire (https://en.wikipedia.org/wiki/1-Wire). We don't have support in eLua  for that yet, although it should be relatively easy to implement.

Best,
Bogdan


Cheers

--
Gabriel Duarte
Linux User #471185
Rio de Janeiro / RJ
http://genericdev.wordpress.com/
--
You received this message because you are subscribed to the Google Groups "Mizar32" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
You received this message because you are subscribed to the Google Groups "Mizar32" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Gabriel Duarte
Linux User #471185
Rio de Janeiro / RJ
http://genericdev.wordpress.com/


_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev


_______________________________________________
eLua-dev mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/elua-dev
Loading...