1.01 Voltage and Current

Art of Electronics 2nd edition, pages 2-4

Overview

Voltage & Current describe two aspects of electronic circuits that are fundamental to understand and on which everything else will build on.

What you MUST learn

Voltage refers to a force that when applied across a circuit causes current to flow.  Voltage is measured in volts (using the symbol V) also called a “potential difference”.  It is measured across two points in a circuit.  A joule of work is needed to move a coulomb of charge through a potential difference of one volt. A coulomb is the charge of about 6×10^18 electrons.

Current (symbol: I) is the measure of electronics through a point in a circuit.  It is measured in amperes (amps) (symbol: A).  1 ampere (amp) is 1 coulomb of charge passing through a point per second.

 

Conservation of Charge:  Kirchhoff’s current law

The sum of currents into a point or node is equal to the sum of the currents out of a point or node.  This is referred to as Kirchhoff’s current law.

 

Kirchhoff’s voltage law

The sum of voltage drops through one branch of a circuit will equal the sum of voltage drops across the other branches of the circuit.

 

P=VI

Power (work per unit time), measured in watts.  (1 W = 1 J/s)

P=VI = (work/charge) x (charge/time) = work/time

P=VI= (1 joules/1 coulomb) x (1 coulomb/1 second) = 1 joules/second = watt.

 

Things good to learn

Voltage is usually written with the symbol V but sometimes E is used.   Voltage is also called a “potential difference” or electromotive force (EMF).

 

Prefixes:

Multiple Prefix Symbol
10^12 tera T
10^9 giga G
10^6 mega M
10^3 kilo k
10^(-3) milli m
10^(-6) micro µ
10^(-9) nano n
10^(-12) pico p
10^(-15) femto f

 

When abbreviating a unit with a prefix, the unit follows the multiplier with no space and the unit is capitalized.  However, no capitalization for both prefix and unit when spelled out.  1mW = 1 milliwatt

1 MV = 1 megavolt

 

Related information and insights from my other books

Introductory Circuit Analysis 9th edition – chapter 2

Structure of the atom:

nucleus is made up of protons (that have a positive charge) and neutrons that have a negative charge.  The proton and neutron are relatively the same mass.  But the electron is considerably smaller (1836 times smaller) than the proton but has a negative charge that is equal to the positive charge of the proton.

 

 

Other things of interest

 

 

If you need more help

Voltage

 

Current

 

Joule

 

 

 

If you wanted to know

Who defined:

Voltage

Volt

Current

amp

joule

watt

multiplier prefixes

 

People who contributed:

Watt

Power Point:
GadgetNateJourneyThroughArtOfElectronics-01.01-VoltageAndCurrent

Book Review: Ishmael: An Adventure of the Mind and Spirit by Daniel Quinn

 Ishmael by Daniel Quinn is one of the more thoughts provoking books that I have read in a while.   It is a book on philosophy framed as a discussion between an unlikely teacher and a pupil we can all related to.  There are several core ideas presented in the book:

1) Past performance is no guarantee of future returns.  Just because something has survived for many years does not mean that it will continue to do so.   Examples from the early days of flight are given to convince us of this.  Hopeful inventors with machines meant to fly being thrown off of cliffs.  They fly for a while, but regardless of how much effort the pilot expends, they will not stay in the air.  Machines like in this video: www.youtube.com/watch?v=8y3fIr4dVYE

2) The web of life is being trimmed and cut away so that it only supports man’s needs.  If an animal or plant does not help us then it is eliminated.  The robust web is being reduced to a fragile chain that needs only be broken at a few places to cause the entire system to collapse.

The book goes into more details and explains these concepts in more details.   Take a look at Ishmael by Daniel Quinn.

 

Simple Tablet Wall Mount

2014-12-29 22.47.24We have been slowly collecting tablets in the form of iPad (original), iPad mini, HP slates, and recently through a purchase of 2 RCA slates that we got for $65 from Walmart during the most recent black Friday sale.

My wife had a good idea of mounting one in the laundry room so that she can listen to music while doing laundry.  We have been thinking of other uses, example: intercom.

There are many options available for mounting.  They make mounts just for this purpose and there are a few really cool DIY ideas.  However, looking for something quick and simple, I decided to go with adhesive valcro tape.  This worked wonder.

I just put two strips on the back, and attached to the wall

2014-12-28 12.41.33
2014-12-28 12.41.43

 

Preparing for my journey through “The Art of Electronics”

2014-12-28 23.17.30-2“The Art of Electronics” by Horowitz and Hill is the definitive guide to Analog and Digital electronics.  I had bought the 2nd edition over a decade ago, with the intention of going through it.  But this year is going to be the year.  And I am hoping that you will help me.

My plan is to go through a section a day, and to write a short blog post summarizing what I learned.  I have collected several electronics books, and I plan to make reference to them as I go on this journey.  These include:

In addition to a brief summary of what I learn from that section, I plan to create a video post, create additional exercises, and assemble related circuits.  I am hoping that it will be an exciting adventure, and that by having to produce a daily blog post, I will have the discipline to see it through.  And should I stumble, hopefully an encouraging comment or email from you will nudge me back on the path.

First thing is that I need some help by those that are familiar with Electronics.  I am an Amateur with hopes of achieving proficiency.  I do not want my struggles to cause problems for others following along.  Therefore, I would like to have someone knowledgeable review my notes before I publish them on this blog.  If you would be willing to help out, then please email me at nathan.price@gmail.com.  Let me know how much you would be willing to help out.  I figure each blog post would take 15 minutes or so to review.   I would like to give you credit for reviewing, but if you want to remain anonymous, then that is fine too.

Second, if you want to join this adventure, then sign up for email notifications as we get ready to start this journey, and then for updates as the journey begins:

Enter your email address:

Delivered by FeedBurner

 I am already on the journey, but I do not plan to start publishing them till February 1, 2015.  This will give me a chance to have them reviewed, and will give me a little buffer.

Also, I plan to create a lot of circuits and do demonstrations.  If you have some extra components that you can donate to me, that would be great!  Email me at nathan.price@gmail.com with the details.  Also, if you are interested in supporting this journey financially, then donations would be welcomed.  (I converted my PayPal to a commercial account some years back, and it seems it can’t be converted back.  So the donations would say that were to ISpeakHindi.com, which is another website created with the same idea of having to commitment of studying each day.  That site was semi-successful as now I can read/write/speak/understand basic Hindi…)

For now, go ahead and order the book so that you can join along…

Microsoft Excel – Clean function – calling functions from VBS – Accessing files from VBS on Mac

Today I have been working on importing a text file into Excel and using VBS to do some processing and transformation of it.  In the process I found 3 things worth sharing/commenting on:

1) You may be familiar with the “trim()” function in Excel and in VBS.  It removes extra white spaces in a string.  But did you know that there is a “clean()” function in Excel that will remove “non-printable” characters.  There is a good write up of it at www.globaliconnect.com/excel/index.php?option=com_content&view=article&id=118:excel-text-and-string-functions-trim-a-clean&catid=78&Itemid=474

 

2) There is no “clean()” function in VBS.  But you can call all of the Excel functions by using “Application.WorksheetFunction” object.  Therefore you can call the “clean()” function from VBS by using “Application.WorksheetFunction.clean()”

 

3) File paths from VBS in Mac are not what you expect.  You can not just put in the /path/to/the/file.txt and expect for it to work.  Still a little more work to figure this one out.

 

John Flanagan, author of Rangers Apprentice, visits Exeter, NH

Since the Spring of this year, I have met more authors that I knew in Exeter, NH then I have in all the rest of my life combined.  These have been arranged by the Water Street Book store.  The latest one was to meet John Flanagan the author of the Ranger’s Apprentice series.

 

I think it was about 6 years ago that I read The Ruins of Gorlan (The Ranger’s Apprentice, Book 1) to my son Christopher.  It was a fun, quick read.  Christopher and I were both captivated by the story of Will who is a 15 year boy trying to find his place in the world.  Small for his age, orphan, with dreams of becoming a knight, he is disappointed when he is not selected for battle school, but his adventure really begins when he is selected as a Ranger’s Apprentice.  The Rangers are mysterious people that are the protectors of the kingdom.  No one really knows what they do, but they are feared and respected.

John Flanagan said that one of his inspirations for the Rangers were the tales of Texas Rangers.  Considering I had lived in Texas all my life up until earlier this year, and that my father loves (did I say LOVES) Texas history, it really made us feel good to hear.


John told the story of a sheriff in a town that was having riots back in the Texas republic days.  He sends off for help and is relieved to learn that the needed help will arrive at the 9AM train the next morning.  He shows up at a train, the car opens up, and a Texas ranger with his horse trots out.  The sheriff looks into the box car expecting to see a group of police/soldiers but he only finds it empty.  He says to the Texas Ranger, “Did you bring anybody else?”  The Ranger replies, “How many riots do you have?”  (One riot, one Ranger).

There were a lot of questions about various characters and hypothetical story lines.  Questions about the possibility of a Ranger movie (very, very likely… has been in the works for a long time, but nothing definite yet… the producers are trying to get the right amount of funding, but could be in the theaters as early as next Christmas or the one afterwards).

I asked a question about his process.  He carries around a notebook in which he writes the ideas pop into his head about characters, plots, dialog, scenes.  After a while story starts to materialize.  He then works on creating a 4 page summary.  One page with the introduction, two pages for the middle and one page for the end.  Once he has this done, then he c2014-12-01 18.35.51-1reate a chapter by chapter outline (usually about 40 chapters).  At this point production really gets into gear and he writes one chapter a day.  In about 6-8 weeks he has the first draft of his book.  He then sends this off to the editor and even after publishing millions of copies of books, he anxiously awaits the feedback.  Then he gets it back with comments.  Reworks a bit of it.  And sends it back.  “The keys,” he says, ” is to plan.”

 

After the Q&A was a book signing.  We were there with the most books.  I think we have all of the books except for two.  I’ve read all the Ranger Apprentice books.  Christopher has read these, the Lost Stories, and is now working through the Brother Band series.

 

John was really gracious and generous and signed all of our books.  I told him the story of us recently moving from Texas and Christopher insisting that we bring these books along.  2014-12-01 18.45.22And now we are even more glad we did.

 

Wikipedia Paragraphs to Google Sheet Columns

I am in the process of evaluating some Robotic Simulation software.  The first part of the process is to create a list of software to evaluate.  Wikipedia offers a good starting point with a list of package names, urls, and descriptions.  But what I want to do is to put this in a Google Sheet and add additional columns to it.

WikipediaListToGoogleSheet

 

Method 1: Copy & Paste

The first method that you might consider is copying and pasting the various components into a Google sheet.  There are 34 items in the list.  Each item contains 3 parts: package name, URL, and description.  Assuming you could copy and paste each component in less than 5 seconds, that would mean about 15 seconds per item.  all told 15 * 34 = 610 seconds.  This means about 10 minutes of work.

 

Method 2: Regular Expressions

Regular expressions allow for you to match pattern of strings and then to manipulate those patterns.  This allows for you to take a task above that would take 10 minutes of steady, solid, error prone work.  But there is a method that could take that same work and turn it into less than a minute of effort.  After which you will feel smart and could use the other 9 minutes to write a blog post like this.

 

Step 1:  Click on the Edit tab in Wikipedia:  That will let you see the Wiki Markup that looks like this:

* [http://www.parallemic.org/RoKiSim.html RoKiSim]: A free educational software for the 3D simulation of six-axis PUMA-type serial robots.
* [http://www.RoboAnalyzer.com RoboAnalyzer]: A free educational software to teach Robotics Concepts and Virtual Simulation (Joint Jogging and Cartesian Motion) using CAD models of Industrial Robots.

 

Step 2:  Copy and paste the wiki markup that represents the list of items and put it in NotePad++.

 

Step 3:  Identify what you are looking for and how you want to transform it.

You can see that each list item starts with a *.  The link and package name are in “[ ]”  And there is a semicolon that you want to get rid of.

 

 

Find this:

 * [http://www.parallemic.org/RoKiSim.html RoKiSim]: A free educational software for the 3D simulation of six-axis PUMA-type serial robots.

And replace it with (the extra spaces represent tabs… Tabs allow for us to put the information into different columns in Google Sheets):

 http://www.parallemic.org/RoKiSim.html    RoKiSim    A free educational software for the 3D simulation of six-axis PUMA-type serial robots.

 

Step 4: Determine the Regular Expression that you will need to search for and the replace

 

Find: \*\[(.*) (.*)\]

Replace: \1\t\2\t

 

Here is what your NotePadd++ replace dialog box should look like.  Click “Replace All”.

Screenshot 2014-11-24 10.31.30

 

Step 5:  Copy and Paste the results into Google Sheets and you will have columns containing the URL, Name, and description.  You can then move around the columns into the order you want.

 

Figuring out the regular expression is going to be the most difficult part of this process.  It is a skill that is not widely mastered, and looks mysterious.  But it would be better to spending more time to master this skill and eventually be able to quickly pull this together quickly, than to waste that time doing copy and paste.

Arduino on a BreadBoard and using the MRF24J40MA ZigBee module

Two accomplishments today.  First, I was able to use the Atmel 328P chip outside of the Arduino board.  What is the benefit of this?  First, cost..  The Arduino UNO is currently $25 but the Atmel 328P is only $1,86 if you buy it on eBay, and only a few dollars more if you buy it from some place else.  However, you are going to need a few more components such as a 16MHz crystal, a few capacitors, resistors, voltage regulator, wires, and something mount it on..  All told, probably another $5.  Now you won’t have the nice board, the USB to serial converter, the 3.3volts power connection (could easily use two resistors to create a voltage divider to step the 5V down).  So it is not an apple to apple comparison.  But if you want to have these chips in a lot of little projects, then you are going to have a lot more options when the price gets to the $5-$10 range instead of the $25 range.

 

Also, you can compact the design down to just what you need.  You have more control over the final form factor.  And this is also a good step into the world of microcontrollers in general.  Before you know it, you will be programming the entire Atmel family of chips..

 

So, how to get started.  There were a number of really good tutorials that I looked through.:

arduino.cc/en/Main/Standalone

Here is the configuration I used to burn the boot loader onto the Atmel 328P.
20141118_122457
To program it I just inserted it into the Arduino, downloaded the program, and then removed the Atmel 328P.
Here is the configuration I have it to run the “Blink” Example  (This is the “hello world” of arduino)
20141118_122955
My other accomplishment today was getting the MicroChip MRF24J40MA module working with two Arduinos.  Starting out small, I have it so you can press a button on one arduino and a LED comes on the other:  (It really needs to be shown in a video.  I hope to upload one in the next few days)
20141118_164112 20141118_164119 20141118_164336 20141118_164339

 

 

Here is some more info about the module and how to use it:

Data sheet:

Information about data interface is in the datasheet for “MRF24J40 IEEE 802.15.4™ 2.4 GHz RF Transceiver

Data Sheet” (DS39776)http://ww1.microchip.com/downloads/en/DeviceDoc/39776C.pdf

Great Example of how to use it:
Now I would like to be able to combine the two above so that I only need the Atmel 328P and the MRF24J40MA module.  Then I will hook up some sensors (light, temperature, humidity, gas, accelaramotrs, etc.)  Then I plan to have some of these modules through out the house feeding data into a central unit that then is loading it into a database.  Then I will be able to see how different parameters of my house changes over time.  I think I should be able to have a working prototype up by the end of day tomorrow.

What I Learned in SolidWorks today

There is definitely a skill required to be productive in a CAD product like SolidWorks that will take some time, patience, and persistence to pick up.  Today I completed a number of tutorials, but I am a long way from being able to take a vision in my head and actually create the engineering drawings required to see a product produced.

 

Here are a few things that I was able to produce today:

PressurePlateModel

 

PressurePlateDrawingcreating a partAssemblyTutorials-list

Magic Card Scanner

My youngest son has thousands of Magic cards that he wants to scan. Instead of doing it manually, I thought it would be good to create a simple device to take a picture, move the card from the top, take a picture, etc.

Here you can see one of the early iterations of it actually working. It uses a PC cooling fan to pick up the top card. There is a light sensor on the bottom of the fan that is used to determine if the fan is in contact (and remains in contact) with the fan. There is one servo that moves it up and down, and another that moves it left and right. An arduino is used to control the fan and servos and monitor the light sensor. This is hooked up to a laptop that has a simple Python program running on it that uses the libraries from OpenCV to take the picture. The Python program communicates with the Arduino via the serial port.

 

Here is a video of it in action:

 

This was created a few weeks ago.  It took about 20 hours of experimentation, but it has scanned hundreds of cards.  There is quite a bit more work to be done on it to make it work as well as we would like.