DC load for our STEM lab

Other than oscilloscope Programmable DC Load are the most important device in any STEM lab. It was used in many testing and troubleshooting of power related equipment for example power supply, solar panel and batteries. But it would cost you a lot of money to get a precision one. So we have decide to built one from scratch. Start with simple circuit only 2 component. we will built up our circuit from there. After spending hours in front of scope try to get what is the best setting not to burn our mosfet here is what we get.

At first attempt. We found that our stock mosfet IRL3302 are not design to handle linear (saturation) current very well continuously. It was design to be use in switching mode which (below 10ms pulse). Mosfet tend to heating up so fast even with significantly low current 2A at 9V. In the world of DC load 2A is consider low since the your target is 5A at 30V or 150W at least.

Next step we try to vary the input and capture the outcome from the scope. Probe A of oscilloscope are connected to pulse generator at 10kHz pwm with duty around 30% and connected directly to Gate pin of our mosfet. 
here is the basic setting of our pulse gen.
Freq: 31Khz
Duty: 50% 
Amplitude: 5V (from 0v )

From the picture above blue line shows the input of the pulse. The red line shows the current Ids (we tap the second channel of our scope to 1 ohm resistor. So theoretically we get 1.0V every 1.0A of Ids. By using the pulse we significantly reduce the amount of heat produce by mosfet. Around 37 deg C for 5 minute of running time. The load resistor temp increase up to 70 deg C.

 Mosfet temperature reading

Load resistor temperature reading

The second problem of our circuit is the output of mosfet is ringing and avalanche energy from inductive load (wire-wound load resistor) could damage the mosfet. As you can see in the scope below there are spike around 50uS before settle at the targeted amperage on falling and rising edge. 

RC Snubber will be added in parallel to the output of mosfet between drain and source. in order to reduce the ringing effect. here is the formula we use to calculate the value of capacitance and resistance. 

where Fp is ringing frequency you get from scope, Cp is parasitic capacitance can be refer as Coss from data sheet as shown below.

 to be continue.. (problem with my scope - after updating to PicoScope6_r6_14_4.exe)

WDC 65C02

W65C02SXB - Single Board Computer By WDC

We decide to move ahead by stepping inside to the best MPU ever created by human. If not mistaken the first schematic are made by hand. (there is no computer back then). Just amaze how solid and powerful of logic and digital knowledge they have to get there. Remember that before Apple 1 there is no "personal computer" term. Never. The 6502 create by Chuck Peddle and Bill Mensch (mastermid of 6800 MPU by motorola) .  This microprocessor gained popularity because it was low price and became the hearts of some early personal computers including Apple II and Commodore 64COMDEX 96 honored the 6502 as the first of only seven microprocessors having the most impact on the Information Technology industry over the previous 25 years. Mr. Mensch, WDC’s Founder, was a recipient of this prestigious award on behalf of the 6502. The 65C02 is a low cost, general-purpose 8-bit microprocessor (8-bit registers and data bus) with a 16-bit program counter and address bus. The variable length instruction set and manually optimized core size are intended to make the 65C02 well suited for low power system-on-chip (SoC) designs. The first 6502 was introduced around 1975. If you wish to learn computer science deep into assembly and machine coding. This is the must have mpu in your lab. 

The following is a list of some of the pioneering products that the 65xx technology is remembered for:

Commodore KIM–1 Single Board Computer
Personal Computers    Apple II, Apple IIc, Apple IIe and Apple IIgs
    BBC Acorn Computer , Commodore PET, VIC20.

Video Games 
    Atari, Nintendo, Super Nintendo
    Hand–Held Electronic Publishing
    Franklin 's Digital Book System

    Rockwell modems
    General Instrument analog set–top boxes
    Micronas closed caption digital TV chip sets

    Micronas dashboard controllers

    Embedded Microprocessor Defibrillator’s

Introduction and Features
The W65C02SXB is an educational and industrial strength Engineering Development System based around the world renowned W65C02S 8-bit microprocessor.

With its vast, I/O provided by the on board W65C22 VIA, W65C21 PIA, and W65C51 ACIA peripheral ports the W65C02SXB provides the user with easy access to the vast flexibility while providing an open faced platform for teaching the relationship between Microprocessors and Peripheral IC’s. Students can explore I/O components and how to control them by applying real world Electrical Engineering principles. These principles will allow students to understand technology at a level which spans across all technologies.

All of the SXBs have built-in 32K bytes of SRAM for program and data storage and 128K bytes of FLASH memory organized as 32K byte blocks for easy switching between applications, tasks, or saving precious data. Unlike the Apple, Commodore, and Atari systems, no floppy or hard drive is needed. You are free to use the low power solid state memory in ways you only might have dreamed of before.

The FLASH can be written right in the socket or pre-programmed in a FLASH chip programmer. The memory contained in these small boards are equal to or greater than the memory of some of your favorite legacy systems that used the 6502 microprocessor.

*Source http://www.westerndesigncenter.com

W65C02SXB Tutorial 

We decide to make  step by step guide on how to setup this board. Yup nothing better than "hello world" by blinking of LED. The code are base on David Gray example "SIM_8LED_CCAH.asm". This is real challenge even if you are computer nerd and it took us 5 hour just to make this board blink. Actually they are not that tough and pretty simple. But we take wrong direction just for first 4 hour.

Before we go further please remember this guide are base on our computer setup as below
-Windows 10 (64Bit)
-Intel i5(7th gen)
-Ram 8GB

Step 1.
 Download WDCTools  2.1  (fill the form and they will send tools by email) and install the tools on drive C:/wdc

Step 2
Now take a look at TIDE.exe normally place inside --->  C:\wdc\Tools\bin. Before you click open TIDE (Terbium IDE ) make sure that you are running on compatibility mode. How to do that? Right click>properties>compatibility... set as below

Step 3
Do the same step on WDCDB.exe (Debuger and simulator).  The application that you watch in my video above.

Step 4
follow this video by WDC