Skip to content

solarpunklab/coxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logo






ABOUT CoXY

CoXY is a project by TeZ of SOLARPUNK LAB / HACKTERIA aimed at designing and experimenting a combined hardware and software platform that can function as a test bed for sensors' data monitoring/visualization and automation control, including motors, lights, switches and/or anything that can be driven by transistors.



The concept arose from the collaborative efforts of Marc Dusseiller Dusjagr and Fernando Castro, both affiliated with HACKTERIA. Their inspiration stemmed from their involvement in the GOSH Open Hardware project, where they jointly explored the design and creation of a DIY platform for Soil Respiration Chamber(SRC). See Hackteria Wiki for an extended overview and documentation.



TeZ and Marc reconstructed a SRC prototype at Solarpunk Lab headquarters in Amsterdam. Subsequently, TeZ embarked on experimenting with an expanded version, aiming to incorporate local sensor data monitoring via WiFi/websockets technology and mechanical parts control using motors.




TeZ designed a printed circuit board (PCB) capable of seamlessly daisy-chaining up to five I2C devices. Additionally, it enables control over 8 channels of analog electrical signals via a transistor array IC. This is ideal to easily control the 2 coils of a 28byj-48 stepper motor with 4 channels. The PCB also features breakout options for additional ESP32 I/O pins and voltage supply.

This first version of the PCB is paired with a browser-based (hence cross-platform) software application, highly customizable and flexible.





Logo


CoXY HARDWARE


first working proto board

CoXY's test bed consists of a Lolin S2 mini ESP32 board expander that can directly interface to a ULN2803 darlington trasistor array and to the I2C bus with five onboard channels. More S2 i/o pins are exposed to connect other analog or one-wire sensors and actuators.

While the CoXY board was designed to reproduce a setup for Soil Respiration Chamber(s), this circuit can facilitate all kind of projects that make use of up to five I2C peripherals and up to 8 low power transistor controlled devices. The adoption of Lolin S2 Mini ESP32 board is very advantageous for the minimal size of this microcontroller, its power, the many number of i/o pins and the very convenient price too.



PARTS

The test bed of choice for CoXY comprises:
  • Lolin S2 mini ESP32
  • ULN2803 transistor array IC
  • 28BYJ-48 stepper motor
  • SENSIRION SCD41 - I2C Carbon Dioxide, temperature and humidity sensor
  • BME680 - I2C temperature, humidity, pressure and gas sensor
  • DALLAS DS18b20 "one-wire" Temperature sensor
  • SSD1306 - 128x64 - I2C OLED display

All parts are "optional" and can be excluded from the setup by simply commenting the #define statements in the main.cpp code.

The UROS breakout board was kindly provided by Marc to support the development of this project and it features also an optional connection to a NEOPIXEL rgb led unit.

Below all images and links to source the individual parts.

LOLIN S2 Mini ESP32


ULN2803 - Bipolar (BJT) Transistor Array 8 NPN Darlington 50V 500mA



28BYJ-48 5V stepper motor



SCD41 I2C Carbon Dioxide, Temperature And Humidity sensor



first SCD41 UROS breakout



new SCD41 CO2Y breakout
designed by TeZ and Marc in 2024


BME680 Digital Temperature, Humidity, Pressure, Gas Sensor



DALLAS DS18b20 "one-wire" Temperature sensor



SSD1306 - 128x64 - I2C OLED display



CoXY BOARD is a PCB designed by TeZ and currently in testing phase. More details and photos will be published soon.





















Logo

CoXY SOFTWARE

The CoXY KONTROL software is a web app served by the ESP32 developed as a combined Arduino C++, HTML5, Javascript, CSS and JSON code base. This browser-based app can therefore run on any device.


CoXY KONTROL dashboard

In order to simplify the simultaneous coding with different languages and many Arduino and Javascript libraries, VS-CODE / Platform IO was chosen as development environment. This way all the code base can be easily copied, edited and transferred at once without the need of re-configuration.


VS-CODE environment


Make sure you have PLATTFORMIO extension installed in your VS-CODE editor.

All files of this app are served (or created and stored in real-time) directly from the SPIFFS internal memory of the ESP32. That includes the main index.html page, the javascript code and libraries, css and json codes, images and fonts assets.



In this application the SPIFFS files occupy about 1/3 ot the total available memory.



The esp32 sketch files "main.cpp" and "NETWORK.h" must be uploaded clicking on the arrow icon on the top right of VS-CODE window.



Once SPIFFS and sketch files are uploaded to the ESP32, and the board has connected to a local WiFi network (or it has created its own "COXY-NET" access point) we can point our browser to the URL http://coxy.local



By clicking on the S icon or hitting the 's' key the SPIFFS memory popup will open to show that status of the spiffs internal memory and the currently stored and served files.



A reading is taken every 30 seconds from all sensors at once with a timeout callback. A progress bar shows the countdown at each reading cycle.



Data visualization is done via javascript on span elements for all sensors, except the SCD41's Co2 level, Temperature and Humidity that are shown via highcharts javascript library featuring interactive data display.







A data log file with all the readings for the SCD41 is progressively saved in datalog.json file in the SPIFFS until the remaining inernal memory reaches a safety limit of 20kb. The json file can be downloaded locally by clicking on the datalog button.




Logo

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published