Learning electronics and designing good schematics
Here are a couple of links that those new to electronics should have a look at.
The first is an excellent
electronics book available for download: Lessons in Electric Circuits
, covers DC, AC, analog, and digital. It also includes some VERY handy reference materials, as well as some good experiments to help understand the text.
The second is much shorter, but no less important: How To Draw Schematic Diagrams
, which provides some hints and tips to help those new to electronics draw their designs in clean, easy-to-understand ways.
One of the things that I've been doing over the last few months has been experimenting with/on my Arduino
To make life easier on myself, I've been using the (free for hobbyist/casual use) Eagle
schematic capture and board layout program; to make things easier on myself, I've put together a couple of things that I've found handy into a single Eagle library: an Arduino schematic symbol that has the same pinout and spacing as the connections on the Arduino Diecimilla itself (makes it easier to generate piggyback boards). Something else I've done has been create a small PCB that will hold a couple of standard RJ-11 telephone jacks, a Maxim/Dallas 18S20 "1-Wire" temperature sensor, and an optional pull-up resistor (needed just ONCE on the whole 1-Wire chain).
In the spirit of share and share-alike, I'm making some of the stuff that I've come up with available to other folks in the hope that they find it useful.
Everything on this page is released as:
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License
Eagle Library with 'generic' Arduino and 18S20 symbol merriman.lbr.zip
daisy-chainable 18S20 Temperature sensor boards 1-Wire Temperature Sensor board.zip
Generic Arduino "shield" board with Arduino pins, but nothing else. arduino_boilerplate.brd
A library for several of the EDE interface chips (stepper controller, LCD interface, ser/par converter, matrix keypad controllers) - very handy for interfacing to an Arduino! ede.lbr.zip
As I do more Evil Things with my Arduino, I'll update the library and other stuff.
I've created an Eagle symbol and footprint for the WizNet 812
module - note that the pinouts and pin spacing are DIFFERENT from the 811!
-- I've added a symbol for the MCP-1700
regulator, with proper pin connections for the TO-92 package, since it isn't included in the Microchip lib from Eagle.
-- Now includes symbol and footprint for Catalyst CAT24WC33 I2C EEPROM available from Fungizmos
I've been an electronics (and engineering) technician for 30+ years, and after seeing a lot of questions about how to measure something larger than 5 volts with an Arduino analog pin, I thought I'd contribute a little something by writing a tutorial on voltage dividers. So without further ado, here you go:
Voltage Divider tutorial as a pdf voltage dividers tutorial.pdf
Voltage Divider tutorial as pdf, with data files for 10/5/2/1 percent tolerance resistor stepping voltage dividers tutorial.zip
UPDATE - A voltage divider calculator written in Java is available farther down the page...
The current I could get out of an MCP-1700 wasn't enough for some of the things that I wanted to do, so I've ginned up an external 3V3 supply, using an LM317 adjustable regulator. I included input and output monitoring LEDs on it just because it makes me feel warm and fuzzy knowing when I've got input and output voltages in a "power supply" :-)
The board also has a barrel jack and bridge rectifier (DIP-type) so that the input can be from a surplus modem wall-wart or about anything else. Output is a couple of pins on .1" spacing, suitable for a MOLEX-type jack. Additional notes and comments are on the schematic.
Should be pretty easy to use the basic board, and simply leave off the stuff you don't like or don't need/want, with minimal modification.
The schematic and 2"x2" board (single-sided, ground plane) are in Eagle format. 3V3_LM317.zip
Arduino IDE icon/symbol
Since there doesn't seem to be an "official" Arduino IDE icon/symbol, one of the first things I did was to cobble one together. It's a little rough, but bears a vague resemblance to an Arduino Diecimila, along with the text "Arduino IDE". My Linux system is fine with using .png files for icons, so that's how I saved it; you're on your own getting it into any other format :-)
Arduino IDE "icon" Arduino.png
Basic Electronics Tutorials
One of the things I've seen on the different Arduio (and related) support forums is that some people are getting involved with it, but without a good understanding of the basics of electronics -- which is necessary to really make sense of some of the various projects that are available online. So I've done a bit of research, and am providing links to some fairly decent introductory basic electronics sites, and one that is more oriented toward helping people troubleshoot any problems in their circuits. I've been an electronics tech since 1972, when the Navy turned me into an Aviation Electronics Technician. Since then, I've spent a pretty fair chunk of time working in calibration (precision test equipment adjustment and repair) and as an engineering tech (helping design and build one-off and prototype equipment); I found that these sites provided a good introduction to the fundamentals, and I'm offering them here in the hope that anyone needed to get started will find them helpful.
Multiple Serial devices with Arduino
After some experimenting, I've concluded that it IS
possible to use more than a single serial device with an Arduino. By using a 4066 quad bilateral switch, a user can use a single Arduino pin to redirect serial TX/RX either of two direction. Please refer to the demo circuit I've put together for connections. Essentially, the Arduino pin turns on/off a switching transistor (2N3904 is what I used) that is used to provide logic inversion of the Arduino pin to the second 4066 switch. I haven't tested this extensively, but I can't see any reason that adding a demux type chip such as a 74138 3-to-8 decoder (3 binary inputs decode to eight decimal outputs) to provide additional "channels".
Demo Circuit (Eagle .sch) MultiSerial.sch
Monitor multiple switches with one Analog pin
You can monitor several switches by using just one Analog input. The "magic" is to use different values of resistors for each leg of a multi-branch voltage divider. multiswitch.sch
Hand-soldering surface-mount parts
I've been an electronics tech for a while now, and thought I'd pass along some helpful tips that might make it easier for other folks to learn how to solder surface-mount parts onto a board, via a brief tutorial (with diagrams, even!) Hand-soldering surface mount parts.pdf
I've taken the basic design of the MPGuino and modified it in 3 ways. First, I've separated the "logic" from the display -- the LCD and buttons are now on a separate circuit board which should
be easier and more convenient to mount. Second, I've added a small 2x2 set of jumpers to make it easier to compensate for reversed polarity of the backlight. Finally, I've added a photocell and resistor to serve as an ambient lighting reference so that when the interior of the vehicle is dark (ie night time, bad weather, whatever), the backlight can be dimmed to help preserve night vision. Schematics and board layouts in Eagle format: MPGduino-MK2.zip
Multiple I2C Masters and Slaves with Arduino
Using this pair of sketches
as the base, I've written examples of how to do multiple Masters and Slaves with Arduinos -- yes, you can get them to talk nice to each other! My sketches use variables for Master and Slave addresses, transmit strings
(yup, real honest-to-goodness text), and are pretty well commented. I've got a pair of 'duinos, and ran both of them through various combinations of addressing, Master/Slave, and changing text,and the sketches ran just fine. I used 4.7K resistors for my SDA/SCL pullups; YMMV :-P
Here are the sketches for you to play with: Multi-I2C.zip
Extending Arduino communications range (i.e. Serial/I2C/TWI)
If you need to extend the range you can communicate with on your Arduino, then there are a couple of fairly simple and easy ways to do it that are essentially transparent to your Arduino code: use either of the RS-422/RS-485 buses. Chips for these are just a couple of dollars apiece in small quantities, they're available in through-hole packages, and can save you a LOT of headaches. If you're not already familiar with RS-422/RS-485, have a look at this website
that covers the specifications and provides a good (in-depth) tutorial. If you just want a quick refresher or basic overview, have a look at the (excellent!) info provided by B&B Electronics
. You can find plenty of driver chips over at Maxim
(don't worry about the exotic parameters at the top of the page (you likely won't need to worry about them -- we're not talking rocket science, just an Arduino!). Just find a chip that has as many inputs and outputs as you need
, and have a look -- or even download the datasheet to see how to use it
Scheduled 1-Wire data collection
Here's a sketch I did that allows me to use a Dallas/Maxim DS1307 RealTime Clock
to do regular data collection from a group of 4 DS18S20
temperature sensors. The DS1307 circuit is real
simple to implement; with a CR2302 coin-type lithium battery, you can build the thing onto a 1" square board. Download
Voltage Divider Calculator
To help in the process of trying to teach myself Java, I've written a simple little calculator that will find all the values of One Percent
resistors that would make up a voltage divider -- just tell it what the desired ratio should be (i.e 3 to 1, 12 to 5), click a button, and off it goes. All the values will be listed in a text box; clicking a button will copy all the results to your system clipboard so you can paste them into another application. Written in Java (duh!) using the free
NetBeans IDE from Sun (on my Linux/Redhat 11 system). All project files (what I wrote is HEAVILY commented!) included for anyone that wants to modify/tweak it is in the zip file: Download
Voltage Divider Calculator - New and Improved!
I've upgraded my voltage divider calculator to cover 5%, 1%, and .1-, .25-, and .5-% resistors, and embedded the resistor stepping into the program. Renamed jDivider, I think the user interface is a little easier to deal with, as well. Again, it was done with the NetBeans IDE
, and full source (plus all libraries) is included. Just enter the input voltage, desired output, and hit "FIND"; the program will list all fixed resistors that will meet the selected ratio at the specified tolerance. You can click on "COPY" to copy to your system clipboard or "PRINT" to dump a hardcopy. Download