Older blog entries for Spoons (starting at number 4)

As a user of the OOPIC microcontroller, I have been frustrated now for a while at the lack of good development tools for that micro. This primarily means a good development IDE/debugger, and a good compiler. Ths existing IDE and compiler have many known bugs which add to the frustrations of OOPIC code development and testing. In addition, the C language support of the compiler is rather non-standard with many features missing, and other language details wrongly implemented (eg locally declared variables are actually created as globals, and function return values simply do not work!).

In addition, the existing OOPIC development tools only run on Windows, and the IDE in particular has problems with certain versions of Windows related to VB dependencies.

With all this in mind, myself and a few other OOPIC users have started a project to create a high quality, open source, cross platform compiler for the OOPIC microcontroller, which will have as close to standard C support as is possible for that microcontroller, along with BASIC and Java syntax support with many features and fixes above the existing proprietary compiler.It will run on Linux, Windows, and potentially OSX.

We have a SourceForge project set up for this, which we are currently using to discuss design issues prior to implementation, using Sourceforge's mailing list feature. If you would be interested in participating, please take a look here

I have uploaded some useful networking libraries for the OOPIC microcontroller to my website, to allow:

  • Sharing of an 8-byte buffer within a slave OOPIC across an I2C network
  • Access to a slave OOPIC's EEPROM across an I2C network (ie network access to up to 32kb of shared data)

These utilities should make networking multiple OOPICs considerably easier, especially in applications where oDDELink doesn't quite do what you need, and in particular projects involving data acquisition etc.

The code is under the GPL license, so please feel free to use, modify, redistribute, tweak to your heart's content, within the terms of the GPL license.

I intend to keep uploading any useful robotics-related code to that site, so if this interests you, do pop in and have a look.

Check out the downloads page at: www.octrix.com

8 Apr 2004 (updated 8 Apr 2004 at 20:28 UTC) »

Today I replaced the two electric screwdriver motors on my robot with a pair of electric window motors, recovered from a Jeep at a local scrap car place. These are better than the screwdriver motors because:

  • They are a mirror image of each other, so suit a differential drive perfectly. The screwdriver motors had to be mounted in opposite directions, using up more space
  • They use a worm gear, run slower than the electric screwdriver motors, and have higher torque
  • They have a proper shaft coming out which I was able to couple with my axles using standard shaft couplers. I was never able to remove the drill chucks on the other motors, so had to use the chucks to couple with axles, which inevitably led to some slippage
  • They are a lot quieter than the drill motors, presumably because they are better quality motors and use a worm gear instead of what I'm guessing is maybe a dozen conventional gears
  • The window motors have proper mounting holes, making mounting onto the robot chassis fairly easy. The screwdriver motors were an extremely awkward shape, with no mounting holes or anything, and the way I was finally able to mount them was neither elegant nor especially robust

Also, previously I had my optical quadrature encoders mounted directly onto the shafts from the motors, and I was never happy with this arrangement. I have now coupled the encoders using timing belts and pulleys, which is much more satisfactory.

I still have a small about of backlash between the wheels and axles. This is due to the fact that the wheels aren't really ideal for driving from a drive shaft (they were intended as free-wheeling wheels). If anybody knows where I can get a pair of wheels of 4-6" diameter with a good solid coupling to 1/4" shafts (set screw or pin or whatever), please let me know at neil@octrix.com.

30 Mar 2004 (updated 30 Mar 2004 at 23:08 UTC) »

I have uploaded some of the more re-useable code from my robot to my website. This currently comprises user classes for the OOPIC microcontroller, for easy control of:

  • Al Williams PAK-II floating point co-processor
  • Milford Instruments serial LCD module
  • 4QD NCC-35 motor driver board

The code is under the GPL license, so please feel free to use, modify, redistribute, tweak to your heart's content!

I intend to keep uploading any useful robotics-related code to that site, so if this interests you, do pop in and have a look. Check out the downloads page at: www.octrix.com

The robot now has two OOPIC-based CPU boards, one designed to specialise in driving the motors, and one as a master controller CPU.

The motor OOPIC board sends PWM out to the 4QD motor controller boards, and monitors the current drawn by the motors, and signals from a quadrature encoder mounted on each drive shaft.

The master controller OOPIC has RS232 interfacing electronics, and will eventually interface to a central PC/104 system running Linux, via the SCP protocol. Its job is to receive messages from the PC/104 system and route them to the appropriate board via I2C, for example to control the motors or to request sensor information.

I've also built a maths co-processor board, based on the Al Williams PAK-II, which will be used by the OOPIC boards for fast flaoting-point calculations. These are required for a PID speed control algorithm on the motor board (although not strictly necessary, floating point will make this considerably easier), and by a board yet to be built which will control a set of sonar sensors mounted on pan/tilt units. The board will use the maths co-processor to perform geometrical calculations to merge data from sonars placed at different positions around the robot.

The next job is to write and test the PID speed control software.

Share this page