EEWeb’s free online circuit simulator
March 12, 2013 2 Comments
As my grandson Jared says, ..Very cool, Paw!
An Adventure in Robotics based on the Open-Source Arduino MicroController and Linux
March 12, 2013 2 Comments
As my grandson Jared says, ..Very cool, Paw!
June 17, 2012 2 Comments
As I move from courses and theory in ML and AI to application, I’m looking for practical examples and tools.
I’ve recently purchased the new book from Manning Publications – Machine Learning in Action. For those who want a practical introduction to ML, this is the book! Math is kept at a minimum with a focus on application. It’s written around using python as the tool of choice … Python is the perfect language for machine learning because of the free rich tools like NumPy and SciPy .
You can certainly assemble and build your own “pylab” to use with the book but there is a great package available.., check out Enthought‘s free EDP..
http://www.enthought.com/products/epd_free.php
It’s pre-packages everything you’ll need ..
Once you’ve developed an application in Python, you can move to C, C++ or Java for optimization and packaging your specific application. Some of my targets will be on the Arduino, which I’ll share the entire development and code.
Enjoy,
Jim
May 20, 2012 1 Comment
Hello All,
While taking my Stanford Courses, I use Khan Academy constantly as a math refresher and to get my head around new ideas in calculus and statistics (specifically advanced inferential statistics & probability).
Salman Khan has done a wonderful thing for education. He’s been recognized on 60 minutes but that’s not nearly enough as his work and example might even change the world forever …
Over the last 6 months or so, I’ve become such a fan of Khan Academy that I now find whenever I’ve a bit of open time, I’ll view random math lectures on Khan Academy for fun. The only problem is that I need an online connection. Well, problem solved. You can download the entire math section and burn it to a “usb” drive. (I bought a 32g unit from BJ’s for around $30 bucks). This enables me to view a lecture on any of my devices including my linux or mac system, at any time.
Download at: http://mujica.org/khan/
I highly recommend this! It’s excellent … basically an advanced college level math education on a stick! My pocket professor. I’ve gotten so much personal benefit and enjoyment from Khan Academy, I’ve decided to donate as well!
I hope you enjoy this as much as I have…
Jim
April 8, 2012 2 Comments
Preparing for our 2012-2014 plan to develop a few machine learning algorithms for the Arduino platform, I’ve taken (taking) advantage of a few of Stanford University’s free sponsored advanced CS courses. During the last quarter of 2011, I completed the ML course and now in the first quarter of 2012, I’m taking the PGM course. The ML course was awesome and really solidified my understanding of kernel based regression learning. Professor Andrew Ng‘s teaching style was excellent and I have all of the videos and lectures for reference. I’m currently taking Professor Daphne Koller’s PGM course covering the two main classes of Probabilistic Graphical Models … Bayesian and Markov Networks. I’ve got to warn you that the PGM course is a bit more difficult but well worth the time.
All of these courses are through Coursera.
https://class.coursera.org/pgm/auth/welcome?type=logout&visiting=%2Fpgm%2Flecture%2Findex
Additionally, If you’re interested in a great introduction to ML and PGM, mathematicalmonk has several excellent introductions to these very interesting (but advanced) concepts on YouTube.
http://www.youtube.com/user/mathematicalmonk?feature=watch
You also don’t need to be intimidated by the advanced nature of these courses. If you’ve had a little exposure to linear algebra, you’ll have no problem.
I would also recommend Khan Academy for a refresher on probability since all of these methods utilize probability in one form or onother.
http://www.khanacademy.org/math/probability/v/probability–part-1
August 28, 2011 Leave a comment
We’ll it’s been a couple of weeks since our last post. With school starting (the grandkids) and work (me), it’s been a struggle getting a post together. We have however made a little progress as we approach finalizing “Homer” but we thought this particular post might be something others might find interesting. 
Here’s a photo of Homer now with Gabe (and Gabe’s dinosaurs ..). We’ll save some of the other cool things we’ve completed for a later post so we can focus on what we’ve done with steering stabilization.
On the way to our ultimate goal of an autonomous robot capable of localization we realized that a Robot based on Differential Steering (a Track Robot like “Homer”) wanders a bit in travel. Even if you try to statically balance the motors, you will still experience drift. So we decided to try to create a sort of “cruse control” for heading based on compass angle and a PID algorithm. Although we did get PID to work, you’ll see in the code that we were able to simplify it further.
Our basic approach to “Homer’s” design was that of a state-machine. My gravatar is a neural network, just in case you hadn’t noticed. ;-)
This made establishing a Setpoint for a given state and then dynamically deriving error and applying a correction, perfectly simple .. as my grandson Jared says .. “SWEET!”
The algorithm:
When “Homer” is asked (by code or remote) to move forward, a Setpoint is taken of the current compass angle. Then, as we’re operating (polling), we test for the state of “forward” . If true we then read the current angular position, take the difference from Setpoint, derive an error, transform it to a proportional motor control signal and apply it to the motor’s speed to keep the robot in straight travel. In this video, we’ve only implemented the stabilization routine for the “forward” state. We’ll post another in a week or so, fully integrated.
I’ve posted an alpha release of the code on LMR in response to questions. I’ll post a more complete release here in a few days.
August 14, 2011 Leave a comment
We decided a few weeks ago to use the Android as a remote controller instead of building a remote control from scratch. We had started developing our android controller with Google Labs App Inventor http://www.googlelabs.com/show_details?app_key=agtnbGFiczIwLXd3d3IUCxIMTGFic0FwcE1vZGVsGPOaIgw but one of the guys over at LMR did the same thing and put it on Android Market for $2. So we decided to use Chris the Carpenter’s http://letsmakerobots.com/node/28202 RocketBot Controller.
After installing the app, It was pretty easy to pair with the Android phone but getting it connected and working took a little thought, but not too difficult.
Check the video out on youtube
(for some reason, wordpress wouldn’t embed it)
http://www.youtube.com/watch?v=AeP8vU1Uoww
I’ll post more of the detail in a follow-up post as you’ll need to change the baud rate on the BlueSmirf Silver as the Motorola Droid choked at 115,200k baud. You can see in the code below we set the BlueSmirf Silver baud at 38,400k baud.
We choose the Sparkfun BlueSmirf Silverhttp://www.sparkfun.com/products/10269 as our bluetooth adapter for Homer. It’s about 1/2 the cost of the gold version and was fine for our indoor application. (be aware that if you google bluesmirf silver, you will be directed to bluesmirf gold which is about double the cost ..)
We decided to strip homer down to essentials to configure bluetooth. We anticipated a
lot of testing and retesting with a lot of battery exhaustion and wanted to focus only on gettting bluetooth to work.
Here’s the Arduino code:
/* Android Controlled Robotshop Rover
Author - Jim Winburn > Appiphania.com
uses Chris Carpenter's RocketBrand Android Controller
Note : Directional Function only in this example.
D1 - Forward
D2 - Left
D3 - Right
D4 - Reverse
D5 - Stop
*/
#include <NewSoftSerial.h>
#define BlueSmirf_RxPin 2
#define BlueSmirf_TxPin 3
NewSoftSerial nss(BlueSmirf_RxPin,BlueSmirf_TxPin);
int E1 = 6; //M1 Speed Control
int E2 = 5; //M2 Speed Control
int M1 = 8; //M1 Direction Control
int M2 = 7; //M2 Direction Control
int leftspeed;
int rightspeed;
int i;
int qualifier;
int dataByte;
void setup()
{
//Serial.begin(9600);// on for debug
nss.begin(38400); // best baud for Motorola Droid tested
// set up motors
for(i=5;i<=8;i++)
pinMode(i, OUTPUT);
// Motor tuning - since this is a track vehicle
// and motors are never exact, they must be tuned ...
//255 is maximum speed
leftspeed = 255; //adjust to balance motors
rightspeed = 195;//adjust to balance motors
}
void loop()
{
if(nss.available()>1)
{
qualifier=nss.read();
dataByte=nss.read();
}
/* uncomment below to debug with serial monitor
Serial.print(byte(qualifier)); //will display "D" instead of "68"
Serial.print(" : ");
Serial.print(dataByte);
Serial.println("");
delay(1000);
*/
switch (qualifier)
{
case 'D':
switch (dataByte)
{
case 1: //forward
forward (leftspeed,rightspeed);
break;
case 2: //left
left (leftspeed,rightspeed);
break;
case 3: //right
right (leftspeed,rightspeed);
break;
case 4: //reverse
reverse (leftspeed,rightspeed);
break;
case 5: //stop
stop ();
break;
}
}
qualifier=0;
dataByte=0;
}
// functions
void stop(void) //Stop
{
digitalWrite(E1,LOW);
digitalWrite(E2,LOW);
}
void forward(char a,char b) //Forward
{
analogWrite (E1,a);
digitalWrite(M1,LOW);
analogWrite (E2,b);
digitalWrite(M2,LOW);
}
void reverse (char a,char b) //Reverse
{
analogWrite (E1,a);
digitalWrite(M1,HIGH);
analogWrite (E2,b);
digitalWrite(M2,HIGH);
}
void left (char a,char b) //Left
{
analogWrite (E1,a);
digitalWrite(M1,HIGH);
analogWrite (E2,b);
digitalWrite(M2,LOW);
}
void right (char a,char b) //Right
{
analogWrite (E1,a);
digitalWrite(M1,LOW);
analogWrite (E2,b);
digitalWrite(M2,HIGH);
}
August 6, 2011 Leave a comment
I think this is something everyone involved in this wonderful hobby actively thinks about. What is the future of Robotics? What are the opportunities? My personal opinion is that we’ll soon see a wave of co-robots …machines that assist humans in tasks that robots are more effective. Actually, that time is already upon us with the “seed” of all of the micro-controllers embedded in almost everything!
Robot systems have been involved for 30 years or more working in harsh, dangerous or difficult environments… Mostly monotonous work. This was about business efficiency.
Many of these first robots were very simple and operated in highly controlled environments but were mostly not autonomous.
I think we’re seeing an evolution in robot autonomy as well as “smarter” robots, helping provide solutions/ solve problems that require complex calculations and/or capabilities perhaps impossible from a human perspective.
Hanson Medical’s Magellan System
http://www.hansenmedical.com/us/home.html
and Intuitive Surgical’s da Vinci® Surgical System
http://www.intuitivesurgical.com/products/ are excellent examples.
In my opinion, this is due to advances in technology (related to Moore’s law), lower costs and being embraced by the open-source and hobby community.
Remember, the “hobby” community is where Apple originated. This is evidence of the powerful combination of lower costs and the inventive nature of the hobby community … If the MOS Technology 6502 had not been introduced at a lower cost, would Steve Wozniak built that first Apple?
I don’t think ever we’ll know the answer but … I think it all turned out pretty good. ![]()
I remember reading this advertisement. I wanted one so badly but couldn’t afford it.
A few improvements from that first Apple 1… interestingly, for about the same $
Automation is another closely related area that I think we’ll also soon see new business applications based on some of the same technology. Business process automation integrating human and system (artificial) intelligence will soon be realized.
http://www.technologyreview.com/computing/26535/
http://www.cs.vu.nl/~pp/public/BNAIC05_ICAI.pdf
The Robot Report is a very interesting site about the business of Robotics.
This is a fascinating site aggregating the evolving world of the robotics business.
http://www.therobotreport.com/

August 2, 2011 Leave a comment
Last week, I had an Arduino Nano “brick” (http://computer.yourdictionary.com/brick); I was so excited as it gave me the excuse to order the AVRISPmkll In-System programmer. I’ve been reading AVR Freaks http://www.avrfreaks.net/ and have decided to delve a little deeper and do a little direct programming on the Atmega AVR. I’ve actually got a old Cubloc CB220 that I want to “own” …thought this would be a fun hack.
Anyway, just wanted to post that anyone who needs to bootload directly from theArduino IDE using Ubuntu (I’m using 9.10) will need to create a new file /etc/udev/rules.d/99-avrispmkii.rules with the following line:
BUS=="usb", ACTION=="add", SYSFS{product}=="AVRISP mkII", MODE="0666", SYMLINK+="avrdev"
I created this file and saved it to my Desktop, then used the following to move it to /etc/udev/rules.d.
sudo mv /etc/udev/rules.d/99-avrispmkii.rules
Restart then open the Arduino IDE and choose Tools > BootLoader > w /AVRISP mkll
and watch Arduino do it’s magic! By the way, I think the filename can be whatever you’d like but must begin with a number higher than the other rules already in the /etc/udev/rules.d directory.
Credit: http://binblog.info/2010/11/10/atmel-avrisp-mkii-on-linux/
July 25, 2011 Leave a comment
As a follow up to my previous post on modifying the DFRobot Nano Shield.
July 23, 2011 9 Comments
Note: The DFRobot Nano Shield is correct for Gravitech Nano prior to V 3.0. This modification is only necessary for V3.0!!!
We’re adding the Nano as we mentioned last week, to control the servos (and possibly other sensors/actuators if needed).
We ordered two shields from DFRobot to provide nice compact pinouts for sensors and servos. I really like these as their design accommodates separate power for servos and such.
The Nano I/O Shield ( DFR00120 ) and the IO Expansion (DFR0088) from DFRobot.
http://www.dfrobot.com/index.php?route=product/product&filter_name=DFR0088&product_id=264
http://www.dfrobot.com/index.php?route=product/product&filter_name=nano&product_id=68
We’ve discovered a minor problem with the Nano Shield. The Analog pin-outs are reversed. The board is labeled 7>0 but it’s actually 0>7.
This shouldn’t be a problem (just remember when you code) except for I2C. SDA and SCL are connected to A2 & A3. The I2C library works on A4 & A5.
Our solution:
Cut the land here:
Make two connections as such: 8th & 9th pins to the respective SDA & SCL pins on the I2C headers.
Since we were making hardware modifications and recognizing I2C typically needs pull-up resistors, we added a couple of 4.7k to the SDA and SCL headers.