Hacking the MV1

@Drew @Peter
DISCLAIMER:
I don’t work for MARSFfarm, so this is not a recommended procedure, and will probably void all warranties, and may lead to magical blue smoke.

I have been running a ‘breadboard’ version of the MV1 to test code and new sensors. It has most of the MV1 code, but blinks LEDs on the breadboard instead of actually actuating pumps and heaters (and has no plants!). In addition I use it to test new sensors.
I wanted to move some of this to the actual MV1, and make a few changes to the camera (for OpenCV purposes), but have felt limited by the Raspberry Pi W (too slow for a full GUI and development). So a while back I pulled the W and plugged a ribbon cable from the MV1 to a Raspberry Pi 3B. After moving over the SD card, it booted up and worked as if nothing had changed. I temporarily hooked up a keyboard and monitor, and turned on the setting for VNC (so I could access the Pi via my laptop).
The next step was to get ahold of the GPIO pins for adding I2C sensors. For this got GPIO expansion pins, that allowed me to add a second ribbon cable (attached to a breadboard).
With some changes to the LogSensors.py file, I now have additional BMP280, BME60 and SCD40 sensors for temperature, humidity, barometric pressure and CO2. My charts now show sensor comparisons!
The photo shows the Raspberry Pi precariously sitting on top of the MV1, with two ribbon cables coming off of it, and the breadboard hanging in the box.

1 Like

To be clear, we gave you MV1-HQ1, which doesn’t even have a serial plate - it never had a warranty lol.

@hmw would you please share a few more photos of the breadboard and the actual connections? Maybe a quick pencil sketch/diagram on paper? I’m a little confused about how you ‘breakout’ the wires into the breadboard in particular. Honestly, I tried to do this once and got mixed up with my wires and this use case (upgrading the microprocessor on an MV1) isn’t unheard of @Surendra @cregini with customers.

If I’m not mistaken, the origin

This would also be cool to talk more about - you’re essentially creating a ‘trainer’ or a ‘testing’ unit for learning about the MV1. A much smaller scale of these products used for teaching HVAC technicians/electricians:


image

@Peter
This is my breadboard version of the MV1. Most projects start out as breadboard projects, for the ease of making changes. Below is a picture of my breadboard, with a ribbon cable running from the Raspberry Pi to the breadboard “T” adapter. A lot of these adapters come labeled with the use of the GPIO.
Fans and heater are substituted with LEDs, and the light panel is substituted with a RGB LED and a white LED. All GPIO pins remain the same, and there is no need to change the code, as the LEDs can work off of straight 3V, or via the PWM (light panel), though there is no need for the power supply. Wires get a little messy, but this is an economic way to test code and sensors, without the expense of the full box. I use this setup for testing cameras and new sensors.

Here are some more details about my Raspberry Pi 3B breakout on the MV1. This approach is to minimize the physical and program changed needed for the MV1.
Initially I just wanted to have a Pi B+ instead of the Zero (something with more power to support VNC and the full desktop). With just one ribbon cable, this was basically just a brain transplant.
For the breadboard, I needed a second cable. This second cable works like any other breadboard project.

There is a nice connector that makes this double cabling easy.


The top cable goes to the MV1, the one off the side

One cable goes off to a breadboard, the other simply connects to the MV1 where the Raspberry Pi Zero was plugged (all Raspberry Pis have the same 40 GPIO pin arrangement).

The only caution is to make sure the orientation of the cables matches - this is best checked with a multi-meter (check for the 3V output pins). The orientation is fairly intuitive if you have any experience with breadboard projects with a Pi.

At this point you can ignore the MV1, as everything works the same as when the Zero was directly connected. Be sure to work with the config.py file, as it defines the MV1 use of pins. Since I am only adding I2C sensors, I can simply use the pre-defined pins, but access them via the breadboard (the all trace back to the same pin on the Pi). Since I2C sensors are separately addressed, they can be wired together, either in serial or in parallel. Any GPIO not defined in config.py is available to be used for new projects. I would suggest documenting any new pins in the config.py file, noting them as custom additions.
The cables are strong enough that I just threaded the cable between the wall and the top (after temporarily removing a corner screw), and let the breadboard hang in the box.


In this case I have three sensors: SCD40 CO2 sensor, BMP280 (temp, humidity, pressure) and a BME680 (temp, humidity, pressure, gas).
One side of the breadboard supplies 3V power, the other 5V power. The SCD40 works best off of 5V.
I added the new sensor files to the python directory, and added some new functions in LogSensors.py to call these sensor functions.

@hmw We had hacked the old GBE units a while back. It began with needing more reliable watering capabilities and then took on a life of its own from there. It runs on a Pi 4, soon to be 5, and we have laser cut the walls to custom mount sensors we wanted to incorporate. I now have a fleet of about six that I use as training modules for students to learn how to wire and program their environments. I’ve written my own library for the purpose of abstracting the nuances of working with each sensor. Here are some pictures of the units along with some documentation about the sensors we like to use. Getting to a point where the MV1 could incorporate a bring your own sensor type feel would be really neat!

Sensor Documentation

That is definitely modified!!