# Projects by Veselin Slavchev

## Balcony garden watering and monitoring

_April_2024 electronics garden

Some of my friends have a garden on their balcony. And I wanted one too, but was worried about watering it when I'm on vacation. Also wouldn't it be nice if it could work outside the house?

My requirements were:

- Water the plants when they need it
- Work without a power cable
- Allow monitoring online

Here's how I solved them:

Measure soil moisture with sensors.

- Use capacitive moisture sensors as opposed to the ones that have metal probes - they erode by electrolysis carrying molecules from one probe to the other. This contaminates the soil and affects precision.
- Use multiple sensors in different parts of the pot.
- Take multiple probes over a short time and average them to smooth out anomalies and improve precision.
- Calibrate a threshold below which I would water.

Pump water from a 10L container.

- Place a 5V water pump at the bottom of the tank.
- Buy a watering hose and drippers (10 drippers over 2 long pots).
- Place tank near and at the same height as the plants

Use a solar panel to charge a battery to power the system.

- Deep sleep the device for half an hour to preserve energy.
- Wake it up for 10-15 seconds to water, measure and post data. It spends most of its time sleeping.
- A small solar panel supplying 600mA at 5V charges the 650mAh (~3.7V) LiPo battery multiple times over the sunny part of the day.
- Use a esp32 chip instead of a whole board as the board's USB chip draws power even if the MCU sleeps. This dropped the power consumption tremendously during deep sleep: from 25mA to 350uA - less than 2% of the original.

Design a PCB for the esp32 chip.

- Regulate power from the battery to 3.3V to power the chip.
- Use a MOSFET to allow powering the pump directly from the battery.
- Break out pins to connect solar panel, pump, battery, sensors and additional sensors in the future.
- Allow PCB to be used with Arduino Mini for other projects.

Connect to the wifi and post a message that will save data in a DB.

1. Use the esp32 chip to connect to my wifi.
2. Post a message with all the data using MQTT to AWS IoT.
3. Process the message using a rule to store the data in DynamoDB (more on modelling data there in [single-table design in DynamoDB](https://vsslavchev.com/blog/single-table-design/)).

Put together a simple website to show data on a timeline.

1. When the website loads it makes a request to the API gateway that will call a Python lambda.
2. The lambda queries all recent events from DB and formats them in json.
3. Use a JS library to draw the graph/timeline.

Diagram of components: ![Schematic diagram of garden bot components](https://vsslavchev.com/img/garden-bot/garden-bot-schematic.png)

Blueprint of the PCB:

![PCB layout blueprint for the garden bot](https://vsslavchev.com/img/garden-bot/gardenbot-pcb.webp)
[Download PCB files](https://github.com/vs-slavchev/Small_projects/raw/refs/heads/master/garden-bot/garden-bot_gerber.zip)

Improvements for next year:

- measure water level in tank
- make more devices and tanks and refactor website to show their data
- add a camera to take pictures of the plants by posting them to S3 through a lambda

## Portable laptop cooling stand

_September_2021 DIY maker culture

Easy to fold and carry - 21mm thick, smaller than a 15" laptop, less than 600 grams.

On rechargeable batteries - not to drain the laptop battery, lasts 8 hours.

Elevates laptop screen at eye level for a healthy posture.

![Photo of the portable laptop cooling stand](https://vsslavchev.com/img/projects/laptop-stand-hex.jpg) [svg model](https://github.com/vs-slavchev/keyboard/tree/master/laptop_stand)

## sharpshooter ![Sharpshooter logo](https://vsslavchev.com/img/projects/sharpshooter/sharpshooter_logo.svg)

_April_2021 keyboard only terminal

Minimal file manager in the terminal.

Single-key hotkeys for an easy workflow.

Simple to configure and hack at.

![Screenshot of the Sharpshooter file manager](https://vsslavchev.com/img/projects/sharpshooter/screenshot.png)

Find it [on github](https://github.com/vs-slavchev/sharpshooter)

## Keyboard

_June_2019 DIY maker culture arduino bluetooth

A comfortable personalised keyboard.

Custom 3D models, simple understandable arduino firmware code, manageable wiring.

Later made wireless with an ESP32 over Bluetooth Low Energy, with keys that can be rebound from a [web app](https://keyboard.vsslavchev.com/) - [read how it works](https://vsslavchev.com/blog/diy-keyboard-ble-rebinding/).

The build is written up in parts: [planning it](https://vsslavchev.com/blog/diy-keyboard-planning/), [scanning the key matrix](https://vsslavchev.com/blog/diy-keyboard-key-matrix/) and [rebinding keys over BLE](https://vsslavchev.com/blog/diy-keyboard-ble-rebinding/).

![Photo of the finished custom keyboard](https://vsslavchev.com/img/projects/keyboard_finished.jpg) [3D models and code](https://github.com/vs-slavchev/keyboard)

## Der Robot3r

_December_2018 raspberry pi servos

A wooden robot that is an arm on tank tracks. The tracks were 3D printed and the wooden structure is made from glued sticks. A raspberry controls with Python the 4 servos of the arm and the 2 motors for the tracks.

![Photo of Der Robot3r wooden robot](https://vsslavchev.com/img/projects/roboter.jpg)

## Global epidemic simulation

_February_2017_-_July_2017 modelling

A simulation which allows you to design a disease and different medicine and apply both on the world. For each country there is information about its: healthcare system, population density, climates, transportation, connectedness. There are airplanes, boats and land transportation between countries. You can zoom and pan on the vector map and inspect each country and its current state.

Made together with:
[Kaloyan Ivanov](https://www.linkedin.com/in/kaloyan-ivanov-b314a5112/), [Yasen Georgiev](https://www.linkedin.com/in/yasen-georgiev-90395613b/), [Ivan Stoilchev](https://www.linkedin.com/in/ivan-stoilchev-448950181/)

Find it [on github](https://github.com/vs-slavchev/GlobalEpidemicSimulation)

## Virtual Evil

_November_2015_-_June_2016 cyberpunk LibGDX computer art

A cyberspace game made using LibGDX and Java 8. Fight against the AI overlord of a system gone rogue, navigate your way in barren artificial landscapes and try to comprehend where reality bleeds into virtuality. Made together with [Bozhidar Hrusanov](https://github.com/BozhidarHrusanov).

Download: [from github](https://github.com/vs-slavchev/Virtual-Evil/releases)

## Invade yer space

_March_-_May_2015 UX Java

Java 2D space invaders game, but with a story twist. Captain Manol, a pirate captain, had his ship fleet sunken after a confrontation with the invading aliens, but managed to get hold of one of their ships. Now his mastery of sailing leads him on a revenge to invade the aliens' space.

I wanted to experiment with user experience: animations, notifications and sounds.

Download: [from github](https://github.com/vs-slavchev/Invade-yer-space/releases)

## Sanity's Eclipse

_March_2015 opponent AI asteroids

A Java 2D asteroids game with spaceships based on rotating around and having to manage your velocity and acceleration. It has 5 different enemies which use different attack strategies, various powerups, fast dangerous asteroids. Made together with [Bozhidar Hrusanov](https://github.com/BozhidarHrusanov).

Find it [at github](https://github.com/vs-slavchev/Small_projects/tree/master/Sanity's%20Eclipse)

## Haiduti

_December_2015 casual DnD pen and paper historical games

A tabletop historical role-playing game. The pdfs can be printed on paper and cut into cards. The story takes place in the late 1860s in the land of the Bulgarian people. The game mechanics are like a soft casual DnD one shot. There are many historically accurate weapons, fun facts and small doses of history, different places, characters, abilities for the players to choose, riddles and mysteries, action and combat, calm sceneries of nature's beauty.

![Tepeliya pistol illustration](https://vsslavchev.com/img/haiduti/tepeliq.svg)

Tepeliya pistol

Not just a weapon, but also a jewel, this pistol is lavishly decorated and engraved with delicate motifs. Occasionally a malfunction causes an explosion that can hurt the shooter's hand.

![Ottoman knife illustration](https://vsslavchev.com/img/haiduti/turkish.svg)

Ottoman knife

The ancient Persian blacksmiths knew the secret of the Damascus steel. Their blades had the ultimate qualities: flexible, but also very durable and sharp. A weapon forged from the material is easily distinguishable with its chaotic motifs. The metal, named after the capital of Syria, cannot be created nowadays - the secret method of manufacture was lost in the 19th century.

![Lefaucheux double barrel pistol illustration](https://vsslavchev.com/img/haiduti/lefaucheux.svg)

Lefaucheux double barrel pistol

Not just a double-barrel pistol. It has two hammers and triggers. It is invented by the french gunsmith Casimir Lefaucheux, who strongly influenced the development of guns and created the first pistol with breech-loading.

![Pepperbox pistol illustration](https://vsslavchev.com/img/haiduti/peperbox.svg)

Pepperbox pistol

Four-barrel revolver. The idea for the mechanism became popular in the end of the 18th century in Belgium and England. At that time the barrels were rotated manually by the shooter. After the industrial revolution they were quite popular during the 1830s in America because they were cheap; the other revolvers were more complex and expensive to manufacture.

![Prussian grenade illustration](https://vsslavchev.com/img/haiduti/prussian.svg)

Prussian grenade

A major drawback of the grenades of the 18th century is that usually the enemy has time to throw them back.

![Deringer pistol illustration](https://vsslavchev.com/img/haiduti/deringer.svg)

Deringer

The word deringer is used to refer to a small personal firearm that is easy to conceal, usually carried for self-defence. Henry Deringer starts to manufacture the first ones in the 1830s. Abraham Lincoln was assassinated exactly with such a pistol in 1865.

[Find it here](https://github.com/vs-slavchev/Haiduti)

## You are the Defender

_April_2014 mini games text-based

I wanted to make a fantasy game with a lot of freedom and especially less popular features or activities to do. Things like gambling, playing minigames, praying to different deities, eating and drinking, ordering said food and beverages, talking with npcs without the purpose of getting something for it. This combined with the lack of epicness of the setting made it feel more ordinary and calm.

Find it [at github](https://github.com/vs-slavchev/Small_projects/tree/master/You-are-the-Defender)

## Bubble Rebel

_April_2013 competition C++

A 2D game written in two and a half days in C++ for a game programming competition. The theme of all games was "bubbles". In the game you compete with the evil bubble to collect more bathroom bubbles and become the biggest bubble.

Download: [from github](https://github.com/vs-slavchev/Small_projects/tree/master/Bubble%20Rebel)

## Yani: Rise to power

_March_2013 Allegro animation

Help my classmate Yani collect all the cultural relics so he can finally face his greatest enemy.

![Screenshot of Yani: Rise to Power game](https://vsslavchev.com/img/projects/yani_rise.png)

Download: [from github](https://github.com/vs-slavchev/Small_projects/tree/master/Yani%20Rise%20to%20Power)

## VSMGB

_February_2013 Game maker

A 3D horror game with excessive jump scares. You navigate dark rooms, tunnels, halls and corridors.

Download: [from github](https://github.com/vs-slavchev/Small_projects/tree/master/VSMGB)

## Strength and steel

_June_2012 2D RPG rendering

2D tiled fantasy game written in C++ with Allegro 4. The game has an inventory system, abilities and cooldowns, multi-layer map and map editor, character stats, an enormous map that is visibly chunked, npcs to talk to. It taught me basics of OOP, rendering 2D graphics and using arrays of pointers.

![Screenshot of Strength and Steel game](https://vsslavchev.com/img/projects/strength-and-steel.png)

## Beyond the next dimension

_October_2010_-_February_2012 3D FPS

A 3D shooter. The sprites from Doom made it grim and gory, while the other ripped weapon images made it feel like a violent collage. The simple geometry of the levels and doors added a good bit of amateurism. Building this game allowed me to apply knowledge in trigonometry and stereometry. Made with GM7 and Blender after following a book tutorial.

- 9 levels
- 4 weapons
- 6 enemy types
- 2 bosses

One of my friends even made a [trailer](https://www.youtube.com/watch?v=_8R3p5hgbbY) for it.

Download: [from github](https://github.com/vs-slavchev/Small_projects/tree/master/BTND)

## WoV: MoV

_October_2011 text-based

My first C++ game - a text-based fantasy RPG with many different enemies, combat scenarios and outcomes.

![Map from WoV: MoV game](https://vsslavchev.com/img/projects/WoV_map.jpg)

## Dimension Traveller Pesho

_2009_-_2010 platformer bosses

A platformer with many levels. The last released version is lost, but this one has most of the levels and all of the bugs. The goal was to have a variety of levels not fitting with each other and not constrained by story. Most bosses have unique mechanics and theme.

![Screenshot of Dimension Traveller Pesho game](https://vsslavchev.com/img/projects/dtp.webp)

Download: [from github](https://github.com/vs-slavchev/Small_projects/tree/master/DTP)
