Please note, this post is not meant to be defamatory to Vera as I know a lot of people love the system, but rather a post to show my own experiences and outcomes. So I made the decision to look at other z-wave controllers, and after reading various reviews I’ve now tried quite a few and have opinions on them all. I grew annoyed at a number of serious limitations with Vera (Fibaro sensors stopping working for no reason, SRT321 heating control issues) and the support levels on what is a ‘production’ environment, even though it is only used at home. OpenSprinkler Pi v1.2 is immediately available for purchase at Rayshobby Shop, at the same old price.I’ve been using Vera for around 2 year, firstly on a Lite then an Edge - starting on UI5 and ‘upgrading’ to UI7 with around 15 zwave devices. When I get time I will write a more complete tutorial. There are also WiringPi and Python code examples which can do the same. The above use shell commands as an example to interface with the chip. Since the chip is powered by 3.3V supply, that will translate to an analog output from 0V to 3.3V linearly. You can change it to any value between 0x00 to 0xff to enable 256 grades of values. Where 0xff is the 8-bit analog output value. To enable analog output, use the i2cset command. To change to channel 1 instead, runĪnd then if you run sudo i2cget -y 1 0x48 that will return sampled value of channel 1, and so on. Repeatedly to sample the analog value from channel 0 (pin A0). Next, you can use the i2cget command to read analog values from a particular channel. This shows it has detected two I2C devices, one is at address 0圆8 (that’s the DS1307 RTC), and one 0x48 (this is PCF8591T). You should then see a printout like the following. 1 you should run sudo i2cdetect 0 instead). Here is a short tutorial to get you started.įirst, run sudo i2cdetect 1 to check if the PCF8591T chip is detected. If you are confused and just want a quick demo. Python code to read ADC value from PCF8591.In particular, I found the following posts very useful: Suppose this gets you interested, the next question is how to program RPi to talk to the ADC chip? Fortunately there are plenty of tutorials online. The picture on the left below is an example of plugging in a MCP9700 temperature sensor directly to the pinouts and the picture on the right below shows an LED (with current limiting resistor) plugged into the analog output channel, to allow programmable control of the LED brightness. The chip, together with analog pinouts, are located on the right-hand side of the board:įor convenience, I’ve also provided a separate pair of VCC and GND pinouts for each analog channel. But I figured that 8-bit is sufficient in many cases, so I settled with this choice. A lot of the other chips provide at least 10 bits of precision. This means the analog input value is on a resolution of 0 to 255, same with analog output. The main downside is that it’s only 8-bit. Also, it uses I2C interface, so it doesn’t require any extra GPIO pins from RPi. According to the datasheet, the analog output is implemented with resistor divider chain, which is sometimes a better choice than PWM. This means you can use one chip to interface with 4 different analog sensors, and additionally you can get one channel of analog output. Second, it provides four independent A/D channels, and one D/A channel. First, it’s low-cost: volume pricing is just a couple of dollars per piece. Why did I pick PCF8591T? There are several reasons. If you Google ‘RPi ADC’ you will find plenty of choices of ADC modules and tutorials on how to get them to work with RPi. Here are two pictures of the OSPi v1.2 board: Other than this, the rest of the circuit is pretty much the same as before, with 24V AC to 5V DC switching regulator (based on LM2596S), DS1307 RTC and backup battery, 74HC595 shift register and triacs. This makes it more convenient for your prototyping need. The addition of the PCF8591T chip allows OSPi to provide on-board analog inputs as well as output. In order to interface with analog sensors (such as soil moisture sensor, light sensor etc.), you would need an ADC unit. The reason this has been added is that Raspberry Pi (RPi)’s GPIO pins do not have built-in ADC capability. The main change compared to version 1.1 is the addition of a PCF8591T 8-bit A/D D/A converter, which provides four independent 8-bit analog input pins, and one 8-bit analog output pin. Since its original release, OSPi has become a very popular product. Hi, this is a new product post for OpenSprinkler Pi (OSPi) v1.2.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |