Saturday, March 3, 2018

Eagle CAD Quick Tip | How to remove unwanted copper pour

Beautify your PCB with this quick tip. A short video on how to remove unwanted copper pour around some traces in Eagle CAD without increasing the clearance between tracks.



Friday, March 2, 2018

Cheap and powerful 50 cents microcontroller | EFM8 Family

This is a step-by-step tutorial on how to setup and program an EFM8BB10F8G-A microcontroller or any other EFM8 Busy Bee microcontroller family from Silicon Labs. It is assumed that the reader knows the C programming language and basics about microcontrollers.
EFM8 Busy Bee microcontroller family from Silicon Labs
Why would you want to learn to use another microcontroller when there are many tutorials and libraries on popular MCU's such as AVR and PIC? Well, because they are much more cheaper but performant nonetheless - on Farnell you can buy them for less than 50 cents - and also are pre-programed with a bootloader making easy to program them using any USB to serial converter.  Compare that to Attiny13A which is around the same price but with half the pin count, less speed and peripherals. Just see the features bellow.

Thursday, February 1, 2018

How to build your own USB to UART serial converter using FT232 with voltage level shifting

The board includes 500mA fuse protection, EMI filtering, power LED indicator, RX and TX LED indicators, and a voltage level shifter that makes it compatible with 3.3V and 5V boards. This way you don't need to check the jumper if it outputs 5 or 3.3V so you don't risk burning your microcontroller. It works with both voltages.

Update: 2024, March, 6: I made another serial adapter build around FT231 which require less components since it is 5V tolerant and is also cheaper. It is part of a development board: https://www.programming-electronics-diy.xyz/2023/06/breadboard-development-board-for-avr.html#USB_Interface.


USB to UART serial converter board tutorial DIY home build


Wednesday, January 24, 2018

EAGLE CAD Tips | How to Add Custom Image Logo to Your PCB

Adding a custom image logo to your PCB can make your project look more professional. In the following video I will demonstrate how you can quick and easy import an image in Eagle CAD and place it on your PCB. You can place graphics on copper layers to be etched or on silkscreen to be printed.

In this video I show as an example a USB to UART board. Eagle expects a Bitmap image with less than 256 color depth.The text image was made in Inkscape and since Inkscape can't export Bitmap (.bmp), I exported the image as PNG, then using IrfanView I lowered the color depth to 2 colors and saved as Bitmap.




Saturday, October 28, 2017

How to use A4988 stepper motor driver module tutorial

A4988 stepper motor driver module

This driver can be used to easily control a bipolar stepper motor or a uni-polar stepper connected in a bipolar mode. Can output up to 2A per phase (with a heatsink) and works with motor voltages from 8 to 35 volts.

  • Simple step and direction control interface
  • Five different step resolutions: full-step, half-step, quarter-step, eighth-step, and sixteenth-step
  • Adjustable current control lets you set the maximum current output with a potentiometer, which lets you use voltages above your stepper motor’s rated voltage to achieve higher step rates
  • Intelligent chopping control that automatically selects the correct current decay mode (fast decay or slow decay)
  • Over-temperature thermal shutdown, under-voltage lockout, and crossover-current protection
  • Short-to-ground and shorted-load protection

A4988 and Nema17

Library for A4988 stepper motor driver using timer interrupt

Update 4, October, 2023: I have made a new library for controlling stepper motor drivers that supports multiple motors and has a better acceleration algorithm. It can also coordinate xyz steppers.

This library is designed for AVR ATmega328 microcontroller, but with few adjustments can work with any AVR microcontroller with at least 3-4 Kb of flash program memory.
At the moment only one motor is supported.

Features

  • the interrupt can be triggered by Timer0 or Timer1
  • automatic microstepping mode selection
  • can work with constant and very low speeds
  • accelerated speed mode, with separate acceleration and deceleration settings
  • can work with only one pin of the microcontroller if the rest are hardwired

Nema 17 Bipolar Stepper Motor

Characteristics:


Features
Program Memory
Data Memory (SRAM)
All enabled
3552 bytes
40 bytes
Acceleration, no microstepping
3088 bytes
40 bytes
Microstepping, no acceleration
2104 bytes
14 bytes
No microstepping, no acceleration
1724 bytes
12 bytes

Compiled using avr-gcc (WinAVR 20100110) 4.3.3 and -Os optimization level and MATH_LIB = -lm.
If MATH_LIB = -lm is commented out in Make file, the memory with all functions enabled is 6520 bytes program and 304 bytes data memory.So allways uncomment MATH_LIB = -lm.


Saturday, June 24, 2017

Homemade Cheap ESD Safe Electronics Storage Box

Storing and finding electronic components can be a pain. I tried many solutions over the years until I found a solution that suits my needs - making boxes from 2mm plastic sheets. The cost is very low and can be made in whatever sizes you need.

Electronics storage box diy 1