For measuring pressure in fermentation containers, I designed a pressure sensor which could be wireless connected to a fermentation container. The sensor would transmit the values to a Raspberry which was configured as a Access Point and would store the measurements and generated graphs using Grafana.
Connect esp with a power source. Look for a AP with ESP_Easy_0
Use password “configesp” to connect
Start you browser and enter http://192.168.4.1
In wifi wizard setup select “pressurespot” Enter password “pressurespot”
Press connect
Wait 20s and look in the raspberry logs which IP the ESP got.
Connect laptop/mobile to wifi “pressurespot”and connect
Enter found IP from ESP in your browser.
Proceed to main config
Main setting table, set the following
Unit name & number + append
SSID and WPA key pressurespot
Client IP block level allow all
Press submit
Press controller tab
Press first edit button and set following – Protocol: domoticz http Next set – Controller IP : 10.42.0.1 – Toggle enabled and press submit
Resulting in:
Next we got to Hardware
I2C interface switch GPIO-4 and GPIO-5
GPIO – SDA: GPIO-4 (D2) change to GPIO-5 (D1)
GPIO – SCL: GPIO-5 (D1) change to GPIO-4 (D2)
Press “Submit”
Devices TAB
Press edit, and select device “Environment – BMx280” from the pulldown menu.
Next, set the following
Name: pressure
Enable on
I2C address : 0x76 ( Is there is no 0x76 of 0x77 .. do a i2c scan on the next tab )
Send to controller , mark this
IDX: give this the number you had given this node (this is the one you have to use in domoticz )
interval 10Seconds
and press submit
In the Devices tab, you should be able to see the sensor with the values (Temperature and pressure)
No values? Do a i2c scan and/or reboot ESP ( You can find these in the tools tab)
Tools TAB
Press I2C scan, when seeing a address like 0x76 or 0x77 use this in previous tabs. Still nothing, even after reboot? Maybe faulty hardware?
Everything okay? Back to the config tab
We are going to set the sleep mode. Warning ! .. when setting this it is hard to get into the config pages again. ESP will startup, connect to wifi, send values and goes to sleep again.
At the bottom set: Sleep awake time 1 sec
Buttons on the raspberry / pressurespot
Red button :
Less than 3 seconds is reboot
Longer than 3 seconds is shut down
Charger can be removed, when the green light is off
Led lights on the sensors
Red light (R2; constant): battery is charging
Blue light (R1; constant): battery is full
Blue light (R1; constant) & red light (R2; blinking): trying to charge, but no battery connected
Add shutdown script to /etc/rc.local
python /usr/local/bin/power-switch.py &
/usr/local/bin/power-switch.py
#!/usr/bin/python
import threading, subprocess
import RPi.GPIO as GPIO
def shutdown():
subprocess.call('sudo shutdown -h now', shell=True)
def edge_detected(pin):
if GPIO.input(pin):
t.cancel()
subprocess.call('sudo reboot', shell=True)
else:
t.start()
if __name__ == '__main__':
try:
GPIO.setmode(GPIO.BOARD)
GPIO.setup(5, GPIO.IN)
GPIO.add_event_detect(5, GPIO.BOTH, callback=edge_detected, bouncetime=10)
t = threading.Timer(3.0, shutdown)
while True:
pass
finally:
GPIO.cleanup()
/usr/local/bin/ledoff.py
#!/usr/bin/python
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)
GPIO.setup(18,GPIO.OUT)
GPIO.output(18,GPIO.LOW)
/usr/local/bin/ledon.py
#!/usr/bin/python
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)
GPIO.setup(18,GPIO.OUT)
GPIO.output(18,GPIO.HIGH)
Now we can check that grafana is up by loading it in a browser: http://10.42.0.1:3000. If so, you can log in with the username and password = admin and set a new admin password.
When using Spice and VNC to virtual machine consoles, and remote consoles like idrac and ilo, it is not alway possible to copy-paste.
When doing maintenance it is a annoyance to type a super strong and long password by hand, Prone to typing errors, timeouts. And following lockouts.
So i wanted to auto type the password.
First solution was to bind a little bash script to a key combination.
#!/bin/bash
# Usage: make a keypress shortcut to this script
# activate shortcut, and the script wil give you 10 seconds to click and focus remote console window.
# It pastes the password, and you can press enter to login
# ( you can use xdotool also to press enter for you )
sleep 10
xdotool type "SUP3Rl00000ngandcompl3xpasswo0d@#@#@#%$%$%%$-you-cant-type-me-without-erors"
I’ve bound this to a key combination on my workstation.
gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings "['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/']"
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ name 'passpaste'
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ command '~/bin/passpaste.sh'
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ binding '<Super>p'
This works, but only where this script is installed. So not on colleagues machines, workstations with windows, and the super secret admin/root account sits in a file.
So i made a password key, which count be behind lock and key.
Using a digistump, a push-button and a resistor, the passpaster was born.
Plug the Digispark into you machine, it wil emulate a HID device (Keyboard). Get your remote console into focus, press button .. presto!
Missing one resistor
TODO:
3D print a little case
pin protect?
rotary + display? (Like below)
It would be nice to have something like:
Rotary encoder 1 – selects which password to paste Rotary encoder 2 – (1-255) does a encryption method on the password Display shows : Password #32 – Crypt # 88 So you can have for example 255 passwords with 255 encryptions .. which to use when? Only you know.
Above can’t be done with a Digispark, so i’ll have to use a Arduino Pro Mini or a equivalent
Cartridge not recognised? Just replace chip! With a original one
UPDATE: Maybe there is a counter in there, had a cartridge which wouldn’t work anymore ?!?
Cartridge saying .. i’m empty, but still visible ink?
Just tape up above part!
Note: there are many solutions found on the web, like opening the lid and pressing two buttons to get into a reset menu. Or Cold start your printer without cartrides 5 times to reset stored ink levels.
Below is a picture of my mobile LMS server i used in my car. I only had radio and a CD player, i’m not a radio man .. folk, pipes and audiobooks
At the time i was working for Dutch Railways, imagine me walking with this blinky leds thingy, though the railway station …
It consisted of a dual port usb charger, a usb hub to power the drive, the rpi wasn’t strong enough. Thumbdrives where small in capacity, so i had to use a spinning disk harddrive. It was only a raspberry 1, in a case i had designed and lasercutted at Fablab Utrecht.
Now you can get rid of the Usb hub and harddrive using a small but with large capacity sdcards.
I could charge the thing in my car, and when i got home, it would connect to my home wifi network, sync-ed my MP3’s and turn off.
Post in 2002 due to screenshot .. dont know when i build it, some years before.
Using 24 pushbuttons and a IO expander, i could count the bottles in a crate. Probably used something like a hef4067 ??
Now i probably use a weight sensor or a beer cap counter using a webcam image.
Notification to email and shopping list printer.
Web Interface
Every bottle had to be placed back upside down so the opening of the bottle would not press down on the button. Later i used springs which could hold a empty bottle elevated above the button. The weight of a full bottle would press on the button.
Build a hardware webcounter (it was a thing back then) , i used below schematic. Wanted to use huge 7 segment displays but never got around it to buy the large ones.. It was easily converted to multiple segments. I think i used 4 and pulses where send via a parallel port.
Old webcounter schematic
The three (my case four) buttons are to get the counter in sync with my real counter which was a CGI script. It generated html code with took numeric images and displayed these on a page, the state was stored in a file. No numbers where send to the counter, only a pulse. So no synchronisation! Not the way to do this nowadays!
Joystick recorder
I designed a joystick movement recorder for a school project.
You could record movement, and press a button to start recording. (and starting the game) It was not really usable. Because, it needed a higher recording rate, a game which always reacted to the player in the same manner. Only made a half proof of concept.
Drawing images using lasers
For another school project i wanted to be able to draw figures using a laser. One of my teachers fixed a meetup for me with a guy attending university in Enschede. He was using lasers to scan miniscule objects using a laser in groves something resembling a longplayer record.
I wanted to use two DACs to control the movement of two mirrors. But i’d had to take into account the speed of the movement and the weight of the mirrors, else images where distorted.
He gave me a schematic which used: 2 controllabe video disc mirrors, light split glasses and amplifier part.
Previous project with Oscilloscope drawings helped, with understanding those problems. https://www.henriaanstoot.nl/1992/01/01/oscilloscope-graphics-using-a-amiga-bonus-vectrex/
I’ve still got the components, except for the high grade laser i lend from a friend. But a simple laser pen should suffice
"If something is worth doing, it's worth overdoing."