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.

Learning SolidWorks

My main goal for today is to be able to learn to do basic things in SolidWorks.  This is a popular CAD package that can be used for mechanical design.  I have some visions for some robotic devices, and I think the first step is to be able to get them into some tangible form.  The Artisan’s Asylum has a computer lab with SolidWorks installed.  And I have a class tonight on Analog Electronics that I have to go there for anyway.  So my plan is to buy a day pass, spend the day going through tutorials and creating some very basic physical designs.

 

At the present time I am on the Amtrak Downeastern to Boston, and I thought it would be good to find a few tutorials that I could work through while I’m there.  Here is what I found:

 

I found this “How to build a Robot” tutorial for Solidworks.   It looks to take someone from not knowing anything to doing something fairly practical: www.solidworks.com/sw/education/9959_ENU_HTML.htm

 

I also found a number of other tutorials and sites to check out:

 

 

www.solidworkstutorials.com/

 

Lynda.com has some SolidWorks courses: http://www.lynda.com/Solidworks-training-tutorials/1157-0.html  I have taken some of their online courses before, and they were all of very high quality..  It is a paid service, but really reasonable.  (http://www.lynda.com/SolidWorks-tutorials/SolidWorks-2014-Essential-Training/143606-2.html)

 

Professional SolidWorks training: http://solidwize.com/

www.solidprofessor.com/training-plans/solidworks/

 

 

Great One Liners for Today

I’ve been reading through: Great One Liners

Here are some really good ones from today:

 

To err is human, but to really foul things up requires a computer

 

Never do card tricks for your poker buddies.

 

Never mess up an apology with an excuse.

 

Government’s view of the economy could be summed up in a few short phrases:  If it moves, tax it.  If it keeps moving, regulate it.  And if it stops, subsidize it.  —Ronald Reagan

 

Inside every senior citizen is a younger person wondering, “What the hell happened?”

 

A will is a dead giveaway.

 

A clear conscience is usually the sign of a bad memory.

 

When I die, I want to die like my grandfather–peacefully, in my sleep.  Not screaming, like all the passengers in his car.

 

I think I know how Chicago got started: bunch of New Yorkers said, “Gee I’m enjoying the crime and the poverty, but it just isn’t cold enough.  Let’s go West.”  — Richard Jeni

 

Never be afraid to try something new.  Just remember:  amateurs built the Ark; professionals built the Titanic.

 

When someone says “penny for your thoughts” and you put your two-cents in, where does the extra penny go?

 

Why is it that if someone tells  you that there are 1 billion stars in the universe you believe them, but if they tell you a wall’s paint is wet, you will touch it to be sure?

 

A verbal contract isn’t worth the paper it’s written on. —Samuel Goldwyn

 

Television is a medium because it is neither rare nor well done.  — Ernie Kovaks

 

My husband and I divorced over religious differences.  He thought he was God and I didn’t.

 

The quickest way to double your money is to fold it in half and put it back in your pocket.

 

The quickest way to find something lost around the house is to buy a replacement.

 

Nobody is listening until you make a mistake.

 

For every action, there is an equal and opposite criticism.

 

A government big enough to give you everything you want is strong enough to take everything you have. — Thomas Jefferson