Arduino Robot Project

The Arduino is an open source hardware credit-card sized PC board with a microcontroller and supporting hardware to allow it to be used for prototyping.

When I say open-source hardware I mean the board’s schematics and design is freely available to anyone to use to fabricate their own boards.

The main purpose of the board is to breakout the various pins and functions as well as provide a UCB connector so that microcontroller programming can be compiled on a PC and ‘bootloaded’ onto the controller.

UnoLabeled\

An Arduino Uno (above) and an Arduino Nano (below)

 ArduinoNano

This allows the Arduino to be used for prototyping and the construction of a variety of items.  There are a number of different types of ‘Arduino’ boards from small IC chip sized nano boards to large mega boards (a little larger than a deck of cards) which support a lot of functions.

In addition to the Arduino board, companies like Sparkfun produce plug-on boards called ‘shields’ which are designed to ‘snap on’ to the Arduino board to provide additional functionallity such as Ethernet, Wifi, Sensors, SD card slots, etc…

What people do with the Arduino is really amazing.  Some are rather silly while others are real serious.  One example is a board hidden in an elevator so when it senses the elevator going up or down it makes the ‘Doctor Who’ sound.  Another is a wireless remote-controlled robotic hand using a couple of Arduino lilypads and a glove (done by a high-school student…).

An Arduino Nano mounted in what appear to be a frame for a quadcopter  (This is not my project or picture):ArduinoQuad

The heart of the Arduino is the ATMeg microcontroller.  You can’t run windows or linux on it.  The ATMeg microcontroller combines a cpu, memory, flash memory and various circuits on a single chip.  The Arduino board basically takes these, adds some usefull components (a led, a reset button, a USB connector) and exposes the pins the ATMeg controls.  Programs manulipulate the state of these pins to interact with, sense, and control outside components (like motors, ultrasonic sensors, ethernet, etc…).

Arduino ‘programs’ are called ‘sketches’ (I think that has something to do with the history of the IDE used to code).  A ‘sketch’ is basically a C++ program and the IDE facilitates development since it has to link into the Arduino libraries and get the GCC compiler to generate binary code which will execute on the ATmeg microcontroller on the Arduino.  It also facilities downloading and ‘bootloading’ the code.  There isn’t an Operating System on the Arduino – you are literally coding on bare metal (or Silicon as the case may be).  The only thing on the microcontroller is a little bootloader to facilitate loading programs (otherwise you would need a separate microcontroller ‘programmer’ device).

I first got involved with these boards when I came across the Raspberry Pi – a simular board running the Linux operating system.  In fact I’m using one as my Voip (Voice-Over-IP) system running freePBX.  From there I moved to the Beagleboard, and the Arduino ‘uno’ (which is their basic model board).

This Robot-car project

This is a project for a Robot car. I ordered the ‘kit’ on ebay and here is what the parts look like:

IMG_0836

Features include:

Infrared remote control and recever

Arduino UNO board

Sensor Shield (which fits on the Arduino)

Ultrisonic distance sensor (used for colission advoidance)

Three sensor ‘line follower’

Motor control and 4 motors with wheels

Platform

Here is a pic of the Sensor Shield attached to the Arduino:

IMG_0840IMG_0843

The lower board is the Arduino and the upper board is the sensor shield.

Motor Controls

The motors which are attached to the wheels are powered by 4 stepper motors which are wired to the ‘motor’ control board. This takes signals from the Arduino and, using supplied power, move the motors forward and backwards.  In this case the left and right wheels are setup to operate in pairs.  If they both run forward the car goes forward and if backwards the car goes (you guessed it!) backwards.  If they go in opposite directions the car turns left or right.

A set of batteries (6 1.5 volts) supply 9V of power to the motor board to power the wheels.

The motor board also has a voltage regulator to supply 5V of power to the Arduino and sensor board.  This is how the Arduino is powered when it is not connected to the UCB connector.

Here is a pic of my setup for testing the motor controlsIMG_0847

Along the left is the bottom portion of the platform sitting on a glass (so it won’t take off when the wheels start to spin). Below that is the ‘top’ portion with the Arduino board and a battery compartment to provide power.  A USB connector runs from the computer (on the left) to the Arduino to download compiled programs – the computer itself is running Linux and the Arduino IDE.

Quick note – a compiled program, once downloaded, remains on the chip even without power – when the microprocessor is powered up it will start executing the program.  The above robot wouldn’t be much good if it had to haul around the laptop.

Motor testing.

The ‘test program’ given in the instructions was badly written and I didn’t want to use it (not to mention type it in).  I did use portions of it for basic testing (go forward, go backwards) but for the video below I rewrote to code to be more structured and modular.

Basic testing of the motor shield and motors

Hello world!

Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!

Actually this isn’t.  I’ve moved my site to a new web-host and used the wordpress export/import functions to move the content of my site over.  That required that I first create the target wordpress site and then import the contents (posts, comments, etc…).

iPad koolaid

Well I went and did it – went out and bought an iPad. In this case an iPad 4 with wifi and 128Gb. (What would I do with cellular?)

So far it seems to work pretty good. I like the ’keyboard’ more than the android tablet. Seems easier to use than those tiny keys on the droid.

Loading the apps isn’t too much different. Loading data into the apps is different. For that you use itunes.

I will keep this space updated.

Marrow Design MM256K S-100 memory Board– Mystery Jumpers…

I purchased this board on Ebay since it looks like a good 256K board for a S-100 based computer.  Unfortunately I could not find any documentation for it.

 

After receiving it I noticed there was a single bank of jumpers.  What they were for I did not know but I suspected that they were for some sort of bank or extended address selection and perhaps some options.

20130225_191639

This was marked as ‘J19’ on the board.  there are 6 jumpers out of 8 ‘positions’ – the top two (not seen above) were not selectable by jumper.

 

While I did not have the documentation – I did have a set of schematics from www.bitsavers.org (a great repository of old documentation).

 

The section of these schematics which cover this set of jumper are as:

 

MM256Jumpers

 

It looks like these jumpers are leading to some chip (U68) which I figured out to be a 8-bit equal comparator.  Comparing 2 sets of 8 bits and giving a true if they are equal.  The other side leads (eventually) to the A16 – A23 address pins of the bus.  The writing just above seems to indicate a ‘jumpered’ setting (in) is a zero and an unjumpered setting is a 1.

 

So my conclusion seems to indicate that these jumpers are used to select one of the 256K banks within the 16Mb [extended] address space of the S-100 bus.  Something which seems to conform this are some notes along the left hand of the same schematics:

 

MM256Jumpers2

 

U68 goes into the ‘A’ position (which it is – you can just make it out in the picture that it is to the left – the ‘A’ position) for Extended Addressing and the ‘B’ position for Bank select.

The HP tm2t – network / tablet convertable

My laptop is now a HP tm2t I ordered from HP.  I did not get the ‘stock’ model availabe at costco other places.  This has a Intel Core I5, dual graphics processors (one for low-power), 8Gb ram and 500Gb disk.  Multitouch display. Bluetooth and wireless N (which reall works as a wireless N – unlike the Dell Duo) and of course wired ethernet and three USB 2 ports and a HTMI port and card slot.  With Windows 7 professional.

The mutitouch display I something I really like.  To be able to scroll back and forth with a flick of a finger or go forward or back between pages.  zoom and resize with a finder gesture.

The I5 is pretty nice too (much faster than the Duo)

Sweet.

Arrogant Software

I hate it when software – or rather software manufacturers – become arrogant.  Take for example Google Update.  By the name I assume that this is used by google software to check for updates. 

However google insists that a) it run at system startup along with the hundreds of other applications which are trying to start at the same time and b) that it runs all the time.

Why does software which only checks for updates have to be running ALL THE TIME?  There is absolutely no reason for it.  I don’t care if it’s not doing anything – it’s taking up resources and a entry in the process table.

Another one is Steam – it always starts up during the startup period and prompts you to logon to steam.  I am not asking to logon or use Steam or play any games on steam.  Yet I have this damn login panel in my face.  And if it cannot connect to the internet it complains and offers to run in ‘offline’ mode – and then if you choose offline mode it bitches because it cannot connect to the server (don’t get me started on stupid software design…).

Yet another is Adobe update.  It seems that Adobe releases an update to reader, flash or air about once a month – and this panel pops up and tell you that you have to re-install. WTF?  Maybe it’s the cost of free software to have this in your face every few days or something.  I don’t even use Adobe reader (I prefer Foxit Reader – smaller and doesn’t have this frigging annoying update every few days).

SOPA and Move your Domain Day

 

Well I started the process for moving all my domains registrations (in number – 5) from Godaddy to namecheap.com.

The reasons I did it was because of Godaddy’s support of the SOPA bill (misnamed the Stop Online Piracy Act).  Godaddy has now changed their minds and decided to oppose the bill – but still they should not have supported it to begin with.  I don’t think I could _every_ trust them to watch my back – particularly since I have, a times, blogged some fairly un-politically-correct feelings.

The process was amazingly simple. I went to Godaddy and unlocked the domain names and at the same time I had emailed to me the EPP codes. These are codes which are used to transfer domains.

Today (December 29th – the official ‘MoveYourDomain’ day. I went onto namecheap.com and entered a transfer request.  I selected namecheap.com because they oppose SOPA, they offered a reduce price on this day, and they would give $1 to the EFF.  There were a number of other registration services out there I could have selected.  They even gave instructions on how to transfer my domains from godaddy.com.

Right now I am waiting.  I have a receipt for the order from namecheap.com.   But I have not received a verification email yet. I suspect that they are very busy transfering domains from godaddy.com today.

I heard that the final step is that godaddy will send me an email giving me ‘one last chance’ to change my mind and I will have to log into godaddy and verify that I want to transfer the domains.  We’ll see what happens.

I would guess that godaddy is also very busy — being gutted like a fish but its competition.

I always had a problem with godaddy’s website – far too busy and too much push for sales.  No to mention their rather sexist ads.

UPDATE 12/30/2011 – 5:20AM

This morning I found 5 emails from namecheap.com – emails they sent to the administrator of record for the 5 domains I am transferring.  Each requested that I go to a link and verify that, yes indeed I do want to transfer the domain.

I did that -  5 visits to 5 URLs 5 click on a ‘Yes I want to transfer the domain’ button.  It says that the transfer can take from 1 to 5 days – depending on the losing register.   Next I expect godaddy.com will send me an email asking me to reconsider or go to a URL on it’s site to, again, verify that I want to transfer the domain.

International Networking–Philippines

Recently I’ve had to pleasure to travel internationally and connect to the Internet from the Philippines.

Initially I expected to have, at most, dial-up networking to a local service provider using a pay-as-you go type of plan. That is what my wife (who is from the Philippines) had before and I didn’t expect any changes.

However I was pleasantly surprised to find that her parents (or actually her family there) had a DSL connection.  It only had not been paid up-to-date.

Next was a wireless router to provide wireless connection.  I had earlier sent them a Netgear wireless router I no longer used (having moved to wireless-N) – however I forgot to include the power-adaptor (Doh!).  So when I went I took along the power-adaptor as well as a separate netgear wireless access point and it’s power adaptor – which was fortunate.

When I connected the wireless router I had sent earlier with the power adaptor I sent with me to what I thought (or ass-u-me-d) was a power converter to 110 it initially worked – until the power adaptor burned out.  The ‘power converter’ didn’t really convert to 120V but kept it at 220V – which promptly burned out the adaptor.

Luckily I had also brought the extra access point and it’s power adaptor (which was compatible with the router I had sent earlier.  I also had a power converter to convert 240V to the 120V which the adaptor expects.

Note that some power adaptors can handle 220V just fine.  The adaptor for my laptop for example handles 220V ok as does the battery recharge adaptors for both my wife’s digital camera and my own D7000 Nokia.  The power adaptor for my son’s leapster however is limited to 120V as is the power adaptor for their DL – and I had to keep an eye that my 5-year-old didn’t try running his leapster off the adaptor directly into household current.

However you may need to have a physical adaptor.  My notebook’s Power adaptor has the typical three-prong-plug we’ve come to expect in the USA.  The power outlets in the home we were staying in in the Philpppines contains the Philippine two-prog outlets (of equal size).  Even without the third prong for ground it would not fit because one of the flat prongs is larger than the other.  An inexpensive adaptor for the physical characteristics of the outlet (if not the voltage) did the trick.

OK so now I had the router running.  But the Internet connection was not working because the bill to the service provider had not been paid. So off my mother-in-law went to pay it off and get it reconnected.  That took two days.  Two days without network!  EEEEKKKK!

Finally getting the DSL working I then went in and configured the router to work with the DSL modem.  Once that was done voila – broadband access. 

Then it came out that the notebook my sister-in-law had left for dead (there) was working after all.  I had looked at it earlier (at home) and the power would not come on – or rather it would come on and then off. I figured it was the power supply or regulator on the laptop.  However it now appeared to work – but nobody had the login password.  So I ran the recovery utility to restore it to a pristine state (I had earlier already copied personal files she had on it to DVD’s using a separate computer.).  And now my nephew had a laptop he could use.  The webcam didn’t work and it wouldn’t properly come out of sleep (don’t know why) but it was functional….

… until about 2 days after it was imaged when it suddenly woudn’t allow any internet access. I finally figured out that the Norton protection trialware had disabled internet connectivity until it ws configured (I hate when that happens).  I knew that if I kept Norton on there it would do the same again in 15 days (but demand payment to a subscription this time) so I removed it and installed Microsoft Security Essentials.  Note that I don’t have anything against Norton – it’s just that I knew my in-laws wouldn’t have the 3,500 Philippine pesos to spare to pay for the subscription – so it’s freebe time.

So now we have broadband DSL in my in-laws house which I can access from the nearby house I am staying in.  It wasn’t as fast as what I was accustomed to but it was sufficient for my needs and a lot more than I expected.