All | 43 Folders | Accessibility | BoingBoing | Books | Computer Related | Family | Films | General | Hacking | Hobbies | Humor | Java | Links | Omni | OpenSolaris | Puzzles and Games

Main | Next day (Jun 17, 2004) »
20040616 Wednesday June 16, 2004

Playing with LEGO at Sun - Mentoring Projects

Introduction.

Last year I was given the opportunity to be a mentee in the SunSigma Engineering Mentoring program that started in March 2003. As I've been working for Sun for 17 years, have over 29 years of professional software programming experience and am being excellently mentored in specific areas by various people as part of my ongoing software duties, I decided to try something different.

I was inspired by the Technology and Courage paper by Ivan Sutherland.

I decided I'd like to try to increase my knowledge in an area I've just started getting interested in - electronics and hardware design. I want to combine this with fun projects, that I can share at a later date with my son as he grows up.

My aims included:

My mentor was Russ Mirov, a hardware distinguished engineer and all around great guy.

As electronics and hardware project construction were new to me, my primary goal was to try to be self sufficient in constructing new simple circuits by the end of the six month mentoring period. Follow-on work would be to try to fully understand the theory behind such circuits and then to try to gain enough knowledge to construct simple electronic circuits from scratch.

A secondary goal was to construct circuits that my son would be interested in playing with. To that end, after some initial simple radio circuits, the other projects were designed to work with his LEGO which he enjoys playing with tremendously.

I ordered the various parts needed for each project online from places like Jameco Electronics. The intention was to just develop DC circuits for this mentorship.

As part of the learning process, I did some background reading. The books I used were:

AM Radio Circuit.

The aim of this first project was to learn some basic skills. I already had built a Technokits MW IC AM Radio circuit kit. This uses a MK 484 Integrated Circuit.

Initially I transferred this project over to a solderless breadboard with wire jumpers that I already had. As we would be prototyping several circuits in later projects it was good to learn how to do this sooner than later. There were some useful instructions on the web to help me learn how to do this. My first attempt didn't work, so I ended up having to double check each connection, and draw the results on a piece of paper. I had just one wire (one of the two wires to the crystal earphone) attached incorrectly. I adjusted that, and the circuit starting working nicely.

I then started working towards moving the projects onto a printed circuit board. My first thought was to take the schematic for the circuit, and use a freely available CAD application such as CADint My mentor pointed out that as this was a simple schematic, it was easier to just do it by hand. I used a special PC board kit from Radio Shack.

Once the layout was drawn on the copper board in etch resistant ink, I created the PCB, following the instructions in the kit.

There are lots of great sites on the web for more detailed instructions on how to do this process. Here's one of them.

Holes had been drilled through the board for the placement of all the components. The next step was to solder them onto the PCB. I have special computer screen reading glasses, which are designed to work with me being about 18 inches from the object in focus. This made it hard to see what I was doing as I was attempting to solder for the first time. I then tried using the microscope they had in the hardware lab in MPK28, and this made it much easier. Because of this, I ordered a desktop magnifying stand and used this in conjunction with a bright lamp to do my soldering.

All the components were soldered to the board. I bought a Radio Shack AA battery holder and used a couple terminals to connect the crystal ear-piece, so that it could easily be used with other projects if so desired. There were a few places where the copper tracing was not continuous and debugging the circuit by "ohming around" found those. The simple fix was to just solder over them. If the break was too big, then a small piece of wire was soldered in place to bridge the gap.

The radio is now working nicely.

Along the way I've been learning how to use a multimeter. Eventually I'd like to learn how to use an oscilloscope to test the functionality circuits. Hopefully these are basic tools that I will need to master for most of the projects.

The circuit for this project can possibly be extended with an amplifier and loudspeaker. There are Technokits kits available (SK-201, SK-105 and SK-603) that have this functionality, but it would be nice to try to do this using the specification of the radio and these three kits, by buying individual components.

FM Radio Circuit.

The aim of this project was similar to the last project. It's to try to create a simple FM radio from an existing circuit diagram and instructions.

Steps here were:

  • Obtain all the components from mail order catalogs, web sites or at Radio Shack.
  • Design and etch the printed circuit board.
  • Drill holes for attaching the components.
  • Solder (or otherwise attach) the components to the PCB.

Various mistakes were made. They are listed here along with the action that was taken to fix the problem:

The radio then working nicely.

After this project was almost finished another web site was found that had a very similar circuit but much more detailed information on how to put it all together. If I was doing this project again, these would be the instructions I would use.

Soldering practice with kits.

One thing was clear from doing the two radios and that was that I needed more practice with a soldering iron. I also needed a better soldering iron - something with a finer tip. I went to Fry's and purchased a Hakko Model N454JN-V12 plus a fine tip for it.

I then ordered a couple of kits from Jameco:

Both of these kits were straight forward. I did all the soldering by viewing the board and components to solder through the desktop magnifying glass. It helped a lot. Here's the results of the Rocket Robet soldering, top and bottom. In both cases the soldered circuit board would not work the first time. For the metal detector, I forgot to strip the ends of the enamelled wired used for the coils, so there weren't good soldered joints there. For the Rockit Robot, I'd missed or poorly done some of the joints. My mentor went over everything, found and quickly fixed the flaws.

One more point about the Rockit Robot deserves mention for anybody else who tries to make it. I had some problems with the gears not meshing correctly between the motor and the rear axle. The solution is to make sure that when you put the rear axle and all its components together it's exactly five inches in length. The manual mentions that this is important, but it's really important. After I hammered that a little more, everything works just fine. Nice kit.

Simple Radio Control Circuit (for LEGO).

Radio control cars are getting to be very inexpensive nowadays. There are toys available such as KG Racer and Tedco Micromites that are under $20.00.

My original goal with this project was to have an R/C LEGO "brick" that will work with the motors that LEGO make available, and which can be driven by a separate simple 2 channel R/C transmitter. It could then be made to work with any LEGO vehicle.

As a first step, I took the circuit board out of the KG Racer car. My intention was to replace the two motors with connections that would drive standard LEGO motors. The problem here was that the KG Racer receiver circuit was designed to work off 3 volts. After looking at a document describing performance characteristics of the various LEGO motors, it was clear that the ones I have couldn't be driven off 3 volts.

So I photocopied and enlarged the circuit board, labeling all the components. From this my mentor was able to work out where a small cut could be made in the board such that the motors could be powered off a 9 volt battery, and the rest of the circuit would work off a 3 volt battery.

I made the changes needed, replacing the small motors that came with the kit with LEGO style leads so they can be attached to the standard LEGO motors. It worked superbly. I then put all the various parts inside a large LEGO "brick". This brick can now be used as part of a LEGO R/C vehicle.

A couple things to note here:

  1. The 9 volt battery is exhausted pretty quickly. An alternative might be to use the 9 volts coming from the 6 AA batteries in the Mindstorms RCX brick.
  2. A problem at the moments is that the R/C vehicles tend to come apart if they hit something too hard. The R/C "brick" that I created should really have been built with Technics LEGO beams on the sides so that it can be better attached to the rest of the vehicle.

A future project here might be to start from scratch and take circuit diagrams of a a simple toy car receiver and transmitter, and generate the equivalent circuit boards, using the various techniques learnt in the previous projects, making sure that they work with 9 volts. The plan would be to then put the receiver inside a specially created LEGO brick, and hopefully achieve something that is much smaller.

AC/DC battery replacement idea.

I had an idea for a simple AC to DC universal converter battery replacement project that I discussed with my mentor. This was greatly simplified by just buying a 500 mA Universal AC/DC adapter for this. It allows you to set the DC voltage to 3, 4.5, 6, 7.5, 9 and 12 volts. It's model 900-052 on this page.

Note that for appliances that require more than one battery, that the batteries are in series, so this battery replacement only needs to connect up the two ends (one negative and one positive).

The next step here is to construct some "fake" battery inserts using dowel and metal sheet. I would then need some advice on how to do the socket connections between the AC/DC adapter and the battery leads.

Proximity sensor (for use with LEGO Mindstorms).

Now we come onto projects to work with LEGO Mindstorms. This kit includes touch and light sensors that are rather simplistic. My aim here was to try to generate new custom made sensors that are more useful, and will provide more fun projects.

The first one is a proximity sensor. This sensor has been made and attached (in as small as possible space) to half of a RadioShack dual mini board.

Some points of note here:

The next step was to trim the mini board to it's smallest possible size. Rather than place it inside a LEGO "brick" (which is beyond my current miniaturisation skills), the sensor was just taped to the front of the test LEGO robotic vehicle. The first choice of vehicle (the Acrobot) was unsuccessful as the vehicle moved to fast and the sensor did not have time to react quickly enough. The second choice was a Roverbot with tracks (and a gearing mechanism to slow it down). Apologies for the quality of the pictures. A slightly more sophisticated NQC (Not Quite C) program was written that would drive the robot vehicle, and when the sensor detected an object nearby, reversed one of the motors for 2 seconds.

The program looks like:

#define IS_ON 100

task
main()
{
    int i;

    SetSensor(SENSOR_1, SENSOR_LIGHT);
    PlaySound(SOUND_UP);
    OnFwd(OUT_A);
    OnFwd(OUT_C);

    while (true) {
	SelectDisplay(DISPLAY_SENSOR_1);
	if (SENSOR_1 == IS_ON) {
            OnRev(OUT_C);
            PlaySound(SOUND_LOW_BEEP);
            Wait(200);
            OnFwd(OUT_A);
            OnFwd(OUT_C);
	}
    }
}
This was simple and effective.

Short Wave Radio Circuit.

I purchased a short wave radio kit from American Science Surplus. I put it together and with a final bit of help from my mentor (who noticed that there wasn't a wire going to the coil!), this radio is now working.

The plan here was to buy a project box from Radio Shack, solder all the components onto a small board, and put them inside the box to try to build a nicely finished radio.

More on this project to come...

Possible future projects.

Sound locator sensor (for use with LEGO Mindstorms).

This project is a sound sensor. The intention here would be for the robot to use this sensor, and the proximity sensor from the previous project, to come when called. Circuit building tasks here would be similar to the last project. It is expected that the software needed to drive the robot to perform the desired task will be much more complex.

Simple Voice Recognition Circuit (for use with LEGO Mindstorms).

Now we come on to something that has the potential to be great fun for kids. This is to interface a simple speech recognition circuit to the LEGO Mindstorms robotic kit. Again, I'd like to take this project in two steps.

Initially I'd use an already existing Speech Recognition Kit such as the Voice Direct(TM) 364 from Sensory Inc. This would be attached to one of more LEGO bricks, and interfaced to the RCX brick. As before, an appropriate robot and the software to run it would be constructed. An interesting one to try would be something like MIBO

Next would be to try to create a simpler speech recognition circuit that would be LEGO brickable, and be able to be driven via RCX software. Sensory Inc. provide an IC Selection Guide that should be able to help us here.

Other Mindstorms projects.

Depending upon time, it might be possible to also complete some of these projects:

[]

[]

[]

( Jun 16 2004, 01:10:44 PM PDT ) [Listen] Permalink