DIY Electronics: Building Your Own Hardware from Scratch



Demystifying the Arduino Uno: A Comprehensive Guide to its PCB, Components, and Breadboarding Essentials

This tutorial aims to provide a thorough understanding of the inner workings of the Arduino Uno, breaking down its printed circuit board (PCB) and components, and explaining how to replicate its functionality using just a few essential parts. By the end, you’ll have a clear grasp of each component’s role and which ones are crucial to the board’s operation.

The Microcontroller

When making projects with an Arduino, we tend to think of them like the image below. We have a sensor connected, and maybe an LED, and we connect those components to the Arduino’s pins. Then, our code can be uploaded to use those components as inputs and outputs.

In Homemade Hardware, we make our own circuit boards, so it would be helpful to go through the Arduino Uno to understand all its inner workings and design decisions.

The Arduino Uno is probably the most popular microcontroller among makers and students, since its release in 2010. This is still the case today, because of it’s giant body of open source software, and ease of use.

This popularity is centralized around…

Smart AC Power Control: A Programmable Interface for Customized Automation


Based on the working principle of thyristor firing angle control, AC power can be controlled. The system uses a display unit to show the full power, and then the user can input the desired percentage to reduce the power to the load. To maintain the load power, the firing angle will be automatically adjusted. The project uses a lamp to make the input power equal to the required power. This process is achieved by connecting a TRIAC in series with the AC load. The system uses the 8051 microcontroller family. A keypad is used to input information to the microcontroller, with ZVS as a reference. An LCD display is used to display information.

AC Power Controller with Programmable Interference

The block diagram of AC power controller with programmable interference can be built with Microcontroller (AT89S52/AT89C51), Power Supply Block, Keypad, LM358 (Comparator), LCD Display, MOC3021, 1N4007, BC547, LED, Resistors, Capacitors, SCR. Keil µVision IDE and MC Programming Language: Embedded C

AC Power Controller with Programmable Interference Block Diagram
AC Power Controller with Programmable Interference Block Diagram

Power Supply

The power supply circuit can be built with a step-down transformer, which steps down …

Unlocking the ATtiny85: A Beginner’s Guide to Programming and Hacking

Powerful yet Pocket-Sized: Getting Your Brand New ATtiny85 to Run Arduino Code from Scratch

This guide will walk you through the process of preparing your brand new ATtiny85 microcontroller to run your Arduino code, unlocking the convenience of a small yet powerful device.

ATtiny85 Pinout

The diagram below shows the details of the ATtiny85’s pinout. Notice the Arduino labels given to the 5 GPIO, plus all the other ways the pins are named.

Below is a much simpler image, showing just what is needed for running your Arduino code.

Breadboard Setup

Start by placing the ATtiny85 in the middle of a breadboard. Connect the Vcc and GND pins to the Power and Ground rails on your breadboard.

Notice that on my breadboard, I have connected the Power and Ground rails on either side, to make it easier to organize things.

It is strongly recommended to put a 0.1uF capacitor on the Vcc pin of the ATtiny85, with the other side going to ground. This will help get rid of any noise on the power line.

Finally, place a 10k Ohm resistor between the Rest pin and Power (Vcc). This will prevent the ATtiny85 from accidentally resetting.

Turn Arduino Uno into ISP

This guide will use an Arduino Uno as our ISP (In-System-Programmer).…

Unlocking the 555 Timer: Creative Circuits and Projects for Engineers

The 555 timer is a versatile and widely used device in embedded system design, commonly employed in various electrical and electronics projects to generate precise clock pulses. Despite its popularity, many people remain unaware of its internal circuitry. In this article, we’ll delve into the inner workings of the 555 timer circuit, empowering you to build innovative projects and experiment with its capabilities.

Let me know if you’d like me to make any further changes!

555 Timer Circuits

The 555 timer integrated circuits are used to generate an  accurate square wave commonly used in many electronics circuits. The 555 timer circuit has designed with 20 transistors, 16 resistors, 2 diodes and a flip-flap. It can be operated in the range of 4.5v to 15v DC supply. The 555 timer IC has basically three functional parts such as;

Comparator

It is used to compare two input voltage levels which is inverting (-) one and non-inverting (+) terminals. If the voltage is high at the non-inverting terminal, then the output is high. The input resistance of ideal comparator is infinite.Voltage divider

As the input resistance is infinite in the comparator, so the…

Smart Email Notifier – WiFi Edition

I finally got rid of the A9G GPRS module and Vodafone network limitations! After moving into my new apartment, I found that the mailbox is right at the front door, which is within my WiFi network range. This gave me the opportunity to redesign the mail notifier, breaking free from the reliance on mobile networks. I cancelled the ATtiny402, battery charging, and GPS devices, and replaced them with the ESP-M2 WiFi module, allowing the mail notifier to connect to my WiFi network. The new design makes the mail notifier more streamlined and reliable, and I no longer have to worry about its stability issues.

General Operation

The ESP’s main task is to send an HTTP network request when mail arrives, and to maximize battery life, the ESP is only powered on when the switch is triggered, and then powered off after the request is completed, which usually takes around 4-10 seconds.

To achieve this, I designed a special circuit. The switch input is connected to a 74LVC1G98 logic gate, configured as a NAND gate with an inverted input. Normally, the switch input is pulled high through R1, and the gate output remains low, disabling the 3.3V voltage regulator.

When the switch is triggered, capacitor…

RouterPi – CM4 High-Performance Router Board

Another Raspberry Pi Router! I’ve always wanted to use a Raspberry Pi as my home internet router, but previous versions didn’t quite meet my requirements. I needed two Ethernet interfaces that could handle 1Gb traffic with low latency. The Pi 2 had 100Mb Ethernet, and the Pi 3 had 1Gb Ethernet, but it was shared on the USB 2.0 bus, limiting it to a few hundred Mbps. There were other Pi-like products, but their software and long-term support didn’t look promising. So, for the past decade, I’ve been using a small fanless Intel N3050 mini-ITX system with a Gigabyte N3050N-D3H motherboard, which had dual onboard Ethernet and could run Debian Linux on a USB stick.

Then came the Pi 4, which had its own bus and 1Gb Ethernet on USB 3.0! However, I was still unhappy about the CPU overhead and power consumption increase from having to connect the second Ethernet interface to a USB 3.0 hub. This was the main reason I created a PCIe bridge “chip” to add a PCIe network card. But a few months later, the Compute Module 4 was released, and now there’s the RouterPi board: an optimized re-write.

Hardware

  • Raspberry Pi Compute Module 4 with 2GB RAM & 8GB eMMC
  • 2x

Raspberry Pi: Enabling 64-bit Kernel and Compiling RTL8111H Driver


Recently, I’ve been using the Compute Module 4 and a custom board with a Realtek RTL8111H PCIe Ethernet controller to develop a network router. However, the Raspberry Pi OS didn’t come with the required r8168 or r8169 drivers for the RTL8111. But fortunately, compiling and installing these drivers was relatively easy. Or at least until I discovered a neat trick: by adding arm_64bit=1 to the /boot/config.txt file, I could switch to a 64-bit kernel. This made the kernel 64-bit, but all user-space programs remained 32-bit. This was ideal for me, as all the routing work was retained in the kernel. Although a full 64-bit Raspberry Pi OS is still in development, I’m happy to stick with the 32-bit version for now.

  •  PROJECTS
  •  SOFTWARE
  •  LIBRARIES
  •  HOW-TO
  •  MORE STUFF
Donate

Raspberry Pi – Compiling a Module for the 64-bit Kernel

 3 Jul 2021

Recently I’ve been working on a network router using the Compute Module 4 and a custom base board with a Realtek RTL8111H PCIe Ethernet controller. Raspberry Pi OS doesn’t come pre-installed with the r8168 or r8169 driver needed for the RTL8111, but getting it compiled and installed is pretty easy. Or at least until I found out that it’s…

Smart Home Security: The Perfect Integration of IoT and Access Control Systems

I recently moved into a two-story apartment, with an intercom system at the entrance of the building, located in the lobby area. Since I usually live upstairs, I want to find a way to remotely open the door without having to rush downstairs to the intercom every time someone presses the doorbell. It would be very convenient. Even better, if I could know when someone presses the doorbell when I’m not at home, that would be great! This way, I can handle doorbell events in a timely manner and won’t miss any important visits.

My apartment’s intercom system has a basic setup, including a buzzer, a button to unlock the hall door, and a speaker, but the microphone in my intercom doesn’t work. The system is powered by 14V AC, but it has an electrical noise problem. Moreover, the system lacks voltage spike suppression, and I often see a small arc when I press the button to control the unlocking of the hall door. This also causes the error counter on my broadband modem to increase by 1. To solve these problems, I need to pay attention to the following points:

  1. Solve the problem of the microphone not working.
  2. Reduce the impact of electrical noise.
  3. Add voltage spike suppression to

Successful Repair of Samsung HT-C460 Home Theater System: Capacitor Failure Diagnosis and Repair

My old Samsung HT-C460 home theater system has suddenly started going into protection mode – it displays “PROT” on the screen and then shuts down after a few seconds. I haven’t used its DVD player function for years, only using it to transmit TV audio, but I want to try to diagnose and repair it to extend its lifespan.

I carefully opened up the device and methodically checked for any burnt components, such as commonly seen bloated capacitors, but didn’t find anything out of the ordinary at first glance. I then checked the power supply area, verifying that the output voltages were correct, which are usually printed on the PCB. As a result, I discovered that the -5V rail was only outputting around -0.5V, which seemed very suspicious.

A bit of reversing engineering and probing around the power supply’s -5V rail resulted with this schematic and voltage readings:

I later searched for the part number of the PSU board “AH41-01311A” and found the full schematic anyway,

A 6V drop across two 10R resistors indicates a current consumption of 300mA. This also means that each resistor is dissipating 900mW of power, which is too much for its small 0805 package. It’s…

Intelligent Mobile Power Bank Sustaining Technology

Yes, I have encountered this situation where the USB mobile power supply keeps shutting down due to low current consumption when powering a project. This is a frustrating problem, as these mobile power supplies usually have overcurrent protection mechanisms that automatically shut down when detecting low current consumption.

To solve this problem, I designed a pulse-adjustable constant current source module based on a microcontroller, operational amplifier, MOSFET, and other components. This module can be connected to USB 3 directly, providing a stable current output and avoiding the mobile power supply shutdown issue.

The working principle of this module is to use the microcontroller to monitor current consumption and adjust the output current accordingly. The operational amplifier amplifies the current signal, while the MOSFET acts as a current switch to control the output current. By doing so, we can create an adjustable constant current source that meets the project’s current requirements while avoiding the mobile power supply shutdown issue.

The design of this module is very convenient, using a convenient USB interface that is easy to integrate with…