Single MOC3011 optocoupler triggers two SCRs.
Single MOC3011 optocoupler triggers two SCRs.


Student-Hobbyist Electronics Projects Tutorials

by Lewis Loflin


Introduction - The purpose of these pages is to introduce the student and hobbyist to electronics projects.

I've been a part-time adjunct professor at a local community college teaching electricity and electronics.

Today I do this for the shear love of electronics.

I have 50 years experience in electronics, from vacuum tubes to modern solid state and industrial controls. I tend to teach from a general science viewpoint.

This site has been up for about 20 years and covers a number of subjects broadly how to use the Arduino microcontroller and semiconductor components such as transistors, MOSFETs Zener diodes, op-amps, etc.

These are presented as information only - you assume all risk. Most voltages are under 24-volts. Read this safety warning.

See my You Tube Videos page lists the over 206 videos on My YouTube Channel.

Here are quick navigation to the many parts I cover. These build on each other.

IR2110 High Voltage H-Bridge Driver
IR2110 High Voltage H-Bridge Driver
Click image for larger view.


H-Bridge Motor Controls

An H-Bridge, in general, is a 4-switch (often a type of transistor) circuit used to control the direction of a permanent magnet DC motor. Through the use of a microcontroller, speed and direction can be controlled.


Videos:
Arduino CCS H-Bridge with Large DC Motor
Program Code Arduino CCS H-Bridge Motor Control


Switching circuit example.


Transistors used in these Projects

I present many transistor tutorials, including testing and comparing devices.

There are broadly two transistor types: MOSFET and bipolar. There is a third type known as an IGBT, a hybrid of MOSFET and bipolar. Another subtype of the bipolar transistor is the Darlington, used for high power gain.

There are important differences besides varying voltage and current ratings. Their operation differs: a MOSFET is voltage controlled; a bipolar transistor is current controlled.

An IGBT is voltage-controlled but acts as a bipolar transistor. We explore these circuits in detail.


TC4420 based h-bridge circuit.


Transistor Driver Circuits

Broadly using low-voltage digital controls often can't directly operate high voltage and high power transistor circuits. So we use various forms of driver circuits.

Small transistors can drive larger transistors. Opto-couplers can provide voltage isolation and can drive other transistors. We have circuits such as the TC4420 integrated circuits that can do both.

There is a separate section on optocoupler circuits below.


ATX power supplies.
Test Reuse Surplus Personal PC Power Supplies

Power Supplies

Power supplies come in three types for the hobbyist: build, buy, or salvage. I address all of this.



Safety issues:


Switching Power Supplies


Opto-Coupler SCR and Triac Circuits

SCRs and Triacs are used to control AC and DC power systems. With a microcontroller such as Arduino using a zero-crossing can control AC power to control light levels, AC motor speed, and resistive heating elements..


Click here. Optocoupler list continues below.

A zero-crossing detector produces a pulse at the beginning of every half-cycle in an AC sine wave. For 60Hz, this is 120 pulses per second. Then we use a microcontroller to phase control the power.


Flashtube test setup with HV power supply.
My experimental flashtube test setup.

Xenon photoflash tubes create a bright flash in cameras, strobe lights, etc., in conjunction with SCR, SIDAC, and DIAC circuits.

Caution: xenon flash tubes are high-voltage devices, often 300V DC.


LM317 power constant current control.
LM317 power constant current control.


Constant Current or Current Limiter Circuits

The TL431A, The LM317, and LM334 are power and inexpensive current regulators used for lighting LEDs, controlling battery charger current, etc.

The LM317 and related parts are used in low-voltage DC power supplies.

New January 2024.


For YouTube videos on this section see My You-Tube Electronics Videos


Video: Arduino Battery Charger uses CCS and TL431 Comparators



SN74HC14 based square wave generator with differentiator circuit.
SN74HC14 based square wave generator with differentiator circuit.





Arduino Microcontroller Projects presents many tested projects and examples for Arduino. The emphasis is hardware control which suggests one has an electronics background. Having a background in digital logic and binary code is also helpful. The projects will explain this as needed.

What differs here is I avoid the use of Arduino-only code and code libraries to port the basic code algorithm to Python, PICAXE basic, or Microchip PIC C.

See Arduino Projects Hobby Projects Tutorials.


Hall Effect sensor are used in many modern application in the gas and electric vehicles, motors, and industrial controls. They are fun to use and knowledge of this device is essential in modern electronics.

All Hall sensors have an analog (ratiometric) voltage proportional to magnetic flux level. When combined with comparator circuits can form a Hall switch used in digital and computer control applications.


The Schmitt triggers used here are based on an analog comparator. These can use operational amplifiers (op-amps) such as the LM358 or LM741.

Or one can use the LM311 comparator or LM339 quad comparator. They have open collector outputs unlike the LM358 or LM741 op-amps.

A comparator "compares" two analog voltages and turns on-off based on their voltage levels.

Often considered "digital" at this point, we have, in reality, a one-bit analog-to-digital converter.


Microchip PIC Projects PIC18F2550, PIC16F628A, PIC12F683

Major updates 7-30-2024.

The website has been here almost 20 years and the entire Microchip PIC section is being updated. This is due to obsolete parts used in the projects, plus the addition of using PIC Basic Pro. I'll use the student edition combined with assembly routines.

Also included in that section is assembly language projects for the PIC PIC16F628A and PIC12F683. While cheap and versatile controllers there's a steep learning curve in using assembly.

Introduction to PIC12F683 Programming

Start here: Introduction PIC12F683 Programming Circuits Tutorial

I own and have used the K150 programmer and the Velleman K8048 PIC Development Board.

The Velleman K8048 PIC Development Board is available from Amazon. It requires assembly (soldering) and uses a standard PC serial port (or USB adaptor), plus a 15-volt power supply is not included. It will program 8, 16, 18, and 28-pin PIC controllers.

Need help or have questions email me at lewis@bvu.net.

The PICAXE Microcontroller I use is the medium-range PICAXE-18M2. While built hardware-wise on a Microchip PIC controller, it has an easy-to-learn built-in proprietary basic. PICAXE is for students rather than serious, commercial applications.

I will no longer use PICAXE but Microchip PIC controllers.

Raspberry Pi to Arduino interface.
Raspberry Pi to Arduino interface.


The Raspberry Pi can be programmed in Python like a Linux PC, or in C. I prefer C.

The operating system is often Debian Linux, which is also used for a Linux PC. The Openbox Desktop is used in both.

Because most computers today don't have hardware printer ports the following sections are for reference. Programming can overlap Raspberry Pi.

Light Fast Linux Desktops with Openbox, JWM. Still useful for PCs and Raspberry Pi.

The following is useful for C programming examples using electronic hardware.

Python Programming PC Printer Port Hardware Interfacing. Uses Python and obsolete Linux distribution, info only.

Ebay search "Electronics Component Basic Kit". Many component starter kits from $16 to $25.


Popular Webpages & Corresponding Videos



Misc. opto circuits.


Web site Copyright Lewis Loflin, All rights reserved.
If using this material on another site, please provide a link back to my site.