All posts by fash

Ben Eater Clock Module on steroids

My previous build of the clock module is as Ben designed. Wellll . Not really, I added some components to change the clock range.

Okay, Ben’s design is awesome. Not because of its technical design. No, you will learn to use the NE555 chip in three ways!
Variable freq, debounce with delay and a flip-flop like switch
I added another function to it. While making my version.
I added a 555 power-on reset pulse part.

I used a perm board (which is shorter than a regular breadboard)
And I moved some components over and added some LEDs/pin headers.
While doing so, I only used 3/4 of the board.

So I added a power-on reset part with a manual push-button. (Partly like the C64 power-on)
I also added the 1Mhz crystal.

Rest of the boards will use JST connectors for the bus-connections.

I am working on big motor controllers and 3D print modelling for clients.

Busy .. work and play

While working on my clients projects, I’ve been busy with other Fun stuff.

All will be posted more about soon

  • Designing 3D models for printing
  • Testing Arduino Code for RS485!
  • Creating T-shirt prints using 3D printing and bleach/paint with Vincent !
  • Transforming my Lab
  • Testing UM25C logging possibilities
  • Testing queries on overpass-turbo.eu (So much fun)
  • Playing chiptune music using Synthcart + Midi
  • Made V2 displayer on my 64×64 HUB75 led display
  • Bought a directional Wi-Fi antenna, tweaking wireshark to pinpoint rogue access points and clients.

Animatronics Tentacle Test

Using 3x SG90s (metal gears).
These performed far better using my Servo tester than the cheap plastic ones.

First version using Openscad, with variables to control how it looks.

This is printed using TPU.

RepeatingBit = 4;
nr = 20;
difference(){
union(){
for (a =[0:nr]) {
    translate([0,0,(a * (RepeatingBit))]) {
        translate([0,0,a*a*1.3])
        
        cylinder ( h=1+(a*1.1), r1=1,r2=7.5+(a*(a/10)), $fn=30 );
        translate([0,0,a*a*1.3+1+(a*1.1)])
        cylinder ( h=3+(a*1.5), r1=7.5+(a*(a/10)),r2=7.5+(a*(a/10)), $fn=30 );
        
        }
}
translate([0,0,0])
cylinder( h=650, r1=2,r2=4 , $fn=30 );
}

translate([5,0,-10])
rotate([0,2.5,0])
cylinder( h=1000, r1=1,r2=1 , $fn=30 );
translate([-3,4,-10])
rotate([-4/2,-3/2,0])
cylinder( h=1000, r1=1,r2=1 , $fn=30 );
translate([-3,-4,-10])
rotate([4/2,-3/2,0])
cylinder( h=1000, r1=1,r2=1 , $fn=30 );

translate([2,3,-10])
rotate([-1.4,0.6,0])
cylinder( h=1000, r1=2,r2=nr*1.3 , $fn=30 );

translate([2,-3,-10])
rotate([1.6,0.7,0])
cylinder( h=1000, r1=2,r2=nr*1.3 , $fn=30 );

translate([-3.5,0,-10])
rotate([0,-1.8,0])
cylinder( h=1000, r1=2,r2=nr*1.3 , $fn=30 );

}

Video with some organic movement

Using a Raspberry Pi, Python3 and a Servo HAT.

Bottom part

New C64 Cartridges

New cartridges stuff.
I’ve bought some in the past, and was gifted some.

Made a case for an own made 8085 cartridge.
In this case, I used a gifted PCB from Bigred (thanks).
This was designed by Venneker.

With a gap for a 40 pins socket to piggyback signals.

https://media.henriaanstoot.nl/c64-cartridge-gap.tgz

Then a new Nordic Replay, this is a new version of the Retro Replay.

Today the TeensyRom, this came without case, so I printed one in fancy dual silk color.

Demos and hacks soon

March stuff, being busy

Working for clients, so fragmented personal stuff.
New workplace setup so even more space!

My BBQ monitor V3

As posted before, but now an esphome version, with big-ass buzzer

Code available soon, when made generic.

4Button controller using ESPHOME

Code allready posted

STL FILE https://media.henriaanstoot.nl/4buttons.stl

Flash trick for XYUSB

Flashing this to ESPHOME, use sowing pins!

CODE

substitutions:
  name: usb-relay
  friendly_name: "USB Relay"
  default_state: "RESTORE_DEFAULT_OFF"


esphome:
  name: xyusb1
  friendly_name: xyusb1

esp8266:
  board: esp01_1m

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "ndm8xxxxxxxxxxxxxxxxxjlvrggJv3a1BkY="

ota:
  - platform: esphome
    password: "12cc9xxxxxxxxxxxxxxxxfb6a01e672"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Xyusb1 Fallback Hotspot"
    password: "xxxxxxxxxxx"

captive_portal:

time:
  - platform: homeassistant

# Blue LED
status_led:
  pin:
    number: GPIO16

# Relay
switch:
  - platform: gpio
    id: switch_relay
    pin: GPIO5

  # Green LED
  - platform: gpio
    pin: GPIO14
    id: green_led
    inverted: true # start on

  # Switch template to link relay and green LED states
  # LED is on when relay is off
  - platform: template
    id: relay
    name: "${friendly_name}"
    lambda: |-
      if (id(switch_relay).state) {
        return true;
      } else {
        return false;
      }
    turn_on_action:
        - switch.turn_on:
            id: green_led
        - switch.turn_on:
            id: switch_relay
    turn_off_action:
        - switch.turn_off:
            id: green_led
        - switch.turn_off:
            id: switch_relay

# Button
binary_sensor:
  - platform: gpio
    id: hardware_button
    pin:
      number: GPIO04
      mode: INPUT_PULLUP
      inverted: True
    on_press:
      - switch.toggle: relay

# WiFi Signal Sensor
sensor:
  - platform: wifi_signal
    name: "WiFi Status"
    update_interval: 60s

# Restart button
button:
  - platform: restart
    name: "Restart"

Reflashed my USB Volume button and added a LED-Ring.

Example is green and blue.

Funny text on box

What is a termianl assortment? LOL

Wireless Temperature/Humidity sensor for ESPHome.

Wemos D1 mini with deep sleep, voltage monitoring using A0 line.
BME280 Temperature/Humidity sensor.
And a 18650 battery with TP4065 battery manager.
Now 3D print a little case.

Made a PCB for a 24 Channel Logic analyzer

See post:

Moving photo test

Using a bowden tube (PTFE tube 1mm) with a 3d printed holder.
(ptfe is very smooth)

This is a test setup.
I’ve removed arms and the flute on the bottom picture using AI.
Then printed backpicture and top on sticky paper and stuck it on sturdy heavy paper.

I want to make a moving picture which moves our band members when there is sound (music).
(Guitar, Harp, Bagpipes and Flute)

First test

Machine Learning Waveforms

I’ve used machine learning before, this is my waveform classifier.

(Next to do, more classes)

Class0 – Train data

Class1 – Train data

Running train script

Test data

Prediction

Code ( generates a h5 classifier )

import tensorflow as tf

from tensorflow.keras.preprocessing.image import ImageDataGenerator
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Conv2D, MaxPooling2D, Flatten, Dense, Dropout, Input
import os


# Define dataset path
DATASET_PATH = "data/"

# Load images using ImageDataGenerator
datagen = ImageDataGenerator(rescale=1./255, validation_split=0.2)

train_data = datagen.flow_from_directory(
    DATASET_PATH,
    target_size=(128, 128),
    batch_size=32,
    class_mode='categorical',
    subset="training"
)

val_data = datagen.flow_from_directory(
    DATASET_PATH,
    target_size=(128, 128),
    batch_size=32,
    class_mode='categorical',
    subset="validation"
)

# Define CNN model
model = Sequential([
    Input(shape=(128, 128, 3)),
    Conv2D(32, (3,3), activation='relu'),
    MaxPooling2D(2,2),
    
    Conv2D(64, (3,3), activation='relu'),
    MaxPooling2D(2,2),
    
    Flatten(),
    Dense(128, activation='relu'),
    Dropout(0.5),
    Dense(train_data.num_classes, activation='softmax')
])

# Compile model
model.compile(optimizer='adam', loss='categorical_crossentropy', metrics=['accuracy'])

# Train the CNN
model.fit(train_data, validation_data=val_data, epochs=10)

# Save model
model.save("waveform_classifier.h5")
print("Model saved as waveform_classifier.h5")

Code to predict class

import numpy as np
from tensorflow.keras.preprocessing import image
from tensorflow.keras.models import load_model

# Load trained model
model = load_model("waveform_classifier.h5")

# Load and preprocess image
def predict_waveform(image_path):
    img = image.load_img(image_path, target_size=(128, 128))
    img_array = image.img_to_array(img) / 255.0
    img_array = np.expand_dims(img_array, axis=0)

    # Predict class
    prediction = model.predict(img_array)
    predicted_class = np.argmax(prediction)
    
    print(f"Predicted Class: {predicted_class}")

for f in range(1,5):
    predict_waveform("testdata/" + str(f) + ".png")

Generate images from CSV

import pandas as pd
import matplotlib.pyplot as plt

def waveform_to_image(csv_file, signal_column="amplitude", save_path="waveform.png"):
    # Load CSV
    df = pd.read_csv(csv_file)

    # Extract signal (time,amplitude)
    signal = df[signal_column]

    # Plot waveform
    plt.figure(figsize=(4, 4))
    plt.ylim(0, 20)

    plt.plot(signal, color='black', linewidth=2)
    # Hide axes
    plt.axis('off')  

    # Save as an image
    plt.savefig(save_path, bbox_inches='tight', pad_inches=0)
    plt.close()
    print(f"Saved waveform image as {save_path}")

# Loop through files 1.csv to 32.csv and generate images
for i in range(1, 31):
    csv_filename = f"{i}.csv"
    png_filename = f"{i}.png"
    waveform_to_image(csv_filename, save_path=png_filename)