Mega PC tower and Book

I’ve printed two books using the Lulu service. (One for Tyrone)
When they arrived, I noticed some faults.
Lucky Lulu will be printing them again for me.

The book has over 500 pages and has a nice hardcover.

And I’ve been busy building a Mega Tower with 4 Motherboards.
This will have a superb processing power! .. not.
It houses some old motherboards for hardcore machine coding on real old hardware.

From top to bottom: 8088, 8086, 80386, 80484

Todo:

  • Rework on the cables
  • 3D print an information plaque on the front of each board
  • Add a control panel on each board
  • Maybe some dust cover would be nice

I can remove the boards, and place them on a table.
I’ve made some custom feet for them. Twist and lock by my own design.

Padded feet

The openscad files:

The locking is done by making the cylinder slightly oval by 0.5mm

difference(){
	difference(){
		difference(){
			difference(){
				rotate([90,30,0])
				cylinder(r=30, h=10, $fn=3);
				translate([-20,-20,0])
				cube([40,40,40]);
				}
			rotate([90,0,0])
			translate([0,0,-10])
			cylinder(r=5, h=30, $fn=200);
			translate([0,-5,-10])
			cylinder(r=7, h=30, $fn=200);
			}
		translate([18,-5,-12])
		cylinder(r=4, h=30, $fn=200);
		translate([18,-5,-22])
		cylinder(r=2.2, h=30, $fn=200);
		translate([-18,-5,-12])
		cylinder(r=4, h=30, $fn=200);

		translate([-18,-5,-22])
		cylinder(r=2.2, h=30, $fn=200);
		}
	translate([9,-20,-20])
	cube([40,40,40]);
}

Note the resize for the oval effect

resize([14,14.5,10])
cylinder(r=7, h=10, $fn=200);
translate([0,0,0])
cylinder(r=9, h=3, $fn=200);

When designing above, I also made new knobs for our stove.
Using the white dot, you can see which burner has which knob.

Started using FreeCad

FreeCAD is an open-source parametric 3D modeller made primarily to design real-life objects of any size. Parametric modelling allows you to easily modify your design by going back into your model history and changing its parameters.

Designed a case for a measure tool, I’ve printed a case for a while ago.

What are my thoughts : I like it, I like the setup, workbench and the fact that you can edit every step again.

Measure diameter case using 3D printed tool

Draw case using FreeCAD

A 3D CAD mouse helps!

Uncleanable 2nd hand controller

Below, a technical drawing exported to PDF using FreeCAD

Playing around with the 3D CAD Mouse

I forgot the holes for mounting, these I did using Bambu Studio.

Busy building my new workspace but meanwhile I am playing with machine learning

I needed more space for my business, so I moved to my big workshop space where our music studio was.

I’ve installed Yolo (v8) and generated an image using ChatGPT with many objects.

Installing Yolo:
See https://docs.ultralytics.com/quickstart/#install-ultralytics

Generated image

Using below python script I get a text file with hits and an image with objectboxes.

import cv2
import random
from ultralytics import YOLO
# Load YOLOv8 model
model = YOLO('yolov8n.pt')  
input_image_path = 'input.jpg'
image = cv2.imread(input_image_path)
def get_random_color():
    return [random.randint(0, 255) for _ in range(3)]
class_colors = {i: get_random_color() for i in range(len(model.names))}
results = model(input_image_path)
output_txt_path = 'output.txt'
with open(output_txt_path, 'w') as f:
    for result in results:
        for box in result.boxes:
            cls = int(box.cls[0])  
            confidence = box.conf[0].item() 
            bbox = box.xyxy[0].cpu().numpy()
            class_name = model.names[cls]
            # Write text file
            f.write(f"Class: {class_name}, Confidence: {confidence:.2f}, BBox: {bbox}\n")
            color = class_colors[cls]
            cv2.rectangle(image, 
                          (int(bbox[0]), int(bbox[1])), 
                          (int(bbox[2]), int(bbox[3])), 
                          color, 3)  # Thicker rectangle
            label = f'{class_name} {confidence:.2f}'
            font_scale = 1.0  # Larger font size
            font_thickness = 2  # Thicker font
            cv2.putText(image, 
                        label, 
                        (int(bbox[0]), int(bbox[1]) - 10), 
                        cv2.FONT_HERSHEY_SIMPLEX, 
                        font_scale, color, font_thickness)
output_image_path = 'output_with_boxes.jpg'
cv2.imwrite(output_image_path, image)
print(f"Detected objects saved to {output_txt_path}")
print(f"Output image with boxes saved to {output_image_path}"

Text file

Class: car, Confidence: 0.91
Class: car, Confidence: 0.90
Class: giraffe, Confidence: 0.90
Class: car, Confidence: 0.87
Class: bicycle, Confidence: 0.85
Class: person, Confidence: 0.77
Class: person, Confidence: 0.68
Class: bus, Confidence: 0.66
Class: sheep, Confidence: 0.64
Class: zebra, Confidence: 0.62
Class: umbrella, Confidence: 0.60
Class: bicycle, Confidence: 0.56
Class: umbrella, Confidence: 0.54
Class: airplane, Confidence: 0.52
Class: person, Confidence: 0.51
Class: person, Confidence: 0.48
Class: bicycle, Confidence: 0.44
Class: person, Confidence: 0.43
Class: stop sign, Confidence: 0.40
Class: umbrella, Confidence: 0.39
Class: motorcycle, Confidence: 0.39
Class: bicycle, Confidence: 0.38
Class: person, Confidence: 0.37
Class: person, Confidence: 0.35
Class: teddy bear, Confidence: 0.29
Class: truck, Confidence: 0.27
Class: airplane, Confidence: 0.26
Class: bus, Confidence: 0.25
Class: person, Confidence: 0.25

Code for real-time detection using a webcam.

from ultralytics import YOLO
import cv2
import math 
# start webcam
cap = cv2.VideoCapture(0)
cap.set(3, 640)
cap.set(4, 480)
# model
model = YOLO("yolo-Weights/yolov8n.pt")
# object classes
classNames = ["person", "bicycle", "car", "motorbike", "aeroplane", "bus", "train", "truck", "boat",
              "traffic light", "fire hydrant", "stop sign", "parking meter", "bench", "bird", "cat",
              "dog", "horse", "sheep", "cow", "elephant", "bear", "zebra", "giraffe", "backpack", "umbrella",
              "handbag", "tie", "suitcase", "frisbee", "skis", "snowboard", "sports ball", "kite", "baseball bat",
              "baseball glove", "skateboard", "surfboard", "tennis racket", "bottle", "wine glass", "cup",
              "fork", "knife", "spoon", "bowl", "banana", "apple", "sandwich", "orange", "broccoli",
              "carrot", "hot dog", "pizza", "donut", "cake", "chair", "sofa", "pottedplant", "bed",
              "diningtable", "toilet", "tvmonitor", "laptop", "mouse", "remote", "keyboard", "cell phone",
              "microwave", "oven", "toaster", "sink", "refrigerator", "book", "clock", "vase", "scissors",
              "teddy bear", "hair drier", "toothbrush"
              ]
while True:
    success, img = cap.read()
    results = model(img, stream=True)
    # coordinates
    for r in results:
        boxes = r.boxes
        for box in boxes:
            # bounding box
            x1, y1, x2, y2 = box.xyxy[0]
            x1, y1, x2, y2 = int(x1), int(y1), int(x2), int(y2) # convert to int values
            # put box in cam
            cv2.rectangle(img, (x1, y1), (x2, y2), (255, 0, 255), 3)
            # confidence
            confidence = math.ceil((box.conf[0]*100))/100
            print("Confidence --->",confidence)
            # class name
            cls = int(box.cls[0])
            print("Class name -->", classNames[cls])
            # object details
            org = [x1, y1]
            font = cv2.FONT_HERSHEY_SIMPLEX
            fontScale = 1
            color = (255, 0, 0)
            thickness = 2
            cv2.putText(img, classNames[cls], org, font, fontScale, color, thickness)
    cv2.imshow('Webcam', img)
    if cv2.waitKey(1) == ord('q'):
        break
cap.release()
cv2.destroyAllWindows()

Note: generated picture is not perfect. See zebra. AI output is affected by this.

3D print fun

Multi Color !
New bottle clip, all made within bambu studio.

Resize, clone, negative boolean, selective cut, text surface, change modifier type.

Bambu studio:

I’ve made a script to view the camera using vlc. But it was much work.
Now I’ve installed the HACS Bambu integration in Home Assistant.
Much easier to get an image.

While Bambu studio is nice, I started using FreeCad.
I still use OpenScad and Blender, but I really try to use a CAD program for modeling 3D prints (technical prints). For sculpting I still use blender.

The lost art of 3D printing.

Many people are into 3D printing, more than ever. So why do I say “the lost art”?

I started my 3D printing journey in 2012.
Not having my own 3D printer, I was using the shapeways service,

Using Sketch-up I drew my first printable objects. Upload model and get it by mail.

Welllll .. lets compare.
I’ve bought a bambu labs P1S recently.

  • Buy printer, unpack.
  • Connect to cloud.
  • Add filament and print model (after calibration process)

All fine and dandy, problems? Check YouTube for solutions.

What do you know about 3D printing?

People are forgetting about the knowledge to get at this point ..]…

How does it work, what is needed?

My first 3D printer.
Lets compare:

  • Get printer in parts
  • Assemble
  • Calibrate
  • Manual bed calibration (*)
    5 point calibration step by step, needs user input
  • Test print
  • Fail several times
  • Try different sticky methods
    (hairspray, double sided tape, gluestick)
  • Bed warping? Add tape to underside
  • Feed filament by cutting at 45 degree angle and manual feeding.
  • Load and unload using buttons and feeding until previous color flushed
  • Learn about Gcodes
  • color changing? split part and pause manually, switch manually.
  • out of filament, problem with printing? start the whole print again
  • no out of filament detector, no temperature failsave
  • Filament error? Start again or split gcode by hand and superglue parts
  • Clean plate, clean head
  • Manual change temperature of head and bed when problems arise
  • Using multiple software tools to design and slice
  • Put your gcode on a sdcard to print, or later via octoprint

Every next print start at calibrate in above list.

What did you learn?
How your machine works and reacts.
Fix extruding problems, temperature, filament wetness, starting layers.
Difference between PLA, PETG, ABS in great detail.
Learn to wait
Troubleshooting in general

Never forget where we came from!
40 years old, but getting available to the masses after 2000.

Last night I recognised some people in the short movie “Dead on time (1983)”

While watching this movie on YouTube, I recognised several people in small roles. Most of them their first roles.
(I never knew about this short before last night)

It is the first (short) movie by Richard Curtis, a (now) famous writer/director. (Mr Bean, The Black Adder)
He only did “Not the nine O’clock News” before that.

Funny to see the young faces.

Many have worked together after this short.

I made a short incomplete link graph.

2D on a 3D printer, moving lab and designing

Not a lot to tell, but much going on.

Having my own business means having a more professional electronics lab is a must.
So I’m moving from the attic to our outside workshop. That also means I have to make our Music Studio smaller.

So moving, printing a lot on my new 3D printer and designing EuroCards.

Part of the Address decoding eurocard with din41612.

Above card will hold two address decodes parts, selectable using jumpers. ( Old skool TTL using 74xx and a new solution using ATF22V10.

We like Low Poly models, so I printed one using marble PLA.

In the back my 100yr old highhat from my Grandfather (moleskin)

I’ve cleaned my old 3D printer, and I am planning to convert this printer to a 2D plotter and a CNC machine.

I’ve already printed a pen holder and a dremel holder.
(The filament head will be removed)

I’m working on a Gcode writer to plot drawings using a pen, or using a Gyro-cut knife to cut paper.
And the biggest project using this old 3D printer, a CNC machine!

Test Code:

import time
import serial

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

# Motor stuff
arduino.write(str.encode("M84 X Y Z S12000\r\n"))
arduino.write(str.encode("M92 X160 Y160 Z800\r\n"))
# Extrude fix
arduino.write(str.encode("G92 E0\r\n"))
# Go home
arduino.write(str.encode("G28\r\n"))
# Move to x,y,z
arduino.write(str.encode("G1 Z90 X50 Y50\r\n"))
# Wait
arduino.write(str.encode("M400\r\n"))

Sin wave fun:

import time
import serial
import math
from time import sleep

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

arduino.write(str.encode("M84 X Y Z S12000\r\n")) 
arduino.write(str.encode("M92 X160 Y160 Z800\r\n")) 
arduino.write(str.encode("G92 E0\r\n")) 
arduino.write(str.encode("G28\r\n")) 
arduino.write(str.encode("M220 S100\r\n")) 
arduino.write(str.encode("G1 Z10 X60 Y60\r\n"))
arduino.write(str.encode("M400\r\n"))
sleep(10)
count = 0
while True:
	newx=(math.sin(math.radians(count))*50)+60
	newy=(math.cos(math.radians(count))*50)+60
	newz=(math.cos(math.radians(count))*10)+20
	count = count + 1
	mystring="G1 Z" + str(newz) + " X" + str(newx) + " Y" + str(newy) + "\r\n" 
	print(mystring) 
	arduino.write(str.encode(mystring)) 
	arduino.write(str.encode("M400\r\n")) 
        # Not waiting for answer yet
	print(newx) 
	sleep(0.1)	
X,Y and Z movement (4x speed)

Old and new chips SMD or THT?

I’ve got two friends who make old retro computers.

They like to use old chips and use only THT.

What is my take on this?

I like to use THT when possible. Exceptions are:

  • Size constrains
  • No THT parts available
  • New gadgets

Old versus new chip solutions

  • CPU : never a new alternative
    (I’m not going to replace a 6502 using Arduino emulation, for example)
  • Yes, I’m using static ram instead of dynamic
  • Address decoder using 74xx ? Yes, I want to test at least once.
    But using a ATF22v10 has my preference. (Not using GALs anymore)

I only replace with newer alternatives when it does NOT interfere with how a system is performing. CPU has its own quirks, also chips like the SID. I never emulate when it can be avoided.
Address decoding, RAM or ROM yes please 🙂
Old untrusted UV Eproms are sh*t. Give me the new flash-able alternatives any time

I can emulate everything, but I need real hardware.

  • Real 6502
  • Real 68000
  • Real 8088
  • Real 8086
  • Real 80386

I still want a real VGA monitor because I used to write VGA manipulation programs which only work on CRTs.

68000 Progress

UPDATE 20240927 PCBs are in

While testing on a breadboard is fast, I still want my 68000 on PCBs.

Breadboards are nice for testing, and I use them in the design stage.
But they will fail in the end.
Loose wires, oxidated contacts and alike.

So when I was testing using breadboard, I drew the schematics in KiCad.

I wanted to use Eurocards for this one. If I divide the whole system in system blocks, I can exchange and experiment parts.
(My 6502 uses another method to connect different cards)

  • CPU and Clock (Plus power-on reset and step mode)
  • Memory and ROM
  • Storage
  • Address decoding
  • Sound
  • IRQ Handlers
  • Led Blinkenlights 🙂

I wrote about Eurocards in the past.

So I’m using the VMEbus standard for my new design.
(Using the recently bought book I mentioned)

Backplane design is done. And currently being autorouted.

PowerLeds for 5 and 12V. On/Off switch and MOLEX power connector.

Kicad sources will be uploaded

Freerouter with in the background a part of the CPU Card I am redesigning.

In the past, I dumped my old eurocards and even a nice case I had.

UPDATE 20240927 PCBs are in

"If something is worth doing, it's worth overdoing."