ANAVI Gardening uHAT is now OSHWA certified

A few days ago we received an official confirmation that ANAVI Gardening uHAT has been certified as open source hardware by the Open Source Hardware Association with UID BG000079.

The Open Source Hardware Association (OSHWA) is a non-profit organization that supports the open source movement and maintains an open source hardware certification registry. OSHWA Certification provides an easy and straight-forward way to quickly check if a product complies with a uniform and well-defined standard for open source hardware.

Open source hardware certification guarantees the sharing of knowledge and keeps prices fairly based on the bill of materials of the hardware’s components. ANAVI Gardening uHAT hardware design files are available under CC BY-SA 4.0, which allows you to remix, transform, and build upon the material for any purpose, even commercially.

In a nutshell, OSHWA certifies a project as open source based on public access to four elements:

  • Hardware – functional elements of the product
  • Software – code, firmware, or other software involved in the product’s functionality
  • Documentation – including design files, schematics, and instructions
  • Branding – brand names, product names, logos, and product design

The exact certified version of each product receives a unique UID, for example, ANAVI Gardening uHAT is with UID BG000079. The prefix is the country code. We make our open source hardware in Plovdiv, Bulgaria, so the country code is BG. The suffix is a sequential ID number. At the moment, there are 79 certified open source hardware products from Bulgaria. For a comparison, the United States is leading with the amazing 2052 certified products, followed by Germany with 116. Bulgaria comes in at the third place, primarily thanks to our awesome open source neighbors from Olimex.

As a very small company we are all proud to have contributed to the Bulgarian success in this field. Hopefully, the popularity of the open source hardware movement will continue to increase worldwide.

ANAVI Gardening uHAT

ANAVI Gardening uHAT is a low-cost, open source Raspberry Pi add-on board that helps you develop smart solutions for monitoring and growing plants.

ANAVI Gardening uHAT supports multiple sensors for soil moisture, temperature, humidity, barometric pressure, and light. Getting started is easy: just plug it into a Raspberry Pi with your bare hands and follow the instructions in the user manual. No soldering is necessary, and no tools are required.

We hope you’ll jump in and help us bring this entirely open source gardening project to life by supporting our new crowdfunding campaign at Crowd Supply.

ANAVI Macro Pad 2 Developer Kit Assembly Guide

ANAVI Macro Pad is an open source, programmable two-key mechanical keyboard with backlighting. It was funded through a crowdfunding campaign at Crowd Supply.

ANAVI Macro Pad 2 Developer Kit does not require soldering. The assembly is easy, please take a look at the assembly video above for details. Although you can complete assembly with your bare hands, you might find a screwdriver and tweezers helpful.

ANAVI Macro Pad 2 Developer Kit includes a fully-soldered gold-plated green printed circuit board with two Gateron red mechanical switches, red 3 mm LEDs, an acrylic enclosure in two parts, two translucent keycaps, M2.5 screws, washers, and nuts, and awesome stickers!

To assemble ANAVI Macro Pad 2 follow these steps as shown in the video:

  • Peel off the protective films from both sides of the acrylic enclosure parts.
  • Assemble the top acrylic enclosure using two longer screws. It is not symmetric, so please pay attention to the position of capacitor C1.
  • Assemble the bottom acrylic enclosure using six nuts, three washers, and the shorter screw which is for the mounting hole between the two mechanical switches.
  • Stick the eight silicon protective pads onto the bottom: add two of them on top of each other to all four corners of the bottom acrylic plate.
  • Optionally, add stickers to the translucent keycaps.
  • Press the translucent keycaps onto the mechanical switches.

Finally, gently plug in a USB to microUSB cable and connect the ANAVI Macro Pad 2 to a personal computer. Please be careful with the microUSB connector, because harsh bending of the USB cable may damage it.

More details are available in chapter 2 of the user’s manual. As an open source project, we always welcome contributions and, if you like, you can help up improve the documentation by submitting a GitHub pull request or providing us with feedback over email. Thanks again for supporting this entirely open source project!

ANAVI Macro Pad 2 Fasteners

Good news: recently we received all required screws, nuts and washers for ANAVI Macro Pad 2. Each kit will include:

  • M2.5 8mm screw
  • 2 x M2.5 12mm screws
  • 8 x M2.5 nuts
  • 3 washers

All of these fasteners are required for the assembly of the printed circuit board to the acrylic enclosure.

In the meantime, the Crowd Supply team has arranged all the paperwork for ANAVI Macro Pad 2 shipment following the crowdfunding campaign. We have already flashed the firmware and tested the majority of the boards. The plan is to package all units and ship them to Crowd Supply’s warehouse in 2-3 weeks. We will keep you updated. Thank you again for supporting ANAVI Macro Pad 2!

How OpenSCAD Helped ANAVI Macro Pad 2?

A week ago we received the acrylic enclosures for ANAVI Macro Pad 2. We contracted a trusted local company in a near-by town in Bulgaria to make them using laser cutting of 2 mm transparent clear acrylic sheets. There are blue protective films on both sides of each acrylic enclosure which you will need to remove when you receive your ANAVI Macro Pad 2 kit.

ANAVI Macro Pad 2 acrylic enclosures with blue protective films on both sides

The design of the acrylic enclosures has been done with the popular open source software OpenSCAD. It is a simple and lightweight application that runs on MS Windows, MacOS and Linux. I am using it on Ubuntu. OpenSCAD is a script-only based modeller that uses its own description language to create solid 3D CAD objects. The .scad files for ANAVI Macro Pad 2 are available in GitHub. OpenSCAD supports exporting to various different file formats, including svg and pdf.

The acrylic enclosures were designed using a script in OpenSCAD

Before the launch of the crowdfunding campaign at Crowd Supply we experimented with several different designs but finally settled on a very simple design with is easy to manufacture. Furthermore, if in future you need a spare part and have a 3D printed, you can also export stl file from OpenSCAD and print it. By the way, there is a line in the source code that you need to uncomment to covert the enclosure parts from 2D to 3D for 3D printing. The OpenSCAD files and schematics for the acrylic enclosures of ANAVI Macro Pad 2 are available in GitHub.

Add Capacitive Soil Moisture Sensors to Raspberry Pi

Raspberry Pi is a famous series of small single-board computers (SBCs) developed in the United Kingdom by the Raspberry Pi Foundation in cooperation with Broadcom. This is a step by step tutorial for using Raspberry Pi and capacitive soil moisture sensor with Microchip MCP3002 analog-to-digital converter (ADC) and a Python script for detecting the soil moisture in percentage.

Capacitive Soil Moisture Sensor

Capacitive Soil Moisture Sensor v1.2 and v2.0 measures the volumetric content of water inside the soil and retrieves the moisture level by capacitive sensing rather than resistive sensing like other sensors. The benefit of using a capacitive soil moisture sensor is the lack of corrosion and longer lifespan.

Wiring

Unlike Raspberry Pi Pico, the recently released microcontroller, all versions and models of the Raspberry Pi single-board computers do not include an analog-to-digital converter (ADC). This tutorial explains how to use Microchip MCP3002 with Raspberry Pi.

Microchip MCP3002 is a 10-bit resolution, dual channel ADC with SPI hardware bus. It can be connected to any Raspberry Pi single board computer version and model, including Raspberry Pi 4 and Raspberry Pi 0. However, this tutorial is not for Raspberry Pi Pico microcontroller. For more details about the wiring of Microchip MCP3002 a Raspberry Pi single-board computer have a look at my previous tutorial.

Prototypes for Raspberry Pi add-on boards

Alternatively, the easier option without a breadboard an a bunch of cables, is to use a dedicated Raspberry Pi add-on board with built-in ADC. Using the free and open source tool KiCad we designed ANAVI Gardening uHAT exactly for this purpose. It has dedicated pins for connecting a couple of capacitive soil moisture sensors. The prototype has been created thanks to PCBWay. This is a lead-free prototype printed circuit board with 2 layers, green solder mask and white silkscreen. PCBway offers a huge variety of colors and even flexible PCB.

Software

Flash Raspberry Pi OS, the official Debian based GNU Linux distribution by the Raspberry Pi, on microSD card and boot it. On the Raspberry Pi, open a terminal and using the raspi-config tool enable SPI as shown in the video. Reboot the Raspberry Pi.

Python3 script for reading data from a couple of capacitive soil moisture sensors through Microchip MCP3002 ADC is available at the anavi-examples repository in GitHub. The script relies on popular Python libraries spidev and RPi.GPIO. Open a terminal and run the following commands to clone anavi-examples and run the script:

git clone https://github.com/AnaviTechnology/anavi-examples.git
cd anavi-examples/anavi-gardening-uhat/soil-moistore-sensors/python/
python3 soil-moistore-sensors.py

ANAVI Macro Pad 2 Successful Crowdfunding

ANAVI Macro Pad 2 was successfully crowdfunded at Crowd Supply! Furthermore more all stretch goals were met! Thank you!

ANAVI Macro Pad 2 with all stickers which are part of the crowdfunding campaign stretch goals.

Having met the stretch goals means all kits will include 32 awesome transparent Emoji stickers. You can put them on any side of the translucent keycaps. It is entirely up to you to decide whether to use the stickers and on which keys to put them. This way you can customize your ANAVI Macro Pad 2 with its own unique look!

These transparent Emoji stickers feature icons from Font Awesome, available under CC BY 4.0 License in GitHub. Thank to our trusted local supplier in Plovdiv, Bulgaria they are printed on a glossy transparent foil and laser-cut in rectangular or square shapes, depending on the icon dimensions and proportions. We already have experience with the same stickers because they are also part of the ANAVI Macro Pad 8 kits.

In addition, ANAVI Macro Pad 2 includes logo stickers for ANAVI Technology and KiCad, the free and open source CAD software we used to design the printed circuit board for ANAVI Macro Pad 2.

Raspberry Pi & Microchip MCP3002 Analog-to-digital Converter (ADC)

If you are reading this blog post, I am sure you are familiar with Raspberry Pi, the a series of small single-board computers (SBCs) developed in the United Kingdom by the Raspberry Pi Foundation in cooperation with Broadcom. Unlike the recently released microcontroller Raspberry Pi Pico, all versions and models of the Raspberry Pi Linux computers do not include an analog-to-digital converter (ADC). If you need to read data from an analog device such as a potentiometer, sound or soil moisture sensor the solution is to use an external ADC, for example Microchip MCP3002.

Prototyping on a breadboard with Raspberry Pi 4, 10K potentiometer and Microchip MCP3002 ADC

Microchip MCP3002 ADC

Microchip MCP3002 is a 10-bit resolution dual channel ADC with SPI hardware interface for connecting to embedded devices such as Raspberry Pi. MCP3002 operates over a broad voltage range, from 2.7V to 5.5V. It is offered in 8-pin MSOP, PDIP, TSSOP and 150 mil SOIC packages. MCP3002 PDIP package is appropriate for prototyping on a breadboard.

Raspberry Pi and Microchip MCP3002 Wiring

Microchip MCP3002 has to be connected to the dedicated SPI pins (MISO, MOSI, SCL and SS) on the Raspberry Pi GPIO header. In the video a 10K potentiometer is connected to one of the two channels of the ADC for testing purposes. The potentiometer as well as Microchip MCP3002 are powered with 5V from the Raspberry Pi.

Microchip MCP3002 attached to Raspberry Pi 4 over SPI

Enable SPI

Boot Raspberry Pi OS, the official Debian based GNU Linux distribution by the Raspberry Pi, from a microSD card. Open a terminal and using the raspi-config tool enable SPI as shown in the video. After that reboot the Raspberry Pi and proceed to the next step.

Reading Data with Python

Python3 script for reading data from analog devices through MCP3002 is available at the rpi-examples repository in GitHub. The script relies on popular Python package RPi.GPIO. Open a terminal and run the following commands to clone rpi-example and run the script:

git clone https://github.com/leon-anavi/rpi-examples.git
cd rpi-examples/MCP3002/python
python3 adc.py

The potentiometer acts like a variable resistor. Rotate it and observe the output of the Python script. You will notice a change of the voltage between 0V and 5V depending on the position of the potentiometer.

ANAVI Garderning uHAT

Thanks to PCBway, the sponsor of this video, we can go to the next level and use a prototype of ANAVI Gardening uHAT as a Raspberry Pi add-on board with SOIC package of Microchip MCP3002. ANAVI Gardening uHAT follows the specifications of Raspberry Pi Foundation for HAT (hardware attached on top), including for an EEPROM with device-tree binary overlay configurations.

Prototypes of the new Raspberry Pi add-on board with Microchip MCP3002 ADC from PCBWay


ANAVI Macro Pad 2 – a Tiny 2% Mechanical Keyboard

ANAVI Macro Pad 2

Meet ANAVI Macro Pad 2! It is an open source, programmable two-key mechanical keypad with backlighting. Each of the keys on ANAVI Macro Pad 2 can be reprogrammed for use as a macro or even as a dedicated shortcut key, making it perfect for a number of applications across various industries.

ANAVI Macro Pad 2

ANAVI Macro Pad 2 runs on a Microchip ATtiny85, which is a reliable, low-cost, 8-bit AVR RISC-based microcontroller. It has a gold-plated printed circuit board, Gateron red mechanical switches, 3mm red LEDs and translucent keycaps.

Gateron red mechanical switches with 3mm LEDs on ANAVI Macro Pad 2

Only free and open source software tools like KiCad, OpenSCAD, and Inkscape were used to design ANAVI Macro Pad 2. Quantum Mechanical Keyboard (QMK) with V-USB is the default open source firmware. Source code and schematics are available on GitHub.

ANAVI Macro Pad 2 with stickers on the translucent keycaps of the mechanical switches

We kicked off a crowdfunding campaign for ANAVI Macro Pad 2 at Crowd Supply. We have a stable product and we are ready to proceed with low-volume manufacturing. We hope you help us bring this entirely open source project to life by ordering a developer or a maker kit!

Git Keymap for ANAVI Macro Pad 8

Out of the box ANAVI Macro Pad 8 comes with the popular open source Quantum Mechanical Keyboard (QMK) firmware. In a previous blog post we covered it in more details and we had a look at the existing keymaps.

Recently, we added a brand new keymap for ANAVI Macro Pad 8 for Git users. Git is a free and open source distributed version control system started by the famous Linus Torvalds, the creator of Linux kernel. Nowadays, there are many offerings of Git repositories as a service by GitHub, GitLab, Bitbucket, etc.

The Keys

The Git keymap for ANAVI Macro Pad 8 contains the following shortcuts for Git. On the first row from left to right:

  • git status
  • git log
  • git pull
  • git push

On the second row from left to right:

  • git diff
  • git add
  • git commit
  • FN key to switch to the 2nd layout and control lights
ANAVI Macro Pad 8
ANAVI Macro Pad 8

How It Works?

From technical point of view for developers this Git keymap demonstrates a couple of interesting features of QMK firmware:

  • Typing words with a single key press
  • Reducing the QMK firmware size

In order to send commands like git log by pressing a single key, the Git keymap follows the QMK guidelines for custom keycodes.This keymap uses enum to define data type in the C programming language for all new custom keycodes. After that through function process_record_user and using SEND_STRING the text is send if a specific key on the macro pad is pressed. Details are available at QMK documentation and as an example directly in GitHub.

Using SEND_STRING in the Git keymap increases the total firmware size. This is dangerous because Microchip ATmega32U4, the microcontroller on ANAVI Macro Pad 8, may not have enough free space for it. If the firmware exceeds the size limit any attempts to flash it will fail with a similar error message:

The firmware is too large! 28866/28672 (194 bytes over)

If you run in such a use case, the easiest way to reduce the size of QMK firmware in a keymap for ANAVI Macro Pad 8 is to cut some of the default RGB lighting animations and effects. For example, as in the Git keymap, you can create config.h file in the keymap directory that overwrites the main config.h with a reduced number of supported RGB lighting animations and effects:

#pragma once

#undef RGBLIGHT_ANIMATIONS
#define RGBLIGHT_EFFECT_BREATHING
#define RGBLIGHT_EFFECT_CHRISTMAS
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
#define RGBLIGHT_EFFECT_SNAKE

How to Flash It?

We have already covered in details how to install QMK firmware and how to flash a keymap from the command line in a previous blog post and in the user’s manual. Here is it in a nutshell for the Git keymap. Connect ANAVI Macro Pad 8 to a computer with USB to microUSB cable follow the steps below:

  • Execute the following command to compile QMK and the Git keymap for ANAVI Macro Pad 8:
qmk compile -kb anavi/macropad8 -km git
  • Execute the following command in a terminal to flash the git keymap:
qmk flash -kb anavi/macropad8 -km git
  • Press the RESET button on ANAVI Macro Pad 8 when asked:
Detecting USB port, reset your controller now.....
  • Wait until the firmware flashes successfully:
avrdude done.  Thank you.

ANAVI Macro Pad 8 is available at our distributors Crowd Supply and Mouser. We are constantly trying to improve this open source project and we are interested in finding more distributors around the world. If you have any questions please do not hesitate to contact us.