MacroKeys – A small side keyboard

Some key strokes are hard to mind or just inconvinient. But thanks of USB capable Arduino compatible boards, you can make your very own customized little side keyboard.

Software on my Github account: https://github.com/bitlischieber/MacroKeys/

File for the case on my Thingiverse account: https://www.thingiverse.com/thing:2953199

Partlist (or, what i used):

1 x Teensy 3.1 board
1 x USB micro  cable
12 x Switches
12 x Keycaps
12 x Standard diodes (e.g. 1N4148)
Pieces of wire

Woodworm game (or the first log with USB connector)

For a birthday present every host had to paint and decorate a piece of wood. Because my artistic talents are non existing I thought “why not transfer it in to a game boy?”. So I ended up in caving out the most of the wood and stuffing in a lot of electronics. (from top to down and left to right):

  • Bi-Color (yellow/blue) OLED I2C display.
  • 3.7 V LiPo battery
  • Arduino NANO clone (ATmega328! The ATmega128 had not enough FLASH memory)
  • Booster Circuit (3.7 V to 5 V) with removed USB-A connector
  • LiPo battery charger circuit

This project presented a lot of traps and I stompled in almost everyone!

  • I milled the cutouts for the electronics staight from the top down. But the log was cut in an angle. At the edges where the corner where overhangig, the router bit was endign to cut through the crust. Furtunately I had some crust chips which I used to cover the holes :-/.
  • Routing with a bad router bit and bad equipment is more time consumig then previously estimated :-/.
  • Cheap Aliexpress Arduino NANO clone using often the ATmega128…which had not enough FLASH memory for the Adafruit graphics library :-/.
  • The booster circuit had a LiPo protection chip mounted, but the battery had also one installed. Charging was possible, but powering the circuit from the battery didn’t work. I had to bypass the protection chip using on the charger :-/.
  • The button used boucing heavily. Because I hadn’t time left for hardware debouncing I tried to debounce by software. But this ended in the choice between having a lack in control or a worm on stereoids. This issue isn’t fixed properly yet :-/.

The source code can be found on my GitHub page.

My PocketChip got sound

On little sad thing about the PocketChip is the lack of a speaker. But the guys from NextThing made it so hackable I couldn’t resist to upgrade mine. On AliExpress you find these little audio amplifier moduls for a few cents. All you need more is a speaker (or two if you like) and a few wires.

Mailbox LED light

Except from luggage trunks there are other compartments wich are quite dim: Mailboxes.

In my various electronics survival boxes I found the components to solve this issue: Battery holder, Reed Relais, an old Magnet, Boost DC/DC conveter from AliExpress (LiPo Bat. to 5V USB-A Connector) and a 12 V LED strip. The LED strip had no drivin circuit on it an the forward voltage was below 5 V. So a modification from 12 V to 5 V was by changing the current limitting resistor easy. To connect the batteries to the circuit I used the Reed Relais and the Magnet. The Magnet is attached in the mailbox inner top using adhesive. The Reed Relais ist mounted on the flap by adhesive as well. Pulling the flap upwards activates the light an let you check for post in the dark :-).

The reverse engineering of a cake-mix

Some time ago I got a mixture for a chocolate-coconut cake. So, my thought: How to bake it again if the cake is deliciouse?

Of course, by reverse engineering the mixture!

The ingredients reading as following:

Ingredient label
Ingredient label

1. Using the lable to identify the different segments:

From top to down: Peanuts, coconut rasps, brown sugar, cacao, flour, sugar, vanilla sugar, soda, cinamon, salt.

2. Measure the segment heights and container dimensions

Measuring the ingredients heights
Measuring the ingredients heights

3. Calculate the weight of the dry ingredients

Lets do some calculation using Scilab:

clear all;
clear;
clc;

//// Reverse engineered chocolate-coconut Cacke

// Igredient Segments from top to bottom

// Segment 1: Peanuts
// Segment 2: Coconut rasps
// Segment 3: Brown sugar
// Segment 4: Cacao
// Segment 5: Flour
// Segment 6: Sugar
// Segment 6: Vanilla sugar
// Segment 6: Soda
// Segment 6: Cinamon
// Segment 6: Salt

// Predefinitions

// Dimensions in [m]
h_tot = 0.1                                         // Total fill height
h_1 = h_tot - 0.09                                  // Peanut segment height
h_1_off = h_tot - h_1                               // Peanut offset from bottom
h_2 = h_tot - h_1 - 0.078                           // Coconut segment height
h_2_off = h_tot - h_1 - h_2                         // Coconut offset from bottom
h_3 = h_tot - h_1 - h_2 - 0.065                     // Brown sugar segment height
h_3_off = h_tot - h_1 - h_2 - h_3                   // Brown sugar offset from bottom
h_4 = h_tot - h_1 - h_2 - h_3 -  0.055              // Cacao segment height
h_4_off = h_tot - h_1 - h_2 - h_3 - h_4             // Cacao offset from bottom
h_5 = h_tot - h_1 - h_2 - h_3 - h_4 - 0.025         // Flour segment height
h_5_off = h_tot - h_1 - h_2 - h_3 - h_4 - h_5       // Flour offset from bottom
h_6 = h_tot - h_1 - h_2 - h_3 - h_4 - h_5 - 0.008   // Rest of the ingredients height
h_6_off = 0.008                                     // Offset of the rest from bottom

r_1 = 0.072;                                        // Small radius of the container
r_2 = 0.094;                                        // Big radius of the container

// Density in [kg/m^3]
//   some evaluated, some from here: http://www.mollet.de/info/schuettgutdichte.html
// [kg]/([0.001 m^3/l]*[l]) = [kg]/[m^3]
roh_1 = 0.500/(0.001*1.000);    // Density of peanuts
roh_2 = 0.152/(0.001*0.440);    // Density of coconut
roh_3 = 0.176/(0.001*0.170);    // Density of brown suger
roh_4 = 0.047/(0.001*0.100);    // Density of cacao
roh_5 = 0.220/(0.001*0.325);    // Density of flour
roh_6 = 0.259/(0.001*0.250);    // Density of the rest...mainly sugar

// angle of the jars side walls
alpha = atan((r_2-r_1)/(2*h_tot));

// Calculate mean segment area, using the segment offset and segment height
function y=A_segment(h_offset, h_segment)
    h_mean = h_segment/2+h_offset;
    dia_mean = r_1+2*tan(alpha)*h_mean;
    y = dia_mean^2/4*%pi;
endfunction

// Calculate volume, using mean area and height
function y=V_segment(A_seg, h_segment)
    y = A_seg * h_segment;
endfunction

// Calculate the weight, using density and volume
function y=Weight(V_segment, density)
    y = V_segment * density;
endfunction

// Weight calculation
w_1 = Weight(V_segment(A_segment(h_1_off, h_1), h_1), roh_1)
w_2 = Weight(V_segment(A_segment(h_2_off, h_2), h_2), roh_2)
w_3 = Weight(V_segment(A_segment(h_3_off, h_3), h_3), roh_3)
w_4 = Weight(V_segment(A_segment(h_4_off, h_4), h_4), roh_4)
w_5 = Weight(V_segment(A_segment(h_5_off, h_5), h_5), roh_5)
w_6 = Weight(V_segment(A_segment(h_6_off, h_6), h_6), roh_6)

disp(w_1, "Peanuts: ")
disp(w_2, "Coconut rasps: ")
disp(w_3, "Brown sugar: ")
disp(w_4, "Cacao: ")
disp(w_5, "Flour: ")
disp(w_6, "Sugar...and the rest: ")
disp(w_1 + w_2 + w_3 + w_4 + w_5 + w_6, "Total weight: ")

And the output is (values in kg):

Peanuts:
    0.0338915
Coconut rasps:
    0.0266543
Brown sugar:
    0.0813567
Cacao:
    0.0267958
Flour:
    0.1041294
Sugar...and the rest:
    0.0791201
Total weight:
    0.3519478

Surprisingly, the calculated weight of about 0.352 kg is pretty close to the one, indicated on the label.

Just add 2 eggs and 120 g butter. The <<rest>> would be about 1 tea-spoon of baking soda, a knife tip of cinnamon and a pinch of salt.

Bye bye Hongkong, bye bye China

Nach 4 kurzen Wochen ist die Reise auch schon zu Ende.
Der lange Rückflug nach ZRH für über SIN und daurt ca. 3.5 h + 12 h.
Während dieser Zeit habe ich nun doch noch bereut, dass ich keinen Pullover eingepackt habe: Beide Flugzeuge waren sehr gut klimatisiert (oder ich war mir solche tiefen Temperaturen nicht mehr gewohnt).
Ab SIN ein kleines Highlight: Ein A380 bringt uns nach ZRH.

DSCN2244
(Hongkong Int. Aiport am Abend…im Vordergrund: Nicht mein Flugzeug 🙂 )

 

Macau

Hongkong 3号