Electronics
Intro
Ever lovin safety
Electronics Basics
Electronics Parts
Project 1 - Electronic Metronome
Project 2 - Photon Theramin Musical Instrument
Project 3 - Low Cost 44khz (or 48khz) Oscilloscope
Project 4 - Car Ignition Coil Electric Arc
Project 5 - $35 1MHz logic Analyzer/Oscilloscope
Updated Projects - DIY Seeing Thought Images, Nipkow Disk, 10-20MHz USB 2.0 Cypress FX2 cy7c68013a Logic Analyzer/Oscilloscope
You can copy and share all of this data.
other projects:
measuring voltage and current
turning on/off LED with switch (and from computer)
voltage divider with resistors and capacitors
(want basic radio like AM/FM, Colpitts, Hartley, ..simple send and get a photon - but I have not enough experience with)
(ultrasound distance detector)
I think basic simple electronics is very fun!
Electricity and electronics is one of the most new fields, and there is still more to find, see and do.
For example, electric batteries are changing (where book printing, an older, more developed industry really is not changing as fast for example).
Electronic motors (and generators) are amazing and interesting, only first made in the late 1800 or 1900s (I am having fun learning this well enough to tell the story by memory) by Michael Faraday and Joe Henry.
Most of my interest in electricity is a result of building robots, but I am also interested in building motors (gases, like H2, N2 and air), security systems (cameras, microphones...), and vehicles of all sizes (helicopters, scooters, rockets, rocket planes...).
I realize these projects are probably not in order of simple to complex, but I am only starting this and will improve later. There is a good page on basic electronic components (switches, resistors, capacitors, inductors, leds, transistors, etc...) somewhere on the web and you should see this if you are a starting electronics.
Keeping safe and pain free when experimenting with electronics. Doing science can some times be physically dangerous. Being a human on a planet in a universe is dangerous too. Electricity (electrons, again perhaps groups of photons) can damage human cells. All living objects on planet earth are made of cells (that is an amazing fact). Humans are also electric. For electricity voltage is what can causes damage to human bodies. The amount of current going thru a body has no effect as far as I have ever seen - but search to see what you can find. High voltage (like > 100v - not sure have to check this) can "shock" (or perhaps burn) a human (or any species probably). For example the wall outlets in most houses are kind of dangerous. These two (or 3) metal plates connect 240 Volts AC (alternating current [not direct current]). Some devices may use the 240 volts, but most step down the voltage to run AC motors (like a fan), other devices use AC adapters (the AC voltage is stepped down and rectified [negative voltage not passed] and then stored in a capacitor to be DC - this is an important part of power source lessons).
So, be careful with high voltages. 9 or 12 Volts cannot shock a human. In one simple fun electronics project I show how to use a low cost car ignition coil (~$10 from auto parts store - watch out for suspicion when you say "cheapest please"...the person will want a car model), and in that project there will be a voltage ~ 1000 Volts.
Humans should share information to keep experiments with electricity, gas engines/rockets, etc... more safe.
04-23-03 Here is something dangerous that has happened to me 2 times: In electronics is you want a DC current for your protboard circuit, most people probably use old AC adapters to provide a DC voltage to a 5V voltage regulator (7805). People usually cut off the DC end adapter, solder or twist 22awg wires to the end and connect to a protoboard. I was using an AC adapter to program pic16f84a chips and perhaps 1 hour after programming a PIC, I smelled something (the protoboard circuit was completely switched off), maybe 5 or 10 minutes later I saw a small stream of smoke coming from the AC adapter. I immediately pulled out the adapter (from a power strip) and the adapter was untouchably hot. This is the 2nd time this has happened to me and is a serious and frightening fire hazard. Here is what I think is happening and the life and death important rule: Check the amp (and voltage) levels of an AC adapter and the circuit before using the AC adapter. Most digital circuits do not use more than .5 amps, in my experience. The melted and smoking AC adapter had printed 300mA, less than the PIC16f84A ~500mA (although this I still have to check). So to be safe, try to use an AC adapter that has at least twice the current needed, in addition unplug any AC adapter not needed, do not mix and match AC adapters unless you carefully measure the current needed and available. One last idea is to build robots that have scent detection, are sensitive to detecting images of smoke, and heat sensors (thermistors).
Electronic Parts (Components)
Resistors
| | |
|
wireround
|
|
|
power | |
|
variable |
|
Capacitors |
|
|
|
ceramic |
|
|
electrolytic |
|
Inductors |
|
|
Crystals |
|
|
ICs (Integrated Circuits)
|
|
|
|
Logic |
|
|
PICS |
|
Electric Motors |
|
|
Electric Generators |
|
|
Soldering
i use low cost irons from Radio Shack (search on the web too, like webtronics, and others I am sure have them too).
I am still looking for a pencil tip iron. I buy replacement tips, and that is a good idea since the tips melt off eventually.
Power source:
This is something that is never explained by most people, but is important:
You can use:
12 volt battery (from meci.com, or allelectronics, ...)
12 volt wall adapter (hold on to these because they can be great for electronic projects)
9 volt battery (can be used, but make sure NiMH rechargable because of expense)
two 1.5 volt batteries (again rechargable)
One important thing is to get a 5V (or 3V for CMOS, but most hobby people probably use 5v) from the 12 Volt source you will need a "regulator) 3 pin chip. I am amazed that this chip makes changing 12V to 5V this easy! These chips are called 7805 (or 7812 for 12V, etc..) and can be bought for <$3 at jameco.com, mouser.com, digikey.com, etc...
Boards to build electronic circuits on:
Protoboard (Solderless Breadboard):
Protoboard or Breadboard is a board for prototyping electronic circuits, that can be bought from jameco.com, web-tronics.com, phanderson.com, ...there are a number of sizes, I use the WB-104-1+J ($13 at web-tronics.com) or je25 ($19 at jameco.com) and for most projects.
PCB (Printed Circuit Board)
update 04-08-05
I got this link from OSMC (open source motor controller) at yahoo groups:
www.sparkfun.com
$2.50/per inch two sided protos, although I have not tried this yet, I will for a small hand made PIC programmer and electronic metronome.
I have found that making professional looking PCB boards is possible at a low cost!
I want to share my recent PCB experience:
I find the best low cost setup for me is:
1) Eagle light free software (I use in XP, but since I had to make most of the library devices by hand, I think I
may try "PCB" on Linux when I move to open source only)
2) ink jet transparacy sheets (I make the transparancy bigger than the PCB so there are no shadow lines)
3) Epson 2400 dpi inkjet (have to set on best print for small SMT pins)
4) florescent desk lamp
5) plate of glass or plexiglass (plexi is not as heavy and may require books on both sides when under lamp)
6) Presensitized PCB (I found lower cost from web-tronics.com for 1 oz, digikey.com also has these in 4 oz)
7) Posdev developer (from web-tronics.com)
8) ammonium sulfate (I have not tried FeCl yet, but I am sure that is ok too) for etching - (I was using 2 sealed
plastic sandwich baggies in an old pot filled with water on an electric stove set at warm for good results, but
bought the thin $40 etch tank from web-tronics - the ethant is not as hot and takes more time but does still
work)
9) tin coasting (again from web-tronics, used in a few plastic bags in a pot with water over hot heat on electric
stove - I was amazed the first time I did this, a nice silvery tin coating only took minutes)
One thing I found is that the developer may have caused some irritation on my hand and so now I use cheap
nitrine plastic gloves from harbor-freight, and that the leaving the ammonium sulfate exposed to the open air for
more than a few hours can cause minor eye irritation, and did cause minor stomach nausia in a different person.
I found that I had to experiment to find the best exposure time, and developer mixture. I am at a conservative
25 minutes exposure (each side), 2 liters room temperature water and ~ 1/4 cup developer). I think that I could
possibly be more efficient with 15 minute exposure, 1 liter warm water and 1/4 cup developer. For etching I
felt that I had to keep adding Ammonium Sulfate powder for each board to get the etching going faster. In any
event, developing should only take 5 minutes and etching should take near 15 minutes, any longer and the
mixture is not correct. Before exposing, for a 2 side board, I drill 4 orientation holes (vias in the circuit) in the 4
corners in order to align the bottom and top transparacies.
You may find it best to draw your own symbols and packages (I could not find the standard sizes in Eagle for some reason, plus there is no chance of finding specific ICs, you will have to draw those your self).
Standard SMT sizes (for resistors and capacitors):
The most used are 0805 and 1206.
Search the web for good charts of SMT sizes, and many are displayed on the part spec. document, plus you can always measure with calipers.
Wire:
Use 22awg (should be metric already) for protoboards.
Basic Project 1:
Electronic Metronome.
Circuit: Image of Electronic Metronome Circuit
I am using a part that will accept a headphone jack from Mouser.com I think. I solder three wires, one from the ground metal piece/pin, and the other two from the other metal pieces (it's a stereo adapter). The ground connects to one side (where the speaker is shown) and the other two go into the other side where the speaker is shown connected. This project is only for learning and do-it-yourself fun, you may want to buy a digital metronome from music123.com or musciansfriend.com...here is one I am going to buy for <$20, it has a tuner too: http://www.musicbasic.com/met-wsm-001a-black.html.
Basic Project 2:
Theramin Photon (light) Detecting Musical Instrument (like instrument used in Beach Boy Humans song "Good Vibracíones"), and in the "Star Trek" theme
This is amazing. All you need is a 555 (or 556) timer chip (another amazing chip), two light detecting resistors (or 1 light detecting resistor and one variable reisitor), 1 regular resistor, 1 power transistor, and one cheap speaker (you can solder two wires to a broken headphone, or old computer speaker), a small protoboard, a voltage 7805 regulator, some 22awg wire, a solder iron and some solder.
The light detecting/sensitive resistors control frequency and volume.
I would play this instrument under a bright light.
Using 2 variable resistors (instead of photon detectors) can make a more controllable musical instrument. My advice is to use large variable resistors like 10Mohm...
Image of Photon Instrument Circuit
Photocells are awesome. There are photocells, photovoltaic cells, phottransistors, and more photon based detector devices. Photocells are used to turn on street lights (when there is not enough light, the street light goes on). This could be used for security cameras, when not enough light, this can turn on an electric light.
Simple, Low Cost, Useful Project #2:
Low Cost Oscilloscope
You can make a low cost 2 channel 23us (44.1khz) oscilloscope using a computer with a sound card and free sound wave viewing software (like "Cool Edit 4.12"). The software to draw a wave is easy to make when you have the basic format of a .wav file.
To make the oscilloscope, simply take any old pair of broken headsets (hold on to your headphones, even broken headphones, if you like elctronics because they can be used as microphones, speakers, and oscilloscope parts!) and cut open the end to get the end connector. Solder (I will give a basic explaination of soldering some where here eventually) three wires (one ground-black, and two for the left and right channel) as shown in the image.
Connect the other end of the ground wire to the ground of a circuit board, and the other two wires can be used as oscilloscope leads to emasure some signal.
This is where other people have to tell me more info, but I think that you can even measure an analog signal with these two wires because a sound card has an analog to digital converter chip (this is how some signal, like a sine wave, gets translated in to digital numbers like for 16 bits 0x1f6a, 0x48bc, ...). Here is a mystery, look at these nice wave shapes (square wave) for an adxl202 accelerometer (measures how much the chip is tilted in 2 dimensions using the acceleration of the earth 1g):
You can see that 30 samples are highlighted.
First, the speed of each read from recording from the sound card= 16 bits 44100 each second.
That is amazingly fast for a human that thinks/remembers maybe 3 images every second!
44100 samples every second (also called 44100 hertz, 44.1 kilohertz) = 1/44100 = 22.676us
So back to the image, 30 samples x 22.676us=.680 ms. This is the how fast the accelerometer is sending 1 wave. The top wave is the digital output of the adxl202 for the x dimension, and the bottom for the y dimension. How much of the cycle is a "1" (or 5v) is how much tilt there is. Is the 1s are exactly 1/2 or the full cycle, then the accelerometer is horizontal (as is what was happening when this image was captured).
But here is a switch being turned on, and then off. What I can not under stand is, why does the sound wav go back to zero, and not stay up in 5 V? Does the sound card only measure change in signal, if that is true, than how can the sound card measure the adxl values that are not changing? Maybe some body can answer this mystery for me.
Here is the image of the switch turned on and then off:
After note: The pic16F84a is an awesome chip that is practically a computer on a chip, all for $6!
I see now that I can use my 115200 serial communicatio program with a pic16f84a and use the 8 bits of PORTB on the PIC as 8 (8 bits = 1 byte) probes on an oscilloscope that has the speed of:
1/115200=8.68us/bit x 10 (start bit + 8 data bits + stop bit) = 86.8 us
Actually I see that 86us is ~4x slower than the sound card at 23us. So I doubt I will pursue this project.
Most oscilloscopes are 20 MHz (50ns). The sound card is 44.1khz, but still 23us is fast enough for a number of things I do, most chips like a simple nand gate (7400) or invertor (7404) change in nanoseconds. There should be a fast port for the pc for vaious reasons. The USB is 1 bit at a max speed of 4 MBits/S, and IEEE1674 (firewire) is 40 MBits/S. I would like to see an 8 bit (1 byte) IO port that can get/send at least 20MBytes/Sec. In addition to an RCA Video in and out port standard on every PC motherboard.
Basic Project #3:
Ignition coil spark
Using a 555 (or 556) timer chip you can take this output, again like for the speaker through a power transistor, to get a constant flow of electrons (an "arc") from an ignition coil. Get the ignition coil from an auto parts place, ask for the cheapest (<$10). The electron arc will go from the center to the ground and send photons in to every direction.
My advice is to not touch the arc or any metal part of the ignition coil, I am not sure, but I think that because this is a high voltage (perhaps ~1000, another project could measure this voltage) a human could get a shock.
Other Notes:
Getting started bulding robots and doing electronics:
Science education on planet earth is not good enough. Try to find a video on the stories of science, on basic hobby electronics in the libraries...and you can see that there is nothing but religious, psychological crappy shits that substitute for actual science and interesting popular humans and activities.
Here is what I have learned in building robots, and electronics:
This is a rough start:
From computer to electronic circuit
protoboard for electronic circuits.
Where the schfleck is the science?
Simple circuits (5V regulator, simple 555 timer musical instrument)
Radio circuits (very important, but new for me - seeing what eye sees, sending+getting photons)
H-Bridge
Programming a PIC: (use MPLAB free from Microchip to program in .asm, use picpro (free) to program and PIC16F84A)
I will develop this later, I am really only intermediate, and the "expert" humans in this field are no where to be found (at least for free on video, etc...)! I have found 1 or 2 good books on electronics, but most are older, abstract and out dated with photon theory.
Basic Project #4:
$35 (even for ~$15!) 1MHz Logic Analyzer
This project is amazing. Using an FTDI245 and some software (you can use videoedit a program I am making for Linux, or even any hexeditor to look at the data) to make a simple 1MHz (8 bit sample every 1us) logic analyzer and with free sample analog to digital chips from analog.com you can make a 1MHz 1 channel oscilloscope (or 2 using 2 ftdi chips, or 2 500khz with only 1 chip- search for the article by Eddie Insam)
You can actually buy the ftdi245 chip for ~$6 and etch your own, but the easiest way is to get the ftdi chip already on a socket for $35.
I use a 1Mhz 5V crystal oscillator from jameco.com to make the 1Mhz signal. I could only get the driver for Windows going, but I thought I had the Linux driver working once but now the driver just hangs when I try to do a read.
Updated Projects:
07/23/2009
Just quickly, I am working on do-it-yourself seeing thought images by examining the heat emited from the human head. There are some good tools, like the "Nipkow disk" named after Paul Nipkow. In addition I have updated the computer oscilloscope circuit - with help from the design by Wolfgang Wieser (see: http://www.triplespark.net/elec/analysis/USB-LiveOsci/ for details on the circuit Wieser made. The circuit here is similar, the only main difference being that I just went with a crystal oscillator chip, and a different A2D chip. I have never used a crystal as a clock, and just thought...geez, maybe there is some IC that can be used to drive a crystal and so I searched and found a TI chip "crystal driver" which works - but I thought - why have I never heard of this before? So I did verify that this circuit does work. The second "osc_panel" channel- gets a lot of noise - I am making new boards that integrate everything together - at first I thought that the building 3D boards was a good space-saving idea, but the interconnects sometimes become broken - the solder cracks - it's just more stable all on a single board - in addition, I think I am just going to make separate dual-channel a2d, dual channel 8-bit digital, and single channel a2d+8-big digital boards instead of trying to provide a switch between both. Another thing was that I went without any kind of Schmitt trigger chip for the digital since I don't expect any highly oscillating digital signals - I'm presuming that is what Wieser is using that chip for - I don't know. At first the FX2 was not working with an AMD computer - and I was so frustrated...I didn't know what I was going to do...but then I tried on an Intel laptop and it suddenly worked...I then replaced my older AMD board with a new Intel board and both my FX2 PCBs work perfectly now - so that is definitely something to be aware of. In addition, with just the CPU reading in bulk (with Wieser's "fx2pipe" program) it seems clearly to be able to just about read in 40MB/s - I think the average was around 39MB/s - and so possibly 20Mhz (50ns) might be possible, and for sure 30Mhz (67ns) is possible. And this raises another interesting point. I decided to use async writing, although both sync and async work, and the fx2pipe program kindly allows for changing between the two. I am thinking that async is better because the FX2 processor is working at the full 48MHz. At first I was confused because the fx2pipe rate dropped down to 19Mb/s - I thought...I must be doing something wrong...but then I realized...no this is exactly correct - the FX2 fills up it's buffer at 10MHz, and when full then sends. This sending happens around 20MB/s (16-bits at 10MHz). So I'm still not clear on why this is no exactly 10MHz since the Intel CPU has plenty of processing time (reaching 39MB/s when that much data is available) - I can only explain this as being some kind of delay in Linux processing the data in the buffer - I am presuming that all the data is there, and there is no missing 1MB/s of data - and looking at the data in my "Freethought - VideoEdit" program - it appears to be correct - although I need to examine it more precisely. I think that about concludes all notes - my thanks to Wilhelm Wieser for making all the information about how he implemented a USB oscilloscope with the FX2 chip available to the public. Now that I am familiar with the FX2 there are so many possibilities - for example I am making a PIC programmer with it now, and then an Atmel programmer. The FX2 opens the door to high speed and simple (once you get familiar with the basics) USB PCBs. I could go on for hours, but just to say that there are also PICs with 100Mb/s ethernet integrated in the chip (PHY and MAC) - and that can be used with RTNet the real-time to do real-time data sampling. The possibilities seem endless - one cool project is making a high speed video PCB using the FX2 and photocells,
Here are images of the various circuits I have tested and which basically work - I could probably more thoroughly test them:
The FX2 is from Eagle, but I have since changed to Kicad, which the rest of the schematics are from. I actually learned how to make a schematic+pcb (connect the pins in particular) by using Kicad. View the image to see more details at full resolution and may ye soon see thought images:
Nipkow disk motor driver:
Nipkow disk box panel circuit - probably this should be integrated with the above circuit.
Here is the FX2 board:
Here is the first channel Oscilloscope board:
Here is the second channel Oscilloscope board:
07/24/09
Adding more: THe motor I use for the Nipkow disk is from alltronics.com http://www.alltronics.com/cgi-bin/item/27M001/153/Magnetic-3140-0594-husky-24VDC-Motor $10, 24v DC motor. I use a sheave too from http://www.drillspot.com/power-transmission/sheaves-and-pulleys/sheaves/?srt=Lowprice
dillspot.com. I am currently using a 6ax1/2 (6" diameter sheave) connected to a 1 1/2ax1/2 using a small rubber vacuum belt from Ace Hardware. To connect the sheave to the motor requires a 1/2 inch (turned to be just under 1/2 inch on a lathe) aluminum rod, drilled with a hole for the motor shaft and another for a set screw. So that tiny part can only be built with a lathe which start at harbor freight tools around $300 for the microlathe - but the microlathe can allow you to produce that part very easily. You might want to take a course on machining at the local community college to get formal training on a lathe (and mill). The light sensor is a photocell from Jameco:
https://www.jameco.com/webapp/wcs/stores/servlet/ProductDisplay?langId=-1&storeId=10001&catalogId=10001&productId=202403& this $.59 photocell (also known as a photoresistor) is fine. These are kind of difficult devices to find at this low price. This is the sensor I am thinking I may make an 8x8 heat test digital high speed camera with.