Category Archives: Art

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

Making a plotter from a Laser Cutter

I’ve got a SculpFun Laser Cutter.
I’m using this a lot … as lasercutter.

But you can also use a laser cutter as a Plotter or vinyl cutter!

Just remove the laser head, and replace it with a pen or knife!
(360 swivel blade)

First : replace laserhead and make a controllable pen holder.

My Laser Cutter can be controlled using G-codes real-time.
Example my etch a sketch.
Now I just have to add a Z axis controller to control pen up/down.

While I’m not afraid to cut things by hand. Like our front door decoration.

I like a more precise and repeatable way. I’ve cut lots of Nae Bother Logo’s like on my Laptop. (These were made using a computer cutter)

Test code (no gcode yet):

#include <Servo.h>
const int buttonPin = 16;  
int lastButtonState = 0;  

Servo myservo; 

void setup() {
  pinMode(buttonPin, INPUT);
  myservo.attach(2); 
  myservo.write(0);
  Serial.begin(115200);
}

void loop() {
  int reading = digitalRead(buttonPin);

      if (reading == 1 && lastButtonState == 0) {
        myservo.write(0);
        Serial.println("UP");
        lastButtonState = 1;
      }
      if (reading == 0 && lastButtonState == 1) {
        myservo.write(160);
        Serial.println("DOWN");
        lastButtonState = 0;
      }

}

Tiny animator for stop-motion

I was working on a RP2040 HID project, but I needed some components I didn’t have … right now .. again ..

So I made something else ..

A tiny animator for stop motion animations using my webcam, python and OpenCV.

For claymotion or lego or whatever.

The program displays your webcam with the previous snapshot overlayed, so you can position everything relative to your previous snapshot.

Difference between two shots.

Press B to take a frame.

Just a proof of concept using a (BAD) webcam. (Don’t look at my hand )

CODE (short but you need OpenCV)

import  cv2
from datetime import datetime
# black is just a start empty image .. 
img=cv2.imread("black.png");
cap = cv2.VideoCapture(0)

while True: 

    ret,vid=cap.read()
    dim = (800,600)
    img1 = cv2.resize(img, dim, interpolation = cv2.INTER_AREA)
    vid1 = cv2.resize(vid, dim, interpolation = cv2.INTER_AREA)

    result=cv2.addWeighted(img1,0.5,vid1,0.5,0)
    cv2.imshow('overlay', result)
    if(cv2.waitKey(10) & 0xFF == ord('b')):
            now = datetime.now()
            current_time = now.strftime("%d_%m_%Y_%H_%M_%S")
            filename = '%s.png' % current_time
            if not cv2.imwrite(filename, vid1):
                raise Exception("Could not write image")
            img=cv2.imread(filename);

Pressing B fills your directory with PNG’s
like 24_10_2023_00_01_01.png (date formatted)

convert to GIF

convert -delay 10 -loop 0 24*.png animation.gif

Mikrotik Wifi, 80386 and Lilygo streaming

Quiet days, I working on some art.

But here are the last ‘prutsen’

My current Wifi setup

I’ve got a Wifi outside of my network for guest and emergency. ( 2 SSIDs)

Then a main Wifi router in my livingroom, one in my workshop/studio and one in the Attic (Electronics Lab)

So three main Wifi AccessPoints. These all have the same SSID’s but on different frequencies. That way i’ve got roaming in and outside my house.
Also some virtual accesspoints are configured.
I’ve got a main, folkband, IOT, guest-inside all on 2.4Ghz and 5Ghz.

I watched a lot of YT presentations about Mikrotik Wifi.

So I ended up with DFS safe channels 20Mhz for 2.4 and 20/40Mhz Ce for 5Ghz. (subchannels for each after some frequency scanning)
(2.4 does a failback to 20Mhz whenever there is even one client detected which connects only on this band. Such as some old IOT stuff)
2.4 in only 1,6 and 11 no overlap, each on another device.
300Mbps is sufficient for my wifi 🙂

I’ve got accesslists in place and i’m going to read into kicking a client when the signal strenght is below -50dB

80386 (DX) Computer

Besides my 8088 and 8086 machines I needed a machine which could run our old demo’s. So I bought a new toy.

It has 8Mb Ram and runs at 40Mhz.

I’ve noticed that many of my VGA register manipulation code, can’t be run on a modern VGA monitor, I need to use a CRT for that .. Another thing to buy

Lilygo T-Display S3 Streaming

Not my code: https://github.com/Steve5451/esp32-stream-desktop
A very cool project!

Needed to fix arduino code, due to the TFT_eSPI library issues.
And I’ve got a S3 with another resolution, but that was an easy fix.
Then needed to reinstall nodejs with another version.
Had to modify the code because the tcp server would not start.
Weird errors logging, but in the end fixed … very cool

I probably end up designing a 3D printed case that looks like a monitor or tv.

Shaders using Bonzomatic

Saw some demo-scene shader showdowns on YT the other day.

Two guys live programming shaders in less than a hour!

Fun to play with .. bonzomatic.
This shader program is realtime being compiled and the effect is shown on the background.

Below version I made using an example is changing to the music being played. (Fast Fourier transform function, see my other post about this)

Clay press to make a brick wall (for models)

I found a nice tile-able image on the internet to make into a clay press.

UPDATE: 20230406

Using Blender and 3D printing, I’ve got this result.

Take a flat image an convert to black-white. Then invert!

Create cylinder in blender.
Change capfill into nothing, and set sizes.
Add modifier: Solidify
Add texture
CTRL-R and divide, then subdivide
Subdivide surface
Add displace modifier.
Texture coordinates UV.
Displacement negative 0.1-0.3

UPDATE: 20230406

I need to apply the white/gray first in all cracks, and the red color is a little off.

Laser cutting a door sign

I’ve got a nice stone slate, perfect for a door sign.

I wanted to paint our names and house number. But now that i’ve got a lasercutter, lets do that.

I’m going to use the design i’ve used for the Folkband Bags, and add some stuff.

First test on the back of the slate

Using a Sculpfun S9, Power 100 and speed 100mm/s

I will add the final result to this page

Playing with lasercutter steppermotors

Busy day: I’ve airbrushed some 3D pieces a few days ago, but i need 50 or so more.
Meanwhile is was reinstalling octoprint, and making a new version of my Bluetooth page flipper. (Android Music Sheet Pedal Thingy. Which i also didn’t post apparently)
But the main project was this:

I was curious how fast the stepper motors are on my laser cutter. And for what can we utilize this!

So I took a Raspberry Zero and some rotary encoders, lets make an etch-a-sketch like thingy.


Some rotary encoder modules I had.

Next to do: 3D print a pen holder, and alter the code to enable the laser when moving!

CODE

Below code uses a simple rotary class, and generates control GCodes for the steppers/Sculpfun

import time
import serial
import RPi.GPIO as GPIO
from encoder import Encoder

def valueChanged(value, direction):
    print("* New value: {}, Direction: {}".format(value, direction))

GPIO.setmode(GPIO.BCM)

e1 = Encoder(20, 21, valueChanged)
e2 = Encoder(16, 12, valueChanged)

x = 0
y = 0
arduino = serial.Serial('/dev/ttyUSB0', 115200, timeout=.1)

newx = 0
mystringx = ""
newy = 0
mystringy = ""

arduino.write(str.encode("G00 G17 G40 G21 G54\r\n"))
arduino.write(str.encode('G90\r\n'))
arduino.write(str.encode('M4\r\n'))
arduino.write(str.encode('M8\r\n'))
arduino.write(str.encode('G0 X41.5Y36.05\r\n'))
arduino.write(str.encode('M3\r\n'))
#arduino.write(str.encode('G91\r\n'))
arduino.write(str.encode('G1 X2.5F6000S0\r\n'))
arduino.write(str.encode('G1 X0\r\n'))
arduino.write(str.encode('G1 Y0\r\n'))

try:
    while True:
        data = arduino.readline()[:-2] #the last bit gets rid of the new-line chars
        if data:
                print (data)
        arduino.write(str.encode("G1 F10000\r\n"))
        newx=e1.getValue() *5 + 100
        newy=e2.getValue() *5 + 100
        mystringx=f"G1 X{newx}\r\n"
        mystringy=f"G1 Y{newy}\r\n"
#        print(mystringx)
        arduino.write(str.encode(mystringx))
        arduino.write(str.encode(mystringy))

except Exception:
    pass

GPIO.cleanup()