Tuesday, June 10, 2025

Forester SJ double DIN face for a single DIN radio installation.

  I did install single din --Alpine ute 200 BT-- radio into double din slot. Here are the exact dimensions (designed using OpenSCAD) after some iterations for 2013 MY SJ Forester Double DIN face.

difference(){

cube([198.043,103.163,6.3501],center=true);

cube([170.254,96.791,6.3501],center=true);}




Sunday, June 01, 2025

99 MY SF5 Forester Tow Hitch Drain Plug Design with OpenSCAD

A very simple design for 99MY SF5 Forester hitch plug. I have printed one with PLA+ for fit test and it worked pretty well. Github link is over here as OpenSCAD code. 


Here is the stl file as well...




Thursday, May 29, 2025

Custom Nudge Bar

Custom OpenSCAD design for 98-99 MY SF5 Forester front bumper brush guard. 



For a long time, I've wanted to buy oem (kind of) nudge bar for my current Forester, something it doesn't have, but I haven't come across one anywhere. I tried to roughly design one using OpenSCAD. It seems to have worked out, but I haven't produced and tested it yet, so the dimensions might not be perfect. Nevertheless, it was a good practice to keep OpenSCAD skills current.
 

Wednesday, May 28, 2025

Fixing primary school classroom equipment

Our 3rd-grade teacher asked if we could repair sun-earth-moon model kit they used in class. Two gears of the device were missing and couldn't be obtained anywhere. So, we designed using OpenSCAD and produced two gears over the weekend and solved the problem. STL model can be found here(Github). Note: The fact that they were manufactured to the DIN 708 standard made things much easier. 

26 teeth spur gears 3d printed from PLA+ (Red ones)

OpenSCAD code to generate spur gears:  

spur_gear (modul=2, tooth_number=26, width=5, bore=8, pressure_angle=20, helix_angle=0, optimized=true);

Sunday, May 09, 2021

First Framebuffer to HDMI screen on PYNQ-Z1 Fpga board

 First framebuffer to HDMI on pynq-z1 board. 



Tuesday, May 23, 2017

Chaotic fractals of mandelbrot

f(z) = z^2 + C
where z is a complex number (vector)
and C is a complex constant (vector of a constant norm)

output from my Xcode project:


for(i=0; i <iter;i++){
        float x = (z.x * z.x - z.y * z.y) + c.x;
        float y = 2.0 * (z.x * z.y) + c.y;

if((x * x + y * y) > 40.0break//distance from the origin>2 ==> done!!
        z.x = x;
        z.y = y;

}
After 355 iterations:




PCB Inspector with pytrack

One of my friends gently asked me to help them on automatic inspection of PCBs (xray).

I used pytrack to investigate and report soldering failures (bad bubbles). 

# -*- coding: utf-8 -*-
# 07.05.2017
# porsuk
from __future__ import division, unicode_literals, print_function  # for compatibility with Python 2 and 3
import matplotlib as mpl
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from pandas import DataFrame, Series  # for convenience
from scipy import ndimage
from skimage import morphology, util, filters
import pims
import trackpy as tp
def crop(img):
    """
    Crop the image to select the region of interest
    """
    x_min = 20#745
    x_max = -25#850
    y_min = 50#225
    y_max = -250#300
    
    return img[y_min:y_max,x_min:x_max]
def rgb2gray(rgb):

    r, g, b = rgb[:,:,0], rgb[:,:,1], rgb[:,:,2]
    gray = 0.2989 * r + 0.5870 * g + 0.1140 * b

    return gray
def preprocess_pcb(img):
    img=rgb2gray(img)
    """
    Apply image processing functions to return a binary image
    """
    # Crop the pictures as for raw images.
    img = crop(img)
    print(img)
    # Apply thresholds
    img = filters.threshold_adaptive(img, 57)
    threshold = 0.9
    idx = img > img.max() * threshold
    idx2 = img < img.max() * threshold
    img[idx] = 0
    img[idx2] = 3
    img = ndimage.binary_dilation(img)
    img = ndimage.binary_dilation(img)
    return util.img_as_int(img)
frames = pims.ImageSequence('*.jpg',process_func=preprocess_pcb)
for frame in frames:
     f = tp.locate(frame, percentile=10,diameter=77, minmass= 3.0e+07,separation=80,threshold=1/30)
     print('frame = ',f['frame'][0] )
     print(f)
     print('max bubble percentage: ', 20 * max(f['size']) / 250 )
     plt.figure(f['frame'][0])  # make a new figure
     tp.annotate(f,frame,plot_style={'markersize':35});

DIY 4-way vacuum valve to engage 4wd(subaru justy oem 4wd valve failure)




 Broken oem 4-way valve: Tried epoxy but did not fixed it. Actually epoxy sealed the vacuum leak but most probably solenoid was gone.

Monday, May 22, 2017

DIY forester rear wheel bearing replacement

was very ezy and straight forward except breaking the brake line (obtain propper wrench to loose yours). Bleeding alone may be another challenge but i used pipe and bottle method w/o any problem.





 final and true drum brake instrument re-installation (above pics was taken during unsuccessful attempts):



 Thanx to helpful machinist for installing new bearing in press. (so DIY except pressing)

 ready to install:


91 MY LN130 Hilux Surf A/C Condenser Relocation

Relocation of the underslung a/c condenser of hilux surf to in front of the radiator. 
Tested against highway and city speeds w/o any increase in coolant temp. btw oem rad. fan re-wired in-order to start manually. and always kicked on city speeds. But not sure if needed to start or not since i did not installed digi temp gauge so i was  monitoring just analog oem one. At the end, it was a successful project. Could be better if i had alu welder.
But for those thinking about carrying the a/c condenser to behind of the grill, i can exactly say that suspicious ln130 radiator was not blocked (to overheat) by the a/c condenser.







DIY 2nd Gen 4runner (Hilux Surf) grab handle installation

91 MY 2nd gen 4runner (ln130 hilux surf actually) front driver and passenger side vertical grab handle installation:
1 - nice front prado grab handles from wrecker.
2 - back grab handles from 98MY vx80.
3 - M6 15mm alu rivet nuts. The only option was novus from bauhaus.
4 - 9mm drill bit.
5 - pictures tell the remaining. (btw my homemade rivet nut installation tool worked great for me)

was great fun...