berne
Junior Member
Posts: 85
|
Post by berne on Oct 14, 2021 12:54:00 GMT -8
Hi Doc, Please see attachment re a CO2 sensor I am adding to the AQI compartment. Do you have any plans for the pins shown? pin2 (5V), 6 (gnd), 8(TXD), 10(RXD)? If so, could you recommend other pins to use? Also could you provide the mappings for the grove connectors to the RPi pins? (I may use a grove connector for the CO2 sensor.) Thx, Berne
|
|
|
Post by SDL on Oct 15, 2021 9:41:52 GMT -8
|
|
berne
Junior Member
Posts: 85
|
Post by berne on Oct 16, 2021 8:37:04 GMT -8
If you look at the python code, you'll see I need to know which pins map to the grove ports to adjust the code to pick up the data. Also its obvious from the documentation that 5V is required. A map of the grove port mapping to the RPi GPIO would be immensely helpful to all who want to customize the system.
If I go direct to Pins pin2 (5V), 6 (gnd), 8(TXD), 10(RXD) does that conflict with anything now or future? (I have already soldered in the wires to do this.) The python code is setup to read from these pins.
|
|
|
Post by SDL on Oct 16, 2021 9:24:46 GMT -8
5V. Ah, I missed it in the diagram. Good catch. You should be fine. BTW, It bothers me a little that it has 5V as a power supply, but is talking to a 3V input on the Pi. But, I assume they knew that when they built the diagram. At this point, we have nothing on the schedule that requires the serial port. IF we do, then you could switch your device to another set of I/O pins and then use a software serial UART. That would work fine at 9600 baud. Looks like you have the pins right. Are you talking about the SkyWeather2 Board? All the GPIO port numbers are next to the Grove plugs. BP
|
|
berne
Junior Member
Posts: 85
|
Post by berne on Oct 18, 2021 9:29:03 GMT -8
OK thanks. I will be moving the board over to the ShyWeather2 RPi from my test bed RPi soon. Have to of course integrate the python code with your code, which should be fun!
|
|
berne
Junior Member
Posts: 85
|
Post by berne on Oct 20, 2021 8:03:33 GMT -8
I have moved the CO2 sensor over to the SkyWeather2 RPi using the pin connections in the document I attached upthread. Everything seems to be working correctly, getting CO2 readings from the S8.py program. Now I just have to integrate that program with the SQL database and the rest of the software!
|
|
|
Post by SDL on Oct 20, 2021 14:17:56 GMT -8
Show us some pictures and reading from the unit. And please post the link for where you bought the sensor. This sounds like a great addition.
BP
|
|
berne
Junior Member
Posts: 85
|
Post by berne on Oct 21, 2021 6:36:07 GMT -8
The unit is the S8 sensor ($85 plus shipping) which can be seen at www.co2meter.com/collections/0-1-co2 . Users will have to solder four leads to the device. They supply RPi python code for the device, which is shown in the screen shot next to outdoor readings from my SkyWeather2 Sky Cam outdoor assembly. The S8 fits next to the laser AQI in the external AQI compartment, with the leads going through and attaching to the GPIO.
|
|
berne
Junior Member
Posts: 85
|
Post by berne on Oct 30, 2021 8:34:09 GMT -8
Note, the S8.py code works fine in Geany, but is python 2 based. To get it to work with Thonny and python 3 you'll have to enclose all print items in (). Also remove the ord part of the commands when it retrieves the high and low bytes. I have software now reading CO2 and writing it to a CSV file. Have added a CO2 reading table to the SkyWeather2 database, but have yet to add the code to allow it to write directly to the SkyWeather2 Database. (Will be using pclogger code as template to do that.) Not sure whether I will bother to integrate with the SkyWeather2 code beyond that, probably will just run my CO2 reading python code as separate process, started on boot in rc.local.
|
|
markg
New Member
Posts: 13
Raspberry Pi: Yes
|
Post by markg on Jan 4, 2022 14:00:36 GMT -8
Hello, first post. Thanks in advance.
I am looking for a list of the unused SkyWeather2 Sensor Hat GPIO pins, such that I can experiment with the remaining pins.
Additionally is there a map between of the Hat Grove Connector Pin's and the corresponding Raspberry Pi GPIO header pins?
|
|
|
Post by SDL on Jan 4, 2022 14:19:52 GMT -8
Mark,
SkyWeather2 Hat uses these pins:
GPIO - Function GPIO04 (Grove Connector) GPIO05 (Grove Connector) GPIO06 (Grove Connector) GPIO12 (Grove Connector - controls power to VDD on dust connector Grove Connector) SDA SCL GPIO13 (to pin header - not used) - but is pulled up to 3.3V GPIO19( to pin header - not used) - but is pulled up to 3.3V GPIO20 (to dust sensor Grove Connector) GPIO21 (to dust sensor Grove Connector) TXD RXD
BP
|
|
markg
New Member
Posts: 13
Raspberry Pi: Yes
|
Post by markg on Jan 4, 2022 14:33:03 GMT -8
Thank you Moderator for you quick post/reply!
|
|