Magician Chassis

clock June 19, 2011 19:26 by author kimm

Dagu’s Magician Chassis is now in stock. This is a great little robot platform featuring two gearmotors and chassis plates with all kinds of holes and cuts that make it easy to mount sensors, servos and other components.

The space between the plates is a good spot to put some batteries and few sensors at the front. The chassis plates are acrylic plastic and are quite easy to drill and glue.

 

Magician Chassis 

 Magician Chassis - Front Magician Chassis - underneath Magician Chassis - with fruit attached



Dagu Servo Fun

clock June 7, 2011 19:12 by author kimm

We’ve got a few new products coming in from Dagu Electronics. If you’ve spent anytime on the friendly http://letsmakerobots.com/ site you have probably come across Dagu and their products.

For starters we have a few servo motor bits and pieces…

 

8g Servo

The little 8g servo is great when you need a cheap servo or many:

dagu 8g micro servo

 

Continuous Rotation Servo with Wheel

Looking for a cheap robot drive system. Put two of these things together for full speed and direction control.

 

Continuous rotation servo with wheelServo and Wheel on a robot

 

 

Pan and Tilt Bracket With Servos

This pan/tilt kit, designed by the members of "letsmakerobots.com" has mounting holes to suit almost any range sensor and includes 2 miniature servos plus all the nuts and bolts required for assembly.

 

Dagu Mini Pan and Tilt Kit



.Net Micro Framework is here with Netduino

clock January 20, 2011 20:57 by author kimm

 NetduinoWe are now at the start of a wave of new boards using 32 bit processors that are actually affordable for the hobbyist. This has opened the door for interesting programming languages like Microsoft’s C# to be run on resource constrained devices. 

Our first devices are the Netduino and Netduino mini. You can program these boards using Microsoft’s Visual Studio development tools. Programs are written in C# (bit like Java) and they can be debugged while running on the board in real time. Now you can know what is going on!

Under the covers is the .Net Micro Framework which executes the code, provides memory management and includes a lot of code libraries written for low level operations so you can concentrate on the fun bits.

The development process is very fast and easy to learn and best of all the tools are free (as in beer).

These boards are an excellent way to get into embedded programming on small devices. If your a more of an expert then you can use the full power of C# to build complex programs using object-oriented techniques. Either way, these things are a way to get a project done fast.



PayPal is back again

clock January 18, 2011 19:49 by author kimm

Thanks to requests, PayPal is now back as a payment option. We dropped support for PayPal last year because it is an annoying system for a seller and is a kind of lame user experience. But it does work for buyers so its back on again.

We still also take credit card payments via the Commonwealth bank as before which is faster or you can now use PayPal if that is preferred.

Hope this makes things easier

Kim



Kinect Controlled Humanoid Robot

clock January 17, 2011 20:01 by author kimm

There's been a barrage of Kinect hacks coming out ever since the device hit the streets. This one really shows just what an amazing piece of hardware it is for $150. How many joysticks and buttons would it take to do this?



Yet Another Forum

clock January 15, 2011 21:59 by author kimm

We want you to get answers fast. That takes a lot of people to answer questions but instead of creating yet another forum we recommend these sites:

General Robotics and Electronics:
http://electronics.stackexchange.com/
For all general electronics and robotics help with very fast responses. Another StackOverlow love child, not really a forum but so much better. Thanks due to littlebird for firing this up before being annexed by the Jeff & Joel empirial forces.

Pololu Robotics:
http://forum.pololu.com/
Best for technical questions relating to Pololu products. Very active support by Pololu engineers.

SparkFun Forums:
http://forum.sparkfun.com/
Best for technical questions on SparkFun products. Huge community.

Robot-Electronics / Devantech:
http://www.robot-electronics.co.uk/forum/
Manufacturers forum for Devantech products. Great support from Gerry and the team.

Arduino:
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl
Official Arduino Forum - Huge community



Obstacle avoidance with a PICAXE 08M - Part2

clock August 8, 2010 12:38 by author kimm

After a long period of procrastination here is the follow-up to Part 1 of Obstacle avoidance with a PICAXE 08M.

This is a simple obstacle avoidance robot using a PICAXE 08M.  Basically the robot moves around powered by the SN754410 motor driver  and uses the Sharp  GP2D120 IR Distance Sensor to detect objects in front. In this post I cover the circuit and components used, so for a description of the operation and code please see part 1. It will make more sense then.

 

Picaxe 08M Robot

Disclaimer: You can tell from the wiring mess that this was put together without a plan. The following schematic was drawn well after construction so if you do use it for reference please check to avoid building a small smoke machine! If you spot an error please let me know.

 

Picaxe 08M with Motor Driver

The schematic is fairly basic and omits a bunch of components that would be used in higher power situations like EMF protection diodes.

In the first half “Picaxe Programmer, Logic, Power” the Picaxe chip is connected to a stereo socket via a couple of resistors. This forms the required programmer circuit for a Picaxe chip to connect to the Picaxe programmer cable. I added this to make it easy to plug the robot into the cable for lots of trial and error programming. A DPDT switch is included because it was the smallest one I could find and next to that ‘LED 5’ is used as a power indicator.

The motor driver requires two pins for direction control of each motor and since there aren’t many output pins on the Picaxe 08M a little trick is played to control the motors. Q1 & Q2 each form an inverter logic circuit so when Pin4 goes high MA1 is high and MA2 is low and vice versa, similarly for Pin2 and MB1, MB2. This gives direction control for both motors from just two pins on the Picaxe. To stop the motors and provide speed control both motors are enabled via the only PWM output pin on the 08M. From only three pins we now get full speed and direction control of both motors.

In the ‘Motor Driver’ circuit there is very little going on with a few LEDs included for dramatic effect. EMF protection diodes are not included as the GM10 motors draw little current. The datasheet for the SN754410 recommends protection diodes when operating closer to the maximum ratings but for this case it seems ok. C1 & C3 are little ceramic capacitors added to cut down on noise from the motors.

No doubt there are many better ways to design this circuit, so don’t take it as gospel!

Here’s the complete list of parts for reference:



Robot uprising not all bad news

clock July 27, 2010 20:07 by author kimm

After seeing the disturbing Big Dog in action it seems that we will soon be overrun by robot dogs, cows and other 4 legged mechanical creatures that force us to do there bidding. Fortunately when that day comes there will still be plenty of pancakes – yay!

The boffins at ProgrammingByDemonstration.org demonstrate how a robot arm is able to learn motor skills by reinforcement learning.

 

 

Still a long way from a true master pancake chef.

 

Source: http://programming-by-demonstration.org/showPubli.php?publi=3018



New Stuff for July

clock July 16, 2010 06:39 by author kimm

Motor Drivers now come in “Extra Biggie Size”

 

Introducing the Sabertooth 2x25 .  Driving two DC motors with 25A continuous rating the Sabertooth 2x25 is the driver for big robots having proven itself up to the task in many battle bots. Sabertooth 2x25 Dual Motor Driver

Like its little siblings the 2x10 and 2x5, it features thermal protection and soft current limiting making it very hard to kill. This versatile driver communicates via serial, packetized serial, radio control PWM signals and analog voltage

Inventor’s Kit

We now stock the Arduino Inventor’s Kit from SparkFun. This includes a whole bunch of bits and pieces plus a 36 page book to enable you to build some cool projects. An excellent place to start if you want to learn about microcontrollers and electronics.



Obstacle avoidance with a PICAXE 08M - Part 1

clock June 27, 2010 10:18 by author kimm

[Edit: Part 2 is here with the circuit and components used]

PICAXE 08M chips are small & cheap but they don’t have a lot of program space,  only 256 bytes. That means about 220 lines of code at the very most. But that’s the fun bit, squeezing more into less.

Not included in that tiny 256 bytes is the Picaxe firmware already on the chip which includes all kinds of commands for controlling servos, serial, I2C & infrared communication, playing sounds and more so really it is the little chip that can. Still, 256 bytes isn’t much.

 

Picaxe 08M RobotThis little robot avoids stuff using a Picaxe 08M & Sharp Infrared sensor. On the top there is one Picaxe 08M (centre front) and behind that a SN754410 motor driver flanked on either side by a few components such as capacitors, transistors and LED’s for the required blinky light fun. A Picaxe programmer is  built in using the stereo socket and a switch for on/off control.

 

Poking out the front is a Sharp  4-30cm infrared sensor  and mounted underneath are two Solarbotics GM10 geared pager motors. Four AAA batteries are jammed in there with two on top and two underneath.

The whole lot is soldered and hot glued to the veroboard base. Here’s the underside with my dodgy soldering. I expect it will catch fire eventually ;)

Picaxe08M Robot underside

Operation is pretty simple. Pin 1 on the Picaxe 08M reads the analog voltage of from the Sharp GP2D120 infrared sensor and the code then decides to drive forward or avert danger as required – beware of socks and shoes. Picaxe output pins 4 and 0 control the direction of the motors with 2 PNP transistors acting as invertors so that the 2 pins provide logic to 4 pins on the SN754410 motor driver chip. Pin 2 provides the same PWM (Pulse Width Modulation) signal to both sides of the motor driver so the power to each wheel is the same.

The code is a simple state machine, implemented as a switch statement:

'Differential drive robot
' by Kim McCoy
'
' Drives around not running in to too many things.
'
'Configuration:
'
' Brains
'	PICAXE 08M
'
' Drive
'	SN754410 Dual H-Bridge Motor Driver Chip (Texas Instruments)
'	  similar to L293D
'	2 x Solarbotics GM10 motors and wheels
'
' Sensors
'	1 x Sharp GP2D120XJ00F (4-30cm) infrared ranger

'Variable symbols
symbol state = b4
symbol irFront = b2
symbol lastIrFront = b3
symbol stallCount = w0

'Robot states
symbol STATE_IDLE = 0
symbol STATE_FORWARD = 1
symbol STATE_SPINLEFT = 2
symbol STATE_SPINRIGHT = 3
symbol STATE_REVERSE = 4

'Setup & initialization

'motor A,B direction control pins
output 4, 0 
high 4
low 0

' set pwm duty to stop
pwmout 2,49,0 

let state = STATE_IDLE
pause 3000 'wait to get clear before letting loose

main:
	'Get front IR sensor value
	readadc 1, irFront
	
	'Detect if the robot is stuck on a sock or something
	'and take evasive action to wriggle free	
	'Time to detect a stall is emperical only, picked
	'a number that doesn't cause false positives too often.
	let stallCount  = stallCount + 1
	if stallCount > 1000 then
		gosub goBack
		pause 2000
		gosub spinLeft
		pause 1000
		gosub spinRight
		pause 1000
		let stallCount = 0
	end if
	
	if irFront >= 140 then
		'Reverse out if too close to something
		gosub goBack
	else
		select case state
			case STATE_IDLE
				'go forward
				gosub goForward
				
			case STATE_FORWARD
				if irFront > 50 and irFront < 140  then
					'Something is in front. Take evasive action
					'by spinning left
					let lastIrFront = irFront + 20
					gosub spinLeft
				end if
			
			case STATE_SPINLEFT
				if irFront > 50 and irFront < 140 then
					if lastIrFront < irFront then
						'Got closer to obstacle - try the other way instead.
						let lastIrFront = irFront + 20
						gosub spinRight
					end if			
				else
					'All clear
					gosub goForward
				end if
			
			case STATE_SPINRIGHT
				if irFront > 50 and irFront < 140 then
					if lastIrFront < irFront then
						'Got closer to obstacle - try the other way instead.	
						let lastIrFront = irFront + 20			
						gosub spinLeft
					end if			
				else
					'All clear
					gosub goForward
				end if
				
			case STATE_REVERSE
				'Back out until well clear
				if irFront < 100 then
					gosub goForward
				end if
		end select
	end if

	
goto main ' loop back to start

'Drive Forward
goForward:
	'Reset the stall count - has attempted to move forward again
	let stallCount = 0
	
	pwmout 2,49,300 ' set pwm duty
	high 4
	low 0	
	state = STATE_FORWARD
return

'Reverse out
goBack:
	low 4
	high 0
	pwmout 2,49,80 ' set pwm duty
	state = STATE_REVERSE
return

'Spin right
spinRight:	
	high 4
	high 0
	pwmout 2,49,50 ' set pwm duty
	state = STATE_SPINRIGHT
return

'Spin left
spinLeft:
	low 4
	low 0
	pwmout 2,49,50 ' set pwm duty
	state = STATE_SPINLEFT
return

 

A code walkthrough…

 

image

Looks like I’ve 16 bytes to spare. What a waste!

At the start of the main loop ‘:main’ we read the value from the Sharp GP2D120 analog sensor. This returns a value between 3.3V and 0V depending on how far the distance in front is. Picaxe readadc function converts the analog voltage to a value between 0-255 for a range of 0-5V. Since the Sharp sensor only goes to 3.3V the maximum value possible is about  168.

Ignoring the next bit about stalling, the code then enters a big switch statement that determines what to do next. If the distance in front drops below 140 the robot will spin left first. If it detects that spinning left gets it in more trouble it will spin right. So if the distance in front is decreasing while spinning then trouble looms – spin the other way. It continues to spin left or right until it finds a clear path forward.

Sometimes the robot gets too close, too fast!In this case it hits the breaks and goes into reverse ‘STATE_REVERSE’ at the bottom of the switch statement. It will then back out, go forward and probably start to turn left or right.

Back to stalling: After a while of driving around reality bytes. The robot gets stuck on a power cord, sock or jammed in a spot. Fortunately we’ve been incrementing a variable ‘stallCount’ for every loop. Eventually when this hits 1000 the robot starts the anti-stall measures, attempting to go back, left and right to wriggle free. Every time the robot goes forward the ‘stallCount’ is reset to 0 so as long as the robot moves around normally the anti-stall code is never called.

How is it built?

The circuit includes the use of a motor driver, PICAXE chip, inverter circuits and a built in PICAXE programmer. I’ll put the details up in a later post once I’ve drawn the schematic.