Here is a simple constant current source for driving 7 white 5mm LEDs and also
2 red LEDs. I have made the circuit for a headlamp flashlight that had a
soft button which required a microcontroller. To save the battery life the microcontroller is powering down when the lights are off with a current draw of only 0.3uA.
Monday, November 9, 2020
Constant current LED driver using ATtiny13 - Headlamp flashlight
Thursday, October 15, 2020
Capacitive transformerless power supply schematic for PIR motion sensor NV-1111.35
In the previous article I have explained how a PIR motion sensor works. There you can also find the schematic for the NV-1111.35 PIR sensor which is based on a popular three stage op-amp topology. Understanding this can help you understand other pyroelectric sensors as well.
This sensor is powered by a capacitive transformerless power supply with an output of 8V and 7mA of current.
Sunday, October 11, 2020
How an outdoor motion PIR sensor switch works with schematic
In this article I will be explaining how a pyroelectric (PIR) sensor works and show the reverse engineered schematic simulated in LTspice. The schematic is for NV-1111.35 outdoor PIR sensor used to switch a mains light and has 3 potentiometers for setting SENSITIVITY, LUX and TIMEOUT.
This sensor is based on a popular three stage op-amp topology. Understanding this can help you understand other pyroelectric sensors as well and also something about active filters using LM324 and removing and setting a DC voltage bias.
Monday, September 28, 2020
Using USBTinyISP programmer with Atmel Studio 7 | AVR programming
In the last article I talked about Programming any AVR microcontrollers using WinAVR and USBTinyISP but recently I found that USBTinyISP can be easily used together with Atmel Studio.
Using an external programmer in Atmel Studio 7
Friday, September 4, 2020
Program any AVR microcontroller using WinAVR and USBTinyISP - Getting started with AVR tutorial for beginners
Nowadays Arduino is the platform of choice for programming AVR microcontrollers and for good reasons. But there are times when you want to have full control over what is added to your code.
For example Arduino is enabling by default Timer0 for use in millis function
and other functions and includes some interrupt routines that perhaps your
project is not using and so adding to the code size or perhaps those
interrupts can interfere with your code.Two main alternatives are WinAVR and Atmel Studio. This tutorial covers WinAVR because it's simpler to use for a beginner.
What you will need:
- ATmega328P (used in this tutorial as an example)
- USBTinyISP programmer
- WinAVR software (more on this later)
What you can learn:
-
how to program an AVR microcontroller using an In-System Programmer such as
USBTinyISP and WinAVR
- some bitwise operations for handling the registers
There are two main ways to program a microcontroller:
Programming software
There are many tools for programming an AVR microcontroller such as Atmel Studio, PlatformIO, Eclipse with an AVR plugin, etc but the simplest and light weight solution that I found is using WinAVR.
Programming hardware
Apart from development software there is also the need of a hardware programmer that the software uses to communicate with the microcontroller and upload the code to it. Searching online for 'avr programmer' reveals lots of options. The most popular I believe is the USBTinyISP and is very cheap. There is also Atmel-ICE from Atmel. A bit more expensive but it has the benefit of being able to debug and see in real time what happens inside the microcontroller.
Getting started with WinAVR
Thursday, June 25, 2020
How a POV propeller display works
In part 1 on How to make a POV display we talked about the hardware and schematic. In this part 2 we will dive in how the code works and why the POV (Persistence Of Vision) display is so cool and fun to play with.
Tuesday, June 23, 2020
Build a wireless energy POV display propeller clock with Android app
Thursday, January 23, 2020
How to make a double sided ultraviolet exposure box for making PCB
I had a broken Samsung MM-N6 audio system and so I've decided to build myself a double sided UV exposure box using it's front panel since it already had an LCD display, buttons and a sliding motorized panel. The sliding panel can be replaced with a door.
Here is an overview video with the version 1 of the box. This article presents an improved version of this box.