Tuesday, November 28, 2017

V කටුවෙන් ඔරලෝසු කැටයමක්

කැටයම කැපුවේ CNC මැෂිමෙන් ප්ලයිවුඩ් කෑල්ලක 


V කටුවෙන් තවත් කැටයම්

කොස් ලීයක CNC මැෂිමෙන් කැපුවේ

මේ රූපය තමයි මැෂිමට දුන්නේ

Sunday, November 26, 2017

V කටුවෙන් කපපු ලී කැටයමක්

V හැඩයේ කටුවක් පාවිච්චි කරලා කොස් ලීයක, CNC මැෂිමෙන් කපපු කැටයමක්. කටුව යන්න ඕන පාර හොයාගත්තේ මේ මෘදුකාංගයෙන්. මේ මැෂිමෙන් තමයි කැපුවේ.



මේ තියෙන්නෙ වැඩේට මූලික වෙච්ච රූපය.

V කටුව

දියසායම් සිතුවමක්


මේක තමයි හරිම එක.

ඉලෙක්ට්‍රොනික කලාව




Tuesday, November 21, 2017

My First Cutting Board

This cutting board was made of Teak wood.

3/4 x 3/4 x 6 inch pieces

Ready to apply wood glue

Sanding, sanding and sanding and finishing

Monday, November 20, 2017

My Homemade CNC version 3 driven by LinuxCNC and TB6560 Drivers

This is the 3rd version of my home made CNC machine. See version 2. Cutting area is about 48 x 36 x 2 in.




















How Others Did
Dumidu made his own version using aluminum box bars.


Tuesday, November 14, 2017

PIC 12F675 based Solar Battery Charger

This circuit was build to control charging/discharging of a solar powered battery. A 12F675 monitors the battery voltage through an ADC channel and connects/disconnects solar panel and the load to avoid over charging and over discharging the battery.
An LED connected to the micro controller indicates the state of the battery. When the battery is fully charged (>13v) it blinks in long pulses (2s) and the solar panel is disconnected. When the battery is charging i.e. 12.3v to 13v short pulses about 200ms in each 2s. When the voltage drops below 12.3v the load is disconnected from the battery and LED is blinked  two 25ms pulses in each 2s interval.
But there is an issue with this circuit. When the load is connected while the battery is charged to say 12.5v, battery voltage suddenly drops below 12.3v due to current demand from the load and the internal resistance. Open circuit voltage of a battery is not what you get while running. When the load is disconnected, voltage goes back to the original value. This causes the circuit to take false decision and disconnect the load, then voltage restores and the load is connected back... endless loop. This can be avoided if we can detect when the load (say home lighting system) is taking current. A current sense resistor can be used for this. At that time program should use somewhat lower voltage to determine the 'low battery' state.




Note that the solar panel is connected through a  normally closed relay pins and the load connected through normally open pins.

---------------------------------------------------------------------------------------------------
Program (HiTec-C)

#include 
#include 

__CONFIG(UNPROTECT & WDTDIS & BORDIS & MCLRDIS & PWRTDIS & WDTDIS & INTIO); 

#define _XTAL_FREQ 4000000

void init()
{
    TRISIO = 0b00000001; 
    CMCON = 0b00000111; // Comparator Off
    ADCON0 = 0b10000001; // Ref = Vdd, Chan = 0, AD = On
    ANSEL = 0b01010001; // FOSC/16
    __delay_us(30); // Acquisition Delay Min 20 uSec
}

int read_adc()
{
    unsigned int n;
    GODONE = 1; // Start conversion
    while(GODONE); // wait for done
    n = (unsigned int)ADRESH << 8 | ADRESL;
    return n;
}

void delay_ms(int n)
{
    while (n-- > 0)
        __delay_ms(1);
}

void FlashLED(int delay, int count)
{
    while (count-- > 0)
    {
        GPIO2 = 1;
        delay_ms(delay);
        GPIO2 = 0;
        delay_ms(delay);
    }
}

void main(void)
{
    init();

    GPIO1 = 0;
    GPIO5 = 0;

    FlashLED(1000, 1);

    while (1)
    {
        unsigned int t;
        int bCharging;
        int bReady;

        t = read_adc();
 
        // Note: adjust following magic numbers according to your setup.
 
        // Battery Level High
        if (t > 900)
        {
            GPIO5 = 1; // stop charging
            bCharging = 0;
        }
        else if (t < 860)
        {
            GPIO5 = 0; // charging
            bCharging = 1;
        }
 
        // Battery Level Low
        if (t < 750)
        {
            bReady = 0; // battery is discharged a lot
            GPIO1 = 0; // disconnect the load
            delay_ms(30000);
        }
        else if (t > 770)
        {
            GPIO1 = 1; // battery ready for working
            bReady = 1;
        }

        if (bCharging == 0) // > 13v
            FlashLED(2000, 1);
        else if (bReady == 1) // > 12.3v 
            FlashLED(200, 1);
        else if (bReady == 0) // < 12.3v
            FlashLED(25, 2);

        delay_ms(2000);
    }
}


Monday, November 13, 2017

A Quick Weekend Project

This mortar is made of teak wood. Took about 3 hrs.

Octagonal shape is planned using hand planner


Drilled lot of holes on the top with a 3/8" bit. Removed rest of the material with a chisel.




Sanded

With first coat of varnish

Sunday, November 12, 2017

My Homemade CNC version 2 with USB Driven PIC16F877A Driver



This is the second version of my CNC machine that is capable of cutting plywood. (see version 1)

Skate bearings on L-Iron bars




Home made mechanical encoders. I later removed these and made the system open loop.

The controller software

PSU, Stepper Drivers and PIC






Sketchup Models

X-Axis (bed)

Y-Axis

Y-axis with Z-axis motor attached

Z-axis and router

Components


  • 3A Stepper motors (280 oz-in I guess)
  • Cheap TB6560 stepper drivers 24V-3A
  • Thread bars and double nuts
  • Skate bearings
  • 24V 10A SMPS
  • CP210x USB-TTL module.
  • Homemade Firmware (CCS-C) and driver program (VC++)
  • PIC16F877A (more than enough)
  • 1/4 inch Trim router + 2mm HSS end mill + V-bit