Monday, August 31, 2015

Syncing music and lights (Leds) Version #1

Light and music Syncing
The circuit above is a lighting circuit where it flashes and syncs the led lights with the music. This circuit is the first version of my 3 versions of light syncing. This version is really simple, this circuit uses the simple NPN transistors (2N2222) as switches. The circuit allows lights to sync with the music and being able to hear the music as well using the audio out. To use the circuit you would hook up power to the collector of the transistors and to the ground pin. Then plugging in a headphone plug in to the computer from the Audio in.
Above is the circuit that i made, where i used 6 leds where 3 leds are on each channel. The circuit works well and is pretty sensitive, but this circuit can only react to high bass beat sounds. Stay tuned to look at the other 2 versions of this light syncing. Below is the link to a video where I synced the lights to a song which was suggested by a friend: ( In the video, i added an extra 5 watt light which i'll show next post)
https://www.facebook.com/yixing.qie/videos/1588927561372053/?l=3173977460942610656

How to make temporary heat-sink compound (Works for 1-3 watt leds or highpower mosfet and transistors) Project #29



Temporary heat-sink compound (Thermal Grease/Thermal compound/Thermal Paste)
This thermal grease is made up of toothpaste, preferably mint (I used Colgate toothpaste) and petroleum jelly. The ratio should be around 3/4 toothpaste and 1/4 petroleum jelly. This compound is only a temporary thermal compound where it is not as effective as transferring heat from chip to heat-sink like thermal pastes with synthetic silver compounds. You can use this Diy paste until you get your proper paste, or just use this paste only on low power devices. I would warn NOT TO USE THIS CPU OR SENSITIVE DEVICES, AS THIS MAY RUIN THE DEVICE. I've only used this on power Mosfets, transistors and high power 1-3 watt leds, and it works fine.
Above, in the picture, is what the compound would look like, it doesn't look pleasant, but its going to be covered by the device or IC.
When finding a heat-dink compound for CPU's or sensitive devices, use high quality compound like 

Arctic Silver 5 or other compounds, don't use this Diy compound.

I AM NOT LIABLE, IF YOU DAMAGE YOUR SENSITIVE DEVICE WITH THIS DIY THERMAL COMPOUND. DO IT AT YOUR OWN COSTS/RISKS.

Thursday, August 27, 2015

Brightness light sensor for Micro-controllers Using an LDR

Brightness Light Sensor for Micro-controllers
This circuit senses the brightness levels in the surroundings and converts it into a analog signal which the micro-controller converts and displays the brightness that it senses. This circuit works with Atmel Atmega device, Arduino and other micro-controllers. This circuit is basically a variable voltage divider. If the LDR senses more brightness, the voltage from the output decreases, the darker the LDR is in, the output voltage increases. Stay tuned for the code that I used for this light sensor with my Atmega micro-controller.
Above is what an LDR used in the circuit looks like.

Wednesday, August 26, 2015

Temperature sensor for micro-controller using an NTC thermistor

Temperature sensor for Micro-controllers

This temperature sensor is used for micro-controllers to measure a range of temperatures. This sensor uses the
( NCPppXH103) NTC surface mount thermistor. You can use any thermistor, but you must have the datasheet for that specific thermistor to get the thermistor resistance ratio in order for your micro-controller to be able to calculate the voltage into a temperature unit. This circuit above is basically a variable voltage divider, where the voltage on the output changes depending on the temperature. There is a ratio between the temperature and the resistance of the thermistor. This is how the micro-controller can calculate the temperature. The voltage that comes out from the output goes out to the ADC in the micro-controller. This sensor can be used with an Arduino or an Atmega chip or other micro-controller.

On the above left i have the surface mount thermistor on a piece of perf board which can be detached from my micro-controller.
In a later post i will show you how to make your own microcontoller and show the specs of my microcontoller.
On the left you can see the senor detached.
I have used the sensor, and its pretty accurate, but you have to do trial and error with the code. Stay tuned for the code with the sensor, where it can display the temperature on to a LCD display, but the this code is used with an Atmega chip and programmed with an Atmel Studio. I will post the code with arduino, later on.

Monday, August 24, 2015

10 led random pattern flashing using Arduino (Uno)

//Multi LED Blink

int led1Pin = 13;
int led2Pin = 12;
int led3Pin = 11;
int led4Pin = 10;
int led5Pin = 9;
int led6Pin = 8;
int led7Pin = 7;
int led8Pin = 6;
int led9Pin = 5;
int led10Pin = 4;

void setup() {  
  //initialize the led pins as an outputs
  pinMode(led1Pin, OUTPUT);
  pinMode(led2Pin, OUTPUT);
  pinMode(led3Pin, OUTPUT);
  pinMode(led4Pin, OUTPUT);
  pinMode(led5Pin, OUTPUT);
  pinMode(led6Pin, OUTPUT);
  pinMode(led7Pin, OUTPUT);
  pinMode(led8Pin, OUTPUT);
  pinMode(led9Pin, OUTPUT);
  pinMode(led10Pin, OUTPUT);

}

void loop() {
  //pick a random color
  analogWrite(led1Pin, random(256));
  analogWrite(led2Pin, random(256));
  analogWrite(led3Pin, random(256));
  analogWrite(led4Pin, random(250));
  analogWrite(led5Pin, random(256));
  analogWrite(led6Pin, random(256));
  analogWrite(led7Pin, random(256));
  analogWrite(led8Pin, random(256));
  analogWrite(led9Pin, random(256));
  analogWrite(led10Pin, random(256));
  delay(300);//wait one second



/*  digitalWrite(led1Pin, HIGH);//turn LED on
  delay(100);
  digitalWrite(led1Pin, LOW);//turn LED off
  delay(100);

  //do the same for the other 3 LEDs
  digitalWrite(led2Pin, HIGH);//turn LED on
  delay(100);
  digitalWrite(led2Pin, LOW);//turn LED off
  delay(100);

  digitalWrite(led3Pin, HIGH);//turn LED on
  delay(100);
  digitalWrite(led3Pin, LOW);//turn LED off
  delay(100);

  digitalWrite(led4Pin, HIGH);//turn LED on
  delay(100);
  digitalWrite(led4Pin, LOW);//turn LED off
  delay(100);


  digitalWrite(led5Pin, HIGH);//turn LED on
  delay(100);
  digitalWrite(led5Pin, LOW);//turn LED off
  delay(100);


  digitalWrite(led6Pin, HIGH);//turn LED on
  delay(100);
  digitalWrite(led6Pin, LOW);//turn LED off
  delay(100);


  digitalWrite(led7Pin, HIGH);//turn LED on
  delay(100);
  digitalWrite(led7Pin, LOW);//turn LED off
  delay(100);


  digitalWrite(led8Pin, HIGH);//turn LED on
  delay(100);
  digitalWrite(led8Pin, LOW);//turn LED off
  delay(100);


  digitalWrite(led9Pin, HIGH);//turn LED on
  delay(100);
  digitalWrite(led9Pin, LOW);//turn LED off
  delay(100);


  digitalWrite(led10Pin, HIGH);//turn LED on
  delay(100);
  digitalWrite(led10Pin, LOW);//turn LED off
  delay(100);
  */
}

Above is the code that i wrote which will randomly light colored leds at different times and different brightness. You can use this light code and these lights to light up a part and, if you expanded the code and light, you can light your room in different colored variation. In the circuit with the arduino, you would use pins 4 to 13. These are the pins that i used in the code. It doesn't matter which type of led goes where, but make sure to put a 100 to 200 ohm resistor in series with the led, unless you want to burn out your leds.

Below, is a video of the code lighting lights using the arduino uno and  10 leds with colors of  red, green and yellow.




Using ohms law

An easy way to remember ohms law ( the orientation of voltage, current and resistance) is the ohms law triangle.  Below is what the triangle looks like:
V=Voltage, I=Current, R=Resistance
Just remember V over I equals R.
This triangle can help you remember ohms law and make it easier to calculate each value.
Ohms law states the potential difference (voltage) across a conductor is proportional to the current flowing through the conductor.
To calculate ohms law in a circuit with the triangle, you would cover the variable that you want to find and input the other 2 variable and calculate, either multiply or divide. You divide the numbers when one is on top of the other like V/I or V/R. You multiply when the numbers are beside each other like I*R.

For example:
To calculate R, you'd cover R and you'd have V/I, so input the voltage and current from the circuit and divide to get the resistance.
To Calculate I, you'd cover I  and you'd have V/R, so you input  the voltage and current from the circuit and divide voltage by current.
To calculate V, you'd cover V and you'd have I*R, so you input the current and resistance from the circuit and multiply current (I) by resistance (R).

Wednesday, August 19, 2015

How to read Surface Mount resistor

To read and calculate a SMD resistor, you must find out what code the resistor is using, in order to calculate it. There are 3 categories which are shown below:
Has an R,K or M between the numbers                                                                        

To calculate a 3 digit code resistance, Find the 3 digit code on the resistor, the first and second numbers are the significant number/ first 2 digit of resistance, the 3rd digit is the multiplier. The multiplier is an exponent of 10, so on the left you see i have 131, so the first 2 digits is 1,3 and the multiplier is 1 which is 10^1. To calculate the resistance, you multiply 13 by 10^1 which is 13 x 10^1 =130 ohms. So the resistors resistance is 130 ohms.









To calculate a 4 digit code resistance, locate the 4 digit code on the resister. The first, second and third number on the resistor are the significant number/ first 3 digits of the resistance  and the 4th number is the multiplier. The multiplier is an exponent of 10 , so on the left i have a resister with a code of 4450, so the first 3 digits are 4,4,5 and the multiplier is zero which is 10^0. To calculate the resistance multiply 445 by 10^0 which is 445 x 10^0 =445 ohms. So the resistors resistance is 445 ohms.



To calculate a resistor with a Radix point. Locate the 3 or 4 digit code with an R,K or M in the middle. The letters act as a decimal, so you just replace the location of the letter with a decimal point. In this resistance code, there is no multiplier. The letters also represent the unit of the resistance in the resistor so R represents ohms, K represents kilo-ohms and M represents mega-ohms.  For example on the left i have 45R3, so you replace R with a decimal which would look like 45.3 and since R is ohms, the resistance is 45.3 ohms. Another example is 4k3 which would be 4.3k. Another example is R33 which would be .33 ohms.


Tuesday, August 18, 2015

How to read color coded resistor values

4 Banded resistor
Reading color banded resistor values
This post shows how to read a resistors value by using the chart above. I don't recommend just using this chart to only calculate the resistance of a resistor, I suggest using a multimeter to double check or to check the resister's values. To calculate the value, first locate the first band, it is in the area where the colors bands are closer together like seen on the left picture. The first band of the color band cluster is the first band.
Start calculating the value by matching the first and second or third (three bands if the resistor is a 5 banded resistor) band colors to the chart, the numbers you get are the first 2 or 3 digits or the significant numbers. then find the 3rd or 4rth (4rth band for 5 banded resistor) band color in the chart in the multiplier column. The number you get is the multiplier,  you would multiply the first 2 or 3 digits by the multiplier to get the resistance value. For the fourth or fifth (fifth band for five banded resistor) band, it is not really needed, but after you match the color with the number, it tell you how accurate, the resistance is of the resistor.
Look below at how I find the resistance:

What glows under a real UV light Part 2

These are the things that glow under UV light below:
The sets of pictures are ordered by the picture on top is before and the picture below is after.
A Lanyard's printed words.


a green screwdriver.


tonic water


an led (phosphorus)


visa card logo


a printed stamp


Uncracked glow sticks


a used glowstick


Page 14-15 of new canadian passport


Page 16-17 of new canadian passport


Monday, August 17, 2015

Speaker amplifier using lm741 Version #1

Speaker amplifier Using Lm741
This is a amplifying circuit which amplifies music or sound from a device a computer to a better quality and higher volume like high quality speakers. The speaker in the circuit is an 8 ohm 5 watt speaker. This circuitry is used to boast the low voltage pulses from the device to a higher voltage pulse signal which is controlled with the single high power transistor rated at 100v, but can be replaced with a different power transistor depending on the type of speaker. Smaller the speaker; smaller the transistor wattage power. This type of circuit can give out somewhat same quality as brand speaker, but will ave to be modified.
Above is the pinout of the lm741 where you would use pin 2, 3, 4, 7, and 6(output). CONNECT THE PINS CORRECTLY IN THE CIRCUIT!
There will be 3 more versions of this circuit.

What glows under a real UV Light Part 1

First of things that glow are the pages of the new canadian passport
All the pictures are ordered from before ontop and after with uv below
This first set is the 18-19 page of the passport of the parlimemt..


This set is the first page of the passport, where you can see the maple leafs glowing.

This set shows how that highlighted words in my work glows in UV light.




This set and the set of pictures below shows how you can write with highlighters and it glows brightly with the UV Light.


Same as above.


Page 20-21 of the passport



Page 28-29 of the passport