Difference between revisions of "PCF8591"

From Let's Control It
Jump to navigation Jump to search
(Nieuwe pagina aangemaakt met '== Toepassing == De ESP is in staat om extra analog ingangen uit te lezen via een I2C AD Converter chip van het type PCF8591. Hieronder vind je een beschrijving hoe...')
 
 
(11 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Toepassing ==
+
= Introduction =
De ESP is in staat om extra analog ingangen uit te lezen via een I2C AD Converter chip van het type PCF8591. Hieronder vind je een beschrijving hoe je dit kunt realiseren.
+
The ESP-01 module has no analog input. Only boards like the ESP-07 and ESP-12 break out the single ADC (TOUT) pin on the ESP chip. But we can provide all ESP modules with 4 analog inputs using the PCF8591 I2C ADC chip.
  
== Funktionele beschrijving ==
+
= Hardware =
De PCF8591 is een chip die 4 extra analoge ingangen toevoegt aan de ESP. De communicatie verloopt via de I2C bus. Deze kan via een levelshifter worden aangesloten op de I2C aansluiting van de ESP. Er kunnen maximaal 8 chips worden aangesloten op 1 I2C bus, dus maximaal 32 extra ingangen
+
[[File:PCF8591Module.jpg|320px]]
 +
[[File:PCF8591.jpg|320px]]
  
== Hardware ==
+
The PCF8591 can be bought on eBay as a bare chip or a plug and play module.
De PCF8591 is o.a. te koop bij diverse webshops en is goed verkrijgbaar. Er zijn ook kant en klare modules te verkrijgen met deze chip erop.
 
  
----
+
= Software =
[[Bestand:PCF8591Module.jpg|320px]]
 
[[Bestand:PCF8591.jpg|320px]]
 
----
 
  
== syntax ==
+
== Custom Sketch ==
Het commando kan worden gebruikt vanaf de command-line of vanuit de eventlist. Het commando kan als volgt worden opgegeven:
+
 
 +
== ESP Easy ==
 +
Use the device tab on the ESP Easy webinterface and create a new task by editing one of the available tasks. Select "PCF8591 Analog input" from the dropdown box.
 +
 
 +
[[File:EasyConfigPCFA.png]]
 +
 
 +
Enter the IDX found in the Domoticz device page. Also select the port on the PCF8591 that you want to read (Numbered 0 - 3). That should be all.
 +
 
 +
=== Optional settings ===
 +
 
 +
[[ EasyFormula | Use of formulas]]
 +
 
 +
[[ EasyValueNames | Use of value names]]
 +
 
 +
== ESP Connexio ==
 +
Command:
 
  ''<nowiki>ExtWiredAnalog <poort>, <Variabele></nowiki>''
 
  ''<nowiki>ExtWiredAnalog <poort>, <Variabele></nowiki>''
  
Line 34: Line 46:
 
|}
 
|}
  
=== Voorbeeld ===
+
=== Sample ===
 
  ExtWiredAnalog 1,3
 
  ExtWiredAnalog 1,3
 
Hiermee wordt de analoge meetwaarde van poort 1 ingelezen in variabele 3
 

Latest revision as of 12:22, 4 October 2015

Introduction

The ESP-01 module has no analog input. Only boards like the ESP-07 and ESP-12 break out the single ADC (TOUT) pin on the ESP chip. But we can provide all ESP modules with 4 analog inputs using the PCF8591 I2C ADC chip.

Hardware

PCF8591Module.jpg PCF8591.jpg

The PCF8591 can be bought on eBay as a bare chip or a plug and play module.

Software

Custom Sketch

ESP Easy

Use the device tab on the ESP Easy webinterface and create a new task by editing one of the available tasks. Select "PCF8591 Analog input" from the dropdown box.

EasyConfigPCFA.png

Enter the IDX found in the Domoticz device page. Also select the port on the PCF8591 that you want to read (Numbered 0 - 3). That should be all.

Optional settings

Use of formulas

Use of value names

ESP Connexio

Command:

ExtWiredAnalog <poort>, <Variabele>
Parameter: Beschrijving: Bereik: Opmerking:
Poort 1 t/m 32
Variabele 1 t/m 15

Sample

ExtWiredAnalog 1,3