Deprecated: Function eregi() is deprecated in /public/sites/www.techbricks.nl/plugins/system/sefservicemap.php on line 51
Welcome at Techbricks.nl
Home
Bookmark and Share

Who is online?

We have 53 guests online
Where do visitors come from?
Locations of visitors to 

this page

Visitors in 2009:


Visitors in 2008:


page counter:



 
Written by Techbricks.nl   
Thursday, 15 April 2010 13:31

How to modify a LEGO pneumatic switch.


In the past year (after I published the LPE, LEGO pneumatic 3 cylinder inline engine on my web site) I received many questions about how to open and modify a technic pneumatic switches (part no: 4694) (valve). To let a LPE (LEGO pneumatic engine) run super fast it's nessesary to modify the pneumatic air switches and cylinders. Elsewhere on the internet (e.g at www.nicjasno.com/forum) you can find written instructions about how to do it, but many people have trouble modifing a switch successfully. I decided to make a Youtube video of the modification proces and to give you an instructions on this page.
















Discalmer
Adjusting the switch using this video instruction will still be very difficult. The first pair of switches that I tried to modify went wrong. In several cases opening a switch went wrong and the switch was forever damaged (deformed). In another case I had not cut enough material (old glue residues and plastic particals) away. I was not able to glue the back plate properly and it resulted in a air leaking switch. And I used in some cases to much glue, which resulted in a switch that clould no longer move smoothly.  It is a risky operation and I am not responsible if you damage your switches while your using my instruction! Good luck any way!

Removing the back plate of the switch.
If you start to open a switch then use a very sharp knife. Try to cut around the edges of the back plate. Do not us to much force, otherwise the switch will be damaged. The shape of the plastic switch can deform permanently and later in the proces you won't be able to shut back plate properly.

Take your time to cut all the edge until you feel it got loose. You can place your knife into the switch body against the back plate. Then very carefully try to hop of the back plate (with the knife in serveral positions) until it goes of the switch body.



















In the middle of the back plate there is a pin. Sometimes this pin breaks off while I remove the backplane and sometimes it doesn't. When it does breaks off I cut it away from the back plate, otherwise it prevents the back plate fitting well to the switch body.

Cuting away the switch position markers.
At the bottom of the switch body you can see three plastic cams. These mark the positions of the switch. If we remove them, the switch is able to move smoothly back and forward. Use the knife to cut them away.

Removing old glue residues and plastic particals.
The switch body and the back plate must fit well together, before (later on in the process) we can glue them back together. Original the switch body and the back plate were also glued together. You must remove these old glue residues together with plastic burrs and other particals.

Try after each time you have cut away material, if the back plate fits well. Certainly not cut too much material away, but make sure the back plate fits without exerting force.

Drilling the inlet and outlet nozzels bigger.
For an optimal air flow it is necessary that the air nozzles (inlet and outlets of the switch) are drilled up to a diameter of 2mm. Don't drill the holes without opening the switch. You will damage the inside and you can't remove the drilling dust.
Drilling the holes can be done with a small battery drive drill. The drill will center itself.



Cleaning the switch.
After drilling and cutting you must clean the switch parts. Otherwise small particals can damage your switch during operation. A good way to clean the switch is to blow with compressed air from an air compressor. Make sure it's very well cleaned: Any left partical in the switch can demage the switch ones it's in operation!

This is a picture of the compressor I use. It got a 4 liter tank and it can give up to 6 bar of pressure. The inlet handles 27 liter/minute:



























Lubricating the moving parts of the switch.
Use some lubrication grees or silicone spray to lubricate the moving part. Don't forget this, because you can't do this ones the back plate is glued on again! But be carefull and don't mess any grees or silicone spray on parts which will be glued. Otherwise the glue won't stuck.
Sealing the back plate to the body of the switch.
I've tried several types of Epoxy glues and many worked quite well. It is important to use a glue that useable for atleast a view minutes. Super glue (dry within one minute or less) is for me not workable. And glue that needs to be harden for aleast 24 hours takes to much time before you can see the result. Do not use any foam glue. That glue will expand and there may come glue on parts that you don't want to.

I use glue that is based on two components. Before you can use that glue, the two components must be well stirred until they have a uniform color. The processing time is 10 minutes. The glue is harden (and ready for use) within one hour.
















Before you seal the backplate to the switch body be very sure that everthing is all right. Is it clean and lubricated? Isn't there any lubrication on the places where you need to put glue on? Does the switch moves smoothly? Don't put to much pressure on the back plate, otherwise there will be to much friction and the switch won't move back and forward. But if the back plate isn't tight enough mounted on the switch body, air will escape between the rubber valve and the bottom of the switch. Then your switch is worthless.

Failed switch modification.
If your switch does not work after you have performed the modification, then don't throw the switch away. Open the switch for an inspection and try to learn from what went wrong.

First (before opening the switch again) test if the switch leaks air. That can be done simply by connecting a compressor to the middlemost nozzle (air inlet) and place the switch valve in the middle position. Determine if any air is leaking away.

Does  the switch moves back and forth too heavy? Try to find out what this caused. You can try to remove the back plate curefully for a close inspection. And you might try a second atemp to glue back plate to the switch body, before you distroy the next switch...

Instruction video.
The video demonstrates how to open and modify the switch:



In my page about the LPE, LEGO pneumatic 3 cylinder inline engine I have also made an instruction (including a video) about how to open and modify LEGO pneumatic cylinders.

Click here to watch my high resolution photo gallery at Google Picasa about how to open and modify a LEGO pneumatic switch.....

Last Updated on Tuesday, 20 April 2010 19:20
 
Written by Techbricks.nl   
Thursday, 18 February 2010 00:00

NXT Line follower using a color or light sensor and PID controller


Until now I had never tried it: building a Line Follower with LEGO NXT Mindstorms. But I got a question from someone whether it was possible to build a line follower and write a NXC program for the NXT 2.0 color sensor (while many Line Followers have been build with a NXT 1.0 light sensor) . That is why I decided that I should try it.
 
Many people have already builded a Line Follower. It all looks rather simple, but it was still quite tricky. The robot itself should maneuver easy, so that it can smoothly follow the line. The light or color sensor must not be too high nor too low above the surface. And the sensor must be far enough in front of the wheels (but not to far) so that it is able to discover a deviation in the line soon enough, so that the robot can adapt in time.
 
I haven't invent a new algerithm to control the robot, but I based my Line Follower program on the PID (proportional–integral–derivative) controller.




















A PID controller is a generic control loop feedback mechanism (controller) that calculates an "error" value as the difference between a measured process variable and a desired "setpoint". The controller attempts to minimize the "error" by adjusting the process control inputs.
 
The Line Follower uses the (color or light) sensor to scan the ground. He reads the color or the reflection value of the floor. The value that the sensor shows when it's on the line is called the "setpoint" value. Ones the robot follows the line and the sensor goes on and off the line,  the sensor value (called "actual_position") changes. As a result of deviations from the line the PID calculates an "output" that is used to adjust the motors, allowing the Line Follower to go back to the line.

I have tested my NXC Line follower program with tree different sensors:












The LEGO Mindstorms NXT 2.0 solor sensor, the Hitechnic color sensor and the NXT 1.0 light sensor. Each sensor has it own characteristics and must be initialized and read out in a different way. Here the statements for NXC:
 
Sensor type Sensor values Initializing sensor read sensor
NXT 2.0 Color 1 (black) .... 6 (white) SetSensorColorFull(S2) SENSOR_2
Hitechnic Color 0 (black) .... 17 (white) SetSensorLowspeed(S2) ReadSensorHTColor(S2, setpoint,
r, g, b)
NXT 1.0 Light 0 (black) .... 100 (white) SetSensorLight(S2) Sensor(IN_2)





















The PID controller contains basically 3 different controllers in one: proportional, integral and derivative controller. Each controller must be individually adjust by a gain to set: Kproportional, Kintegral and Kderivative.
 
Here is a simple software loop ( a non exsisting program language) that shows the PID algorithm:
 
previous_error = 0
integral = 0
start:
  error = setpoint - actual_position
  integral = integral + (error*dt)
  derivative = (error - previous_error)/dt
  output = (Kproportional*error) + (Kintegral*integral) + (Kderivative*derivative)
  previous_error = error
  wait(dt)
  goto start
 
The value "dt" determines the responsiveness of the PID controller.


















Proportional controller.
The proportional term makes a change in the "output" that is proportional to the current "error" value (when the sensor is not on the line). The proportional response can be adjusted by multiplying the "error" by a constant Kproportional, the proportional gain.

A high proportional gain results in a large change in "output" for a given change in the "error". If the proportional gain is too high, the Line Follower will be unstable. In contrast, a small gain results in a small "output" response to a large input "error", and a less responsive (or sensitive) controller. If the proportional gain is too low, the control action is too small for the Line Follower to go back on the line. In the absence of disturbances, pure proportional control will not settle at its target value, but will retain a steady state error that is a function of the proportional gain and the process gain. Despite the steady-state offset, both tuning theory and industrial practice indicate that it is the proportional term that should contribute the bulk of the "output" change.

Larger Kproportional values typically mean faster response since the larger the "error", the larger the proportional term compensation. An excessively large proportional gain will lead to process instability and oscillation.

Intergral or integrator controller.
The contribution from the integral term is proportional to both the magnitude of the "error" and the duration of the "error". Summing the instantaneous "error" over time (integrating the error) gives the accumulated offset that should have been corrected previously. The accumulated "error" is then multiplied by the integral gain and added to the controller output. The magnitude of the contribution of the integral term to the overall control action is determined by the integral gain, Kintegral.

The integral term (when added to the proportional term) accelerates the movement of the Line Follower to the "setpoint" (line) and eliminates the residual steady-state error that occurs with a proportional controller alone. However, since the integral term response to accumulated past "errors", it can cause the present value to overshoot the "setpoint" value (cross over the setpoint and then create a deviation in the other direction, so the line goes on Line Follower).

Larger Kintegral values imply steady state "errors" are eliminated more quickly. The trade-off is larger overshoot: any negative "error" integrated during transient response must be integrated away by positive "error" before reaching steady state.

Derivative, differentiator or differential controller.
The rate of change of the process "error" is calculated by determining the slope of the "error" over time (i.e., its first derivative with respect to time) and multiplying this rate of change by the derivative gain Kderivative.

The magnitude of the contribution of the derivative term (sometimes called rate) to the overall control action is termed the derivative gain, Kderivative.The derivative term slows the rate of change of the controller "output" and this effect is most noticeable close to the controller "setpoint" (the line). Hence, derivative control is used to reduce the magnitude of the overshoot produced by the integral component (to prevent the Follower Line shot way over the line) and improve the combined controller-process stability. However, differentiation of a signal amplifies noise and thus this term in the controller is highly sensitive to noise in the error term, and can cause a process to become unstable if the noise and the derivative gain are sufficiently large.

Larger Kderivative values decrease overshoot, but slow down transient response and may lead to instability due to signal noise amplification in the differentiation of the "error".




















The NXC Line follower program
.
The program is really smart but simple.
line    statement                                                           comment
-----------------------------------------------------------------------------------------------------------------------------
 1 setpoint = SENSOR                            // read the sensor value when the bot is on the line.
 2 while (true)                                 // never ending loop   
 3 {
 4  actual_position = SENSOR;                   // read the sensor value to check if the sensor on the line or not.
 5  error = setpoint - actual_position;
 6  proportional = Kproportional * error;
 7  integral = integral + error;
 8  derivative = (error - previous_error) / dt;
 9  output = proportional + Kintegral * dt * integral + Kderivative * derivative; // result of PID calculation
10  previous_error = error;
11  left = speed - output                       // adjust left wheel
12  if (left < 0 )                              // check direction (OnFwd statement cann't have negative input)
13     {
14       OnFwd(OUT_A,-left);
15     }
16   else
17     {
18       OnRev(OUT_A,left);
19     }
20   right = speed + output
                      // adjust right wheel
21   if (right < 0 )                              // check direction (OnFwd statement cann't have negative input)
22     {
23       OnFwd(OUT_B,-right);
25     }
26    else
27      {
28        OnRev(OUT_B,right);
29      }
30   Wait(dt);
31 }


Download
You can download the NXC code (made with NXC 1.28 firmware) for my Line follower here:
NXT 2.0 Color sensor: line follower color sensor NXT2.nxc
NXT 1.0 Light sensor: line follower light sensor NXT1.nxc
NXT Hitechnic Color sensor: line follower color sensor Hitechnic.nxc

Tuning the Line Follower PID controller Kproportional, Kintegral and Kderivative gains.
The behavior of the Line Follower depends on the contruction. Therefore you always have to tune your Line Follower.
To set the gains (Kproportional, Kintegral and Kderivative) of the PID controller manually, you must initially set the Kintegral and Kderivative values to zero. Increase Kproportional until the Line Follower knows to find the line after it run of the line.

Then Kproportional should be set at about half that value. Then increase Kintegral until the Line Follower goes back on the line. The more Kintegral, the quicker the Line Follower will go to the line. However, too much Kintegral will lead to instability and the Line Follower will go over the line.

Finally Kderivative must be increased, if necessary, so the Line Follower will quickly go back to normal driving, after it has returned to the line. This compensates the Kproportional and Kintegral correction and the Line Follower less will go less quick over the line. However, too much Kderivative will cause excessive response and the Line Follower will shake.

I have made a video about my NXT Line Follower. You can see the Line Follower in action with the 3 different sensors. You can also see how to tuning the PID gains. I have made several test runs with different Kproportional, Kintegral en Kderivative values:



Construction.
I have not jet finished a full building instruction, but here is the base of the Line Follower made with LDD (LEGO Digital Designer):















Click on the picture to download the .lxf file.

Check the complete NXT Mindstorms Line Follower high resolution photo gallery at Google Picasa...

Last Updated on Tuesday, 25 May 2010 18:43
 
Written by Techbricks.nl   

LEGO Racers Set 8183 Track Turbo RC / Power Functions controls

LEGO released a LEGO Racer set 8183 called Track Turbo RC. The car is remote controlled by a Power Functions IR remote control (set no: 8885 or part no 58122cx1).  I made a model my self in two different colors for my kids.














This model is very easy to build and very nice to play with for young kids. It is based on a main body (Power Functions 4.5V IR Receiver RC Car Base, part no: x1953cx1)  that includes a motor (4.5 v) , a steering device,  3 pen light AA batteries and the PF IR receiver. You need to place a axle (10 long) at the rear before you can attach the wheels to the car base. Each Racer has a IR channel switch (on the bottum) and it is possible to use 4 different channels.











The IR controller (included in the set) can drive the car forward and backward. The car can do both left and right steering. The Power Functions IR controller has only one speed: full throttle forward or backward!















It is possible to use other IR controllers, like the Power Functions 9V IR Remote Control Incremental (part no: x1967cx1) or the Hitechnic LEGO Mindstorms NXT IRLink Sensor (NIL1046).








One big advantage of these IR controllers is that the speed can be adjust from slow to fast in 7 steps. But even with these PF IR controllers it is not possible to steer a bit more or less to a direction.  It's either left, right or straight.












When I tried the LEGO racers I noticed that one of the cars couldn't drive in a straight line. It always made a slide turn left. The screw on the bottom side is used to adjust the steering device in order the let it drive straight forward.

In my video at Youtube I show how the LEGO Racer acts when it is controlled by the two different PF IR remote controls:


Check the complete LEGO Racers high resolution photo gallery at Google Picasa...

Last Updated on Friday, 04 December 2009 10:40
 
Written by Techbricks.nl   
Friday, 11 September 2009 00:00

NXT tachometer speed computer

I made a LEGO NXT Mindstorms tachometer which measures revolutions per minute (RPM). It can be used to measure the speed of an electric motor or a LEGO pneumatic engine (LPE). I made one version for the RCX Mindstorms legacy rotation sensor (part no:2977c01) and one for the NXT Mindstorms motor (the built-in tachometer) (prt no:53787).

 

 

 

 

 

 

 

 

 
Main functions
This project mainly includes program code, written in NXC. My NXT tachometer software:
- measures speed with a NXT motor (using the built-in tachometer) or a RCX legacy rotation sensor.
- displays speed in RPM average over the last second and the average over the last minute.
- displays in clearly readable large digits (18 x 28 pixels).
- writes log data to a comma separated file, which can be used to create a graph in Excel.

The speed (RPM) is displayed on the NXT screen in large digits. As you can see, there are two numbers displayed on the screen. The upper speed indicates the revolutions per minute over the last second. The lower speed indicates the average rpm over the last minute. 

Speed measurement
The average over the last minute is calculated by 60 sample periods of one second made in the last minute. The legacy RCX rotation sensor measures 16 ticks per rotation. The tachometer inside the NXT motor measures 360 degree per rotation. This way of measuring is much more accurate then the LEGO speed computer (part no: 32467). If you like to know more about the inside of the rotation sensors, please look at Philo's site: RCX legacy rotation sensor internals and the NXT motor internals.















The RCX legacy rotation sensor has a typical RCX connector. Using a Electric Mindstorms NXT conversion cable (part no:x1676) it is possible to connect the rotation sensor to your NXT. You can buy the rotation sensor and the converter cable at Bricklink.com.

The program records how many rotations are made in one second by counting:
the rotation sensor ticks, 16 ticks every rotation (in case of a RCX rotation sensor).
the rotation degrees, 360 every rotation (in case of a NXT motor).

Speed calculation
Every result of a measurement during 1 second is called a sample. The program saves the results of the last 60 samples. The sum of all the ticks or degrees over the last 60 seconds divide by the amount of ticks or degrees per rotation is the speed in revolutions per minute (RPM).

The program runs in a loop. After 1 second (1000ms) of measuring, the speed is calculated, displayed and then written the a log file. After this it starts all over again. To calculated the average RPM over the last minute, it doesn't sum all the 60 samples every second (cycle) again. It just adds the last measurement to the result and then subtracts the oldest sample (61 seconds old) from the result.

Cycles of measuring, calculating, displaying and log writing
During the time that the speed is calculated, send to the NXT screen and written to a log file, this program doesn't measures the rotation. Of course the time that this period lasts, when no rotation measurement takes place, is not taken into the calculation. Luckily this is only for a relative short time (about 60ms) in comparison with the 1000ms period that the measurement takes place. Therefor the output of this tachometer is quite accurate even when you will have speed fluctuations during that 60ms period. And it is unlikely that you will have speed fluctuations during that 60ms period that doesn't reflect the measuring period.

















Displaying large digits on NXT screen
I made a little routine that displays the large digits on the NXT screen. That makes it possible to display 2 rows with both 4 digits. Each digits is made of 7 lines, that I call bits in my program. At the start of the program the bit pattern of each digit (0, 1, 2 ,3 ,4 ,5 ,6 ,7 ,8 and 9) is load into an arrays. This makes it simple and fast to display the digits.


     -----1-----
     |            |
     2           3
     |            |
     |----4----|
     |            |
     5           6
     |            |
     -----7-----


I have made an example program that shows how to display the digits (4 figures on 2 rows) on your NXT screen.  It can also display a decimal point between the numbers. The program uses two functions. You can use this code for your own purpose:

DisplayInitiation(); // to initialize display function.

DisplayNumber(value,decimal_point,row); // to display the large digits. (<value to be displayed>, <position of the decimal point>, <first or second row>)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Click here to download the example NXC code for displaying Large Digits on your NXT screen: display_large_digits.nxc

Writing a log file
The tachometer program writes the rotation results to a log file. At the start it tries to create a tachometer0-0.csv file. If this file name already exists it will increment the file number and tries to create tachometer1-0.csv. The program will keep on trying this until it succeeds.

A file on a NXT has a fixed size. The moment you create one you need to tell the NXT API how many bytes long it will be. It is not possible to expand the file size, for instance when a file is almost full. Ones the end of the file is reached my program will create a new file. The new file will have the same file number, but the file part number will be increased: tachometer0-1.csv (syntax: tachometer<file number>-<file part number>.csv)
 

The results are written in a comma separated file format (.csv). The values (RPM and average RPM) are separated by a comma and each line is ends by a EOL (end of line). You can use a tool like Microsoft Excel to convert the data to a diagram. If a measurement creates several files you can simply copy the results of all the files to one file one your PC with an text editor.

Don't forget to remove the log files from the NXT memory. Before you know it, your NXT memory is full. Use NXT Explorer from the BricxCC menu bar to (re)move the files.

note: The values in the file are 10 times higher then the actual RPM. The last (most right) digit is the decimal: (example: 1234 = 123.4)

















I have made an example program that shows how the log file is created an how data is written to the file. The program uses three functions to do so. You can use this code for your own purpose:
InitWriteToFile();  // to initialize the WriteToFile function (determine the file name and create a file)
WriteToFile(text);  // to write a line to the file
StopWriteToFile(); 
// to close the file


Click here to download the example NXC code that explain how to create and write a file: write_to_csv_file.nxc

note: If you don't want any log files generated while you use the program, just search for the three commands:
InitWriteToFile();
WriteToFile(text);
StopWriteToFile();
C
hange the lines into comment by starting these lines with //.


note: To close the log file and write the log file to the NXT memory you must stop a running program by pressing the orange button. It may take a while (max one second) before the program ends.


I have made a video of my tachometer in action. I set up a test with an LPE (LEGO pneumatic engine). I tested with both sensors. The RCX doesn't give any resistance. It can rotate free. A NXT motor takes quite some force to let it rotate. Therefor the LPE run not that fast as it should go when the NXT motor is attached. Watch my video at Youtube:


Optional: Deceleration gearing factor
As you can see in the video, I have used two gears to gear down the revolutions. One 12 tooth gear is assembled to the LPE (drive axle) and one 36 tooth is mounted to the rotation sensors.

 
 Engine (drive axle)





 Rotation sensor



This deceleration gives a bit more power to drive the tachometer inside the NXT motor. This is also necessary, because my NXT tachometer is not able to measure revolutions above 800 RPM. It is possible to set this deceleration gearing factor in my program which makes it able to display the actual speed of your drive source (electric motor of LPE). If you use such a gearing between your engine and the rotation sensor you must set the following variables:
long drive_gear=1; // <number of touth, gear assembled to source engine> is default set to 1;
long rotation_sensor_gear=1;
// <number of tooth, gear assembled to the rotation sensor> is default set to 1;


Download tachometer program code
The tachometer software is written in NXC. Click here to download the NXC program:
- using the NXT motor rotation sensor: tachometer_NXT_motor.nxc
- using the RCX legacy rotation sensor: tachometer_rotation_sensor.nxc


LEGO speed computer (part no:32467)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Check my complete NXT tachometer speed computer high resolution photo gallery at Google Picasa...

Last Updated on Tuesday, 25 May 2010 18:36
 

LEGO Pneumatic Engine (LPE) 3 cylinder inline


I am finally succeeded to make my variant of the LPEpower 3 cylinder inline LEGO Pneumatic Engine, a  Scoctch yoke engine. Rebuilding the engine was very difficult. Many people try to build LPE's and they share their contributions in forums  like Nicjasno. To let an engine run, is very difficult, but to let it run fast, by modifying the cylinders and switches, is even more difficult.

Alex Zorko and Ivan Franciskovic, the owners of LPEpower.com, offer LPE's for sale in their store. They build incredible constructions, like automatic gearboxes and 2, 3 and 4 inline and v4, v6 and v8 custum engines. I am now convinced that the amount of money they ask for their engines is not much (in fact very little!) in relation to the effort it takes to build an engine. At Nicjasno's forum (owned by Alex) they say that many people can't build a LPE, even with a building instruction. I now believe that is true.



As I said, I reconstructed the engine, but it is not identical. The original LPEpower Inline 3 cylinder 2.0 SYS is a speed monster. All parts are optimized for speed, even the tubing. I have rebuild the engine with my own view and I made several changes, sometimes  dune to the unavailablity of particular parts and sometime because I though it was a smart thing to do. I made photos of my construction which can be used as a building instruction. It starts with this:
























In the following picture you can see how the switches are mounted:
















But before mounting them you must modify the technic pneumatic switches (part no: 4694). To ensure that the air can flow easily through the switch, the nozzles (inlet and outlet) are drilled up to 2mm in diameter. First open the switch by cutting the back plane from the switch body with a very sharp knife. Don't drill the holes without opening the switch. You will damage the inside and you can't remove the drilling dust.  Also, the pins at the bottom of the switch (that defined positions of the switch) must be cut way, so that the switch can easily move back and forward. And remove some plastic on the black part that obstructed quick release of "used" air.




















After drilling and cutting you must clean the parts that otherwise can damage your switch. A good way to clean the switch is to blow with compressed air from a compressor. Use some silicone spray for lubrication into the switch before you reseal it with epoxy glue. Don't press the back plane to strong to the switch, otherwise your switch will move with to must friction. Check Nicjasno's forum for more info.

I damaged several switches before I successfully modified one. Removing the back plane without permanent damage is very diffecult. Glueing it all back together also awkward. I can't describe how to do it. It takes some practice to do it. Take some old switches to practise before you use good switches.

Update: I made a special page and a video about how you can modify LEGO pneumatic switches.

The same as with switches, the pneumatic cylinders the inlet/outlet must be drilled up to a diameter of 2mm. I use technic pneumatic cylinder new with hole base (complete assembly) (part no:47224c01), but you can use technic pneumatic cylinder new complete assembly (part no: 2793c01). Again the cylinder must be opened to prevent damaging the inside of the cylinder and to ensure that the drilling dust can be removed. Drilling dust will damage your cylinder if you don't remove it. Click here to diplay the video at Youtube that shows how to open a cylinder with a screwdriver and drill the nozzles.




modified cylinder




original cylinder




The difference between the original inlet and the 2mm drilled inlet doesn't looks so much, but in performance it really makes a difference. In this video you can see that a modified cylinder respond directly and an original cylinder moves quite slow:



To open the cylinder I used a screwdriver. I pressed it between the edge of the black cylinder cover and the yellow cylinder body. Ones it opens on one site I moved the screwdriver to the other site of the cylinder.











Before the cylinders are placed into the engine, the crankshaft is made.  This is how the crankshaft finally looks like:








The tubing must be connected to the switch before placing the cylinders. Otherwise it is not possible to connect the hose at all. I used blue pneumatic hose which I bought at www.BlokBricks.com. LPEpower uses tubing made of special plastic tube, also used in the pneumatic industry. It is stiff and it has a bigger diameter then the orginal LEGO pneumatic hose. The tube they use give a better air flow and can run engines up to 6 Bar.


















The axle at the down side of the engine has a important function. If the two black 36 tooth gears are not adjust is the right way to each other the engine wouldn't run. After I had constructed the LPE I tried to run it, but it didn't work. Ones I removed one of the 8 tooth gears and placed the crankshaft in the correct shape and then put back the 8 tooth gear, the engine start running.

























But at the fist test run this LPE didn't break any speed record, although I used a 6 bar (87 PSI) compressor. I didn't modified the switches and cylinders jet. In fact engine run rather slow. And lubricate with silicone spay didn't help:



I knew what I had to do. I had read about it in the forums. It is a absolute requirement for performance: Modify the switches and cylinders to improve the air flow. Do apply both improvements (the switches and the cylinders), because the air flow is dependents on smallest passage!

Despite its in size a small engine, its made of many parts. Altogether, including the expensive pneumatics components, it will still cost you quite a lot money. If you don't have extreme much perseverance (I give up many times) and a lot of time to spend on building and modifying, you are probably cheaper and much quicker ready when you buy an engine in the LPEpower.com shop. 

Check the complete LEGO Pneumatic Engine (LPE) 3 cylinder inline high resolution photo gallery at Google Picasa...
Or my complete Pneumatic LEGO valve switch high resolution photo gallery at Google Picasa...

Last Updated on Friday, 16 April 2010 14:02
 
Written by Techbricks.nl   
Friday, 13 March 2009 00:00

Self-balancing Segway NXTway-Gyro bot & wireless PS2 controls

In one of my first NXT projects I rebuild the NXTway design by Philippe E. Hurbain's. This two-wheel bot was self-balancing using a light sensor. Other people came up with the idea to balance such a robot with a Gyro sensor: Ryo Watanabe made his NXTway-G, Ramin made his self-balancing robot, Yorihisa Yamamoto (lejos-osek.sourceforge.net) made his NXTway-GS and Engscope made his Jegway. Just because I am fascinated by the fact that a two-wheel bot can stay up (like a human!) I wanted to make my own self-balancing robot with a wireless remote joystick controller.

Here is a video of my remote controlled NXTway-gyro performing a simple test over a tilt surface with small NXT wheels:


Click here to watch in normal quality/limited bandwidth
Running my latest NXC program my bot is quite stable and runs smooth.....

The orginal Segway PT (personal transpoter) is a two-wheeled self balancing electric vehicle invented by Dean Kamen. The Gyroscopic sensor is used to detect tilting.




















The Gyro sensor
A Hitechnic Gyro sensor contains a single axis gyroscopic sensor that detects rotation and returns a value representing the number of degrees per second of rotation. The Gyro Sensor can measure up to +/- 360° per second of rotation. The rotation rate can be read up to approximately 300 times per second. The Gyro sensor is used to measure size of the angel in a very short interval (let say 100 times per second). This way it can determine if the bot is falling, in which direction and how fast it is falling.

This video shows how the NXTway-Gyro bot is self-balancing (without PSP remote control):


Click here to watch in normal quality/limited bandwidth

The bot is falling back- and forward. But the bot can be much more stable like this as I will show you in other video's.
 
The basic functions of a Seyway bot

The orginal LEGO Mindstorms NXT-G software is quite slow and it may not be fast enough to program your bot as a Segway with remote control. My NXTway-Gyro Segway self-balancing NXT Mindstorms robot is using a Hitechnic Gyro sensor with NXC software based on JanB's program (software that is possibly related to RobotC source code made by Ramin (gyro_rk4_v4.c).  It is a very small NXC program is doing the following tasks:
- Determine the Gyro bias (offset), because the gyro sensor value can be influenced by temperature and manufacturing tolerances.
- Prevent the robot from falling over (using by the body tilt control).
- Prevent the robot from driving away (using the position control).
- Allow the robot to balance for long time (using the gyro drift compensation).
- Set the friction compensation.
- Optional: read the joystick values of the PSP controller.

Gyro Bias offset
Before you can use the value of the Gyro sensor you need to determine the Gyro Bias offset. This is different for every Gyro sensor and can be influenced by temperature. You must held the the sensor absolute still for a few seconds and do a couple of dozen Gyro measurements. The Gyro Bias is the sum of the measurements divide by the amount of sample you made.

line    statement                          comment
--------------------------------------------------------------------------
 1 timer1 = CurrentTick();                 //set timer1 equal to the system clock tick.
 2 GyroBiasCount = 0;
 3 while (CurrentTick() < (3000+timer1)) { //loop until 3000 ms have past.
 4     Gyro_value = SensorRaw(S3);         //read out the Gyro sensor on port 3#.
 5     Wait(150);
 6     GyroBiasCount = GyroBiasCount + 1;  //count the times a sample is made.
 7     gn = gn + Gyro_value;               //sum the Gyro values.
 8     PlayTone(TONE_B7, 5);               //play a sound to give notice of Gyro Bias process.
 9 }
10 GyroBias = gn / GyroBiasCount;         
//calculated sum of values divide by times measured.

 A sound is played, to notice you that the bot must be held still. Gyro measurements are made every 150ms.

Main part program - balancing task
Here is the main part of the NXC program. It contains only the basis functions for a Segway bot:

line
    statement                                                                      comment
------------------------------------------------------------------------
 11 while(true){                                  //begin of a continuously loop
 
12   ng=SensorRaw(Gyro sensor port)-gn; nw+=ng;  //body angle in radians/sec
 13   rp=MotorTachoCount(Motor port);             //wheel position
 14   rg=rp-lrp; lrp=rp; rwi+=rg;                 //wheel speed
 15   if (abs(rwi)>15){gn-=sign(rwi); rwi=0;}     //Gyro drift compensation
 16 //md=(nw+ng*10+rp*4+rg*200)>>4;               //pd control NXT small wheels
 17   md=(nw+ng*12+rp*5+rg*360)>>5;               //pd control RCX large wheels
 18   md+=sign(md)*48;                            //default friction compensation = 48
 19   SetOutput(Motor port A & B,                 //PID motor control
          Power,
          md,                                     //calculated correction
          OutputMode,
          OUT_MODE_MOTORON,
          RunState,
          OUT_RUNSTATE_RUNNING,
          UpdateFlags,
          UF_UPDATE_MODE+UF_UPDATE_SPEED);
 20   Wait(8);                                    //loop about 100 times/sec
 21   }

The program is a continuously loop. It runs about 100 cycles per second.

Body angel
In line 12 the body angel is calculated just by adding the Gyro value to all the previous Gyro values.

Wheel turning
In line 13/14 the wheel speed is calculated just by subtracting the turning of the wheel by the previous turning of the wheel (measured in the last cycle).

Different wheels & PD control
In line 16 or 17 the motor power is calulated with PD (proportional and derivative) control. If you wish to use small NXT wheels (part no:55976/54087) instead of large RCX wheels (part no: 2903/2902) you can move the comment '//'  from line 16 to line 17.

Friction compensation
An other value you can change is the friction compensation in line 18. If you use batteries instead of a (NXT) LiIOn-Accu, the motors get a higher voltage. You may need to reduce this value a bit.

In the video above I use a value of 44. When you decrease the friction compensation to 42 the bot will become more instable and moves further for- and backward:

If you decrease the friction value to 38 it will fall:

If you increase the friction value to 46 the bot is much more stable:

But if you increase the value to 52 it move to quick for- and backward and it will fall:

The optimum value of my bot seems to be 48:


You can download the program without PSP remote control here: nxtway-gyro.nxc (last update 2009/09/18 - adapt to firmware 1.28 and higher).

PSP remote joystick control
For the remote control I used the Mindsensors PSP-Nx-v3 controller with a SONY playstation 2 (PS2) wireless joystick. A Mindsensors PSP-Nx-v3 wireless Playstation 2 controller controls your NXT robot with a PS2 joystick. This is an interface for a wireless SONY Playstation 2 Controller which you may already have. The controller has two analog joysticks and 16 buttons, using this interface, values of all 16 buttons and joysticks can be read by the NXT over the wireless link.

psp controller task
A simple task called psp_controller (line 22 - 40, see below) runs 5 times a second. It reads out and displays the joystick values. It runs until the finshes its last statement in line 39. The whole task takes about 35 ms.

To control the NXTway-gyro bot I use the left joystick. The Y-axe value (line 24 and 34) controls the bot's forward/backward movement. The X-axe value (line 25 and 35) controls the sidewards direction. The raw joystick values can go from -100 to +100. I reduce these values a bit (line 34/35) to prevent that the bot will react to quick and fall over.

line    statement                           comment
-----------------------------------------------------------------------
22  task psp_controller()
23  {    PSP_ReadButtonState(SensorPort, ADDR, currState);
24       move = (currState.l_j_y);           //read out left joystick - Y-axe
25       turn =  - currState.l_j_x;          //read out left joystick - X-axe
26       // Display the joystick values on the NXT screen
27       message = "y:       x:          ";
28       messageA = NumToStr(move);
29       messageB = NumToStr(turn);
30       message = StrReplace(message, 3,  messageA);
31       message = StrReplace(message,12 , messageB);
32       TextOut(0, LCD_LINE7, message, false);
33       //return the values to the bot balancing task
34       m=move / 16;                        //divide joystick y-axe by factor
35       t=turn / 5;                         //divide joystick x-axe by factor
36       // During the psp_controller task, statements of the balancing task are executed slower.
37       // The processor of the NXT is serving 2 tasks at the same time after all.
38       // Therefore, at the end of the psp_comtroller task, the cuclus delay is set back from 4 ms to 7 ms.

39       t1=7;                              //set cyclus delay back to 7 ms
40    }


To add the direction control to the bot, the following lines in the main balancing part (the balancing task) are added/modified. The variables 'm' & 't' are the joystick values. The variable 'count' is a counter that counts the number of cycles, so we can launch the psp_controller task every 20 cycles.

line    statement                        comment
----------------------------------------------------------------
13   rp=(MotorTachoCount(Motor port A)+MotorTachoCount(Motor port B))/2; 
14a  M = (M*75+m*25)/100;          //To let the bot lowly get used to the for- and backward movements 
14b  rg=rp-lrp; lrp=rp; rwi+=rg-M; //wheel speed + joystick forward value
19a  SetOutput(OUT_A,              //PID motor control motor A
               Power,
               md-t,               //balance correction - joystick turn value.
               OutputMode,
               OUT_MODE_MOTORON,
               RunState,
               OUT_RUNSTATE_RUNNING,
               UpdateFlags,
               UF_UPDATE_MODE+UF_UPDATE_SPEED);
19b  SetOutput(OUT_B,              //PID motor control motor B
               Power,
               md+t,               //balance correction + joystick turn value.
               OutputMode,
               OUT_MODE_MOTORON,
               RunState,
               OUT_RUNSTATE_RUNNING,
               UpdateFlags,
               UF_UPDATE_MODE+UF_UPDATE_SPEED);

20a  if (count==20)                //ones in 20 cycles (= 5 times per second)
20b     {
20c       count=0;
20d       // During the task psp_controller the balancing task runs slower.
20e       // Therefore the cuclus delay is set from 7 ms to 4 ms.

20f       t1=4;                     // set cyclus delay to 4 ms
20g       StartTask(psp_controller);// set joystick values m & t
20h     }
20i  count+=1
20j  Wait(t1);                     //Delay to slow down the loop to about 100 times/sec (default = 7ms)

In line 14a the forward/backward movement is calculated so it will always increase or decrease slowly.

The NXTway-gyro bot turns by moving the wheels in opposite directions (line 19a and 19b), depending of the variable 't'. This shouldn't change the body angel and therefor the wheel position measured in line 13 depends on both wheels. The forward/backward movement M is added in line 14b.

During the psp_controller task, the balacing task runs a bit slower. This is because the NXT processor must process two tasks at the same time. It is important that the balacing task runs 100 cycles per second no matter what. So we have to adjust the Wait(8) statement in line 20 while the psp_controller task is running.  The variable t1 determine the number of ms delay (line 20j).

Ones in 20 cycles, the psp_controller task is launched (line 20g) and the t1 delay is set to 4 ms (line 20f). At the end of the psp_controller task t1 is set back to 7 ms (line 39).  Notice that in the orginal program (nxtway-gyro.nxc) the delay in line 20 was 8 ms, but because of the number of lines added to this program (to make joystick control possible) a delay of 7 ms is enough.

Watch my NXTway-gyro controlled by a PS2 joystick:

Click here to watch in normal quality/limited bandwidth

Download the NXTway-Gyro program with SONY PSP joystick controls here: nxtway-gyro-psp.nxc (last update 2009/09/18 - adapt to firmware 1.28 and higher). Don't forget to download the PSP-Nx-lib.nxc library, available at Mindsensors.

Here is a video with my NXTway-gyro performing on a tilt surface:

You can see that the bot has no problem to run over slope table.

Programming in NXC
You may not have experience with NXC language for LEGO NXT mindstorms. I suggest you to try it out!
NXC (Not eXactly C) is similar to C and contains the same functions as LEGO Mindstorms NXT-G (and more)  to control your NXT. The character based program language is very flexible, easy to learn and way much faster. The source size of a NXC program (which exist on your PC) is more then 1000 times smaller as a similar NXT-G program and the executable size (the compiled version which run on our NXT) is about 10 times smaller as a NXT-G program. NXC fully supports NXT sensors made by LEGO, Mindsensors, Hitechnic, Codatex and Vernier, but it also support homebrew sensors.
You can run NXC programs on the standard LEGO NXT-G firmware, but to have full bennefit of the NXC language you must flash your NXT with a NXC/NBC enhanced firmware (real easy!). On this firmware you can still run your NXT-G programs. It is fully compatible with the standard LEGO firmware! (And you can always flash your NXT with the original LEGO NXT-G firmware.)
NXC comes with the Bricx Command Center (BricxCC, a professional programming and development tool for your NXT, both made by John Hansen. It run on every Windows (95, 98, ME, NT, W2K, XP, Vista) PC. John Hansen and Danny Benedettelli also wrote very usefull NXC documentation. And (unlike RobotC) NXC and BricxCC are for free!

Note for NXT 2.0 users
The hardware of NXT 1.x (set #8527) and NXT 2.0 (set #8574) Bricks are 100% identical. It's the NXT Brick firmware and the LEGO Mindstorms NXT PC software that are different. Firmware level 1.28 or higher is known as NXT 2.0 firmware. You can install NXT 1.x firmware (levels up to 1.27) and NXT 2.0 firmware (firmware levels starting from 1.28) on a NXT 1.x as well as a NXT 2.0 Brick. (Yes, if you upgrade the NXC/NBC  firmware on your NXT 1.0 brick, you will have a NXT 2.0 brick!!!) If you use the LEGO Mindstorms NXT PC software 2.0 you must run 1.28 firmware (or higher) on you Brick (the LEGO firmware and the NXC firmware use the same firmware levels). The new NXT 2.0 is compatible with old programs: both NXC and NXT-G 1.x programs run on NXT Bricks with 1.28 firmware or higher.
Here you can download the latest NXC/NBC BricxCC with the 1.28 (NXT 2.0) firmware: bricxcc.sourceforge.net/test_release.zip. Install this firmware from the BricxCC GUI.
And here you can get the orginal LEGO 1.28 firmware (NXT2.0): legoengineering.com/library/doc_details/250-nxt-firmware-v128.html (in case you want to restore the 2.0 NXT brick in it's original state. Install the LEGO firmware from you LEGO Mindstorms NXT PC software.

Lego Digital Designer
Jean-Pierre Lammers, New Albany (Ohio, USA), a student of David Herman (teacher at New Albany High School), performed a great job. He "reverse-engineered" my NXTway-gyro model with Lego Digital Designer (LDD), a free LEGO 3D CAD tool that let you build with bricks on your computer. With LDD (in Building Guide mode, using the Builing Guide Player) you get a building instruction which you can use to rebuild my NXTway-gyro.





























If you want to look at the model from any point of view or you want to rebuild it, you can download Jean-Pierre's LDD file here: nxtway-gyro-psp.lxf

Build this bot
If you want to build this NXTway-gyro bot you need a LEGO NXT Mindstorms set (9797-1, 8527-1 or 8547-1) and a Hitechnic Gyro sensor. If you want to control it using a PS2 joystick, you need a Mindsensors PSP-nx-v3 controller.

Check the complete Self-balancing Segway NXTway-Gyro NXT robot high resolution photo gallery at Google Picasa...

Last Updated on Sunday, 07 February 2010 16:55
 
Written by Techbricks.nl   
Thursday, 08 January 2009 23:40

Motorized pneumatic LEGO valve switches

I builded 4 motorized pneumatic LEGO valve switches. All switches do have a different type of motor. I used a small PF LEGO motor, a regular NXT motor, a old (legacy) RCX Mindstorms motor and a micromotor. And I used NXT Mindstorms to control the switches. These 4 actuated pneumatic switches are based on the same principle: A regular LEGO pneumatic switch is controlled by a motor a touch sensor. The motor can move the pneumatic switch into three positions: Left, Center and Right. NXT doesn't know the position of the pneumatic switch, but in the center there is a touch sensor (electric switch) which will determine when the pneumatic switch is in the center position.













Of cource the software is very important. After starting the demo program it will seek for the center position of the pneumatic switch. The motor will run forward and backward until it reach the touch sensor. But reaching the touch sensor is not the exact center: That's because the touch sensor is reached before the switch is in the exact center. Therefore the software will move on the motor, pass the center, until the touch sensor is released. And then it can calculated the exact center position and it will move to the calculated center position of the pneumatic switch.

The demo programs I made are written in NXT-G. After calculating the center position, the switch will switch between the center, the right position (left outlet of the pneumatic switch is open), the left position (right outlet is open) and return to the center again. Before every step in the program NXT will display a status message in the display and then wait 3 seconds before it demonstrate the next step. So in real use the switches can of cource act must faster!

The first motorized pneumatic LEGO valve switch I made is based on a new type pneumatic LEGO switch (partno: 4694b), a Linear Actuator (partno: x1918cx1) and a small Power Funtion motor (partno: 8883-1). This construction, caused by the Linear Actuator, is quite big. The motor is a bit oversized for it's job, but this construction works very well. The pneumatic switch is easy to control and the center position is determined by a legacy touch sensor brick 3x2 (partno: 879) (RCX Mindstorms). A technic gear 24 tooth clutch (partno: 60c01) will prevent that the Liniear Actuator can pass the limites of the pneumatic switch.














I made a video of the pneumatic switch in action:

click here to watch in normal quality/limited bandwith

You can download my demo NXT-G program for the switch based on the PF motor here: vavle_pf.rbt. To run the program you need to install the NXT Mindstorms Legacy Block Library thats available to mindstorms.lego.com/Support/Updates. And in order to connect a PF motor and the touch sensor to the NXT, a NXT converter cable (part no X1678) and a Power Functions extention cable (part no: 60656) is required.

The second motorized pneumatic valve switch I made is one that is based on the pneumatic valve designed by Ben Williamson, but I made some tiny of improvements. This small construction is based on a LEGO micromotor (partno:2986 / 70823) and a old style LEGO pneumatic switch (partno: 4694). To understand more about LEGO pneumatic swithes you can check the ABS-Robotics internal pneumatic LEGO switch page:










The switch with the micro-motor acts rather slow, but again quite small and also simple.



















Watch the video I made of the switch in action:

click here to watch in normal quality/limited bandwith

You can download my demo NXT-G program for the switch based on the micromotor here: vavle_micro.rbt. To run the program you need to install the NXT Mindstorms Legacy Block Library thats available to mindstorms.lego.com/Support/Updates. And in order to connect a mini motor and the touch sensor to the NXT, a NXT converter cable (part no X1678) is required.

The third motorized pneumatic valve switch I build is based on a regular NXT motor (partno: 53787). The construction is partly similar to the previous pneumatic switch, but with a NXT motor it is more easy to write software to control the switch. Of cource this design is bigger, but is is also faster. Ones the center of the switch is determined, the taco meter within the NXT motor will tell the software exact where it moves to! Again a technic gear 24 tooth clutch prevents that the motor to run to fair.



















Here my video of the switch in action:

click here to watch in normal quality/limited bandwith

You can download my demo NXT-G program for the switch based on the NXT here: vavle_NXT.rbt. To run the program you need to install the NXT Mindstorms Legacy Block Library thats available to mindstorms.lego.com/Support/Updates. And in order to connect a RCX legacy touch sensor to the NXT, a NXT converter cable (part no X1678) is required.

The last motorized pneumatic valve switch is powered by a technic LEGO mini motor 9v (partno: 43362) (old style legacy RCX Mindstorms). An advantage in comparing to the switch with the NXT motor is it's size: It is rather compact! The switch can move smooth and fast and the construction is nice.























Watch my video with this pneumatic switch in action:

click here to watch in normal quality/limited bandwith

You can download my demo NXT-G program for the switch based on the mini motor here: vavle_legacy.rbt. To run the program you need to install the NXT Mindstorms Legacy Block Library thats available to mindstorms.lego.com/Support/Updates. And in order to connect a RCX legacy motor and the touch sensor to the NXT, a NXT converter cable (part no X1678) is required.

Check the compleet Motorized pneumatic LEGO valve switches high resolution photo gallery at Google Picasa...
 
Written by Techbricks.nl   
Saturday, 27 December 2008 22:44

Off Roader truck 8297 in yellow
 

I build the new technic LEGO Off Roader truck, set 8297, in yellow Bricks. I love yellow. It is my favorite LEGO brick color. The color of bricks I own most. However, there were some part not available in yellow and other yellow parts I didn't have enough in stock.
















If you want to build this car without buying the 8297 set you need to download the building instructions at www.lego.com:
- BI - 8297 - MODEL 1 - 1/3 - 4536946.pdf
- BI - 8297 - MODEL 1 - 2/3 - 4536950.pdf
- BI - 8297 - MODEL 1 - 3/3 - 4538812.pdf

And you need quite a lot parts! Some are very new types. You may not have all the parts jet, so you need to buy them elsewere (www.bricklink.com?).  But looking at the part list (it is in the last instruction book) you may want to buy this set anyway!



















This rugged off-road truck use a built-in motorized Power Functions (small electric Motor 9V Power Functions, partno:  58120c01) to raise and lower its ground clearance, operate the front-mounted winch, or turn on the bright LED headlights (Light Unit Power Functions with Black PF Connector Lead, partno: bb338c01).

A gearbox made of a technic Changeover Catch, partno: 6641 and a technic Driving Ring, partno: 6539) is used to operate the front winch and the variable suspension. The electric Pole Reverser (Polarity Switch with Black Lead, Power Functions Complete Assembly, partno: bb339c01) is used to choose the correct direction of the PF motor.

It is possible to open the trunk and hatch and the gull-wing doors moved fantastic by the technic Shock Absorber (10L Damped, Complete Assembly, partno: 32181c02) and the truck has a V8 engine with moving pistons!


















This off roader uses a new kind of technic Gear Differential with inner Tabs, 28 Bevel Teeth, partno: 62821 and a new kind of technic Universal Joint, 3L, partno: bb320 (1L shorter then the old ones!). 














For the suspension there is a new technic Steering Arm 5.5 x 2 with Towball Socket Rounded Chamfered, partno: 57515 used in combination with a technic Steering Gear with 4 Ball Joints, Complete Assembly, partno: x873c01 and a technic Steering CV Joint, partno: bb75.














The car is driving on XXL wheels: Wheel 56mm D. x 34mm Technic Racing, with Black Tire 94.8 x 44 R Balloon (44772 / 54120), partno: 44772c02.

Check my video of the Off Roader Truck at Youtube.com:

click here to watch in normal quality/limited bandwith

Check the complete Off Roader truck - 8297 in Yellow - photo gallery at Google Picasa...

 
Written by Techbricks.nl   
Friday, 28 November 2008 00:00

NXT Bot with PSP joystick control

I have tested the Mindsensors Sony PlayStation 2 Controller interface for NXT (PSP-Nx-v3) with a PSP joystick. I used the PSP-Nx-v3 to control a NXT bot I had build before. The robot has a AXIS wireless (802.3B/G) web cam. The pictures are displayed in a browser on my laptop.
alt














With the Joystick I am able to move the bot in any direction. With the cam it is possible to see what is in front of the bot, even when it is in an other room.
alt















I have made two test programs. One in NXT-G and one in NXC (Not eXacly C). I used the NXC library for PSP-Nx (PSP-Nx-lib.nxc) and PSP-Nx NXT-G block 1.3 (PSPNx-Lean.zip) both made by Deepak Patil. You can download my test programs here and used them for your own bot:
NXT-G: Robot-techbricks_pspnx.rbt
NXC: Robot-techbricks_pspnx.nxc

Both programs uses port A and B for the NXT motor and sensor port 2 for the PSP-Nx.

The PSP-Nx NXC library (PSP-Nx-lib.nxc) and the NXT-G block (PSP-Nx-Lean.zip) can both be downloaded from www.mindsensors.com.

Even when you don't want to use the NXC language, the working of this program may be easy to view with a text editor or in Bricxcc.
alt


















You can watch a demo video of my bot at Youtube:

Pushing the joystick forward will let the bot runs forward. Turning the stick to the right will turns the bot. The more the joystick is turned to the right, the faster it will turn. In the most right position one motor runs forward and one runs backwards. If you continue to turn the stick to backward, the bot will turn less fast. When the joystick is in the most backward position, the bot runs backward. And so on, displayed in this picture:



















L and R are the left and right motor. 100 means full speed forward, -100 means full speed backward. Moving the joystick around is shown in this video:



Check the complete NXT Bot with PSP Joystick high resolution photo gallery at Google Picasa...
 
Written by Techbricks.nl   
Wednesday, 06 February 2008 19:29

GBC LEGO ball pump module

Here is my variant of the GBC (Great Ball Contraption) LEGO ball pump module design by Philippe E. Hurbain






























I used for this module the PF regular motor (part no: 58120cx1).



 
















To lead the soccer balls (part no: x45px1) and basket balls (part no: x493px1) one by one into the ball pump a 10x10 dish (part no: 50990) is turning around. 



















Wedge bricks form a circle around the dish.




















The basket can contain more then 150 soccer balls.






















I use a PF Electric Power Functions 9V Medium Motor 3 x 6 x 3 (part no: 58120cx1) for this GBC module because it is possible to control the marble module by a NXT (part no: 53788) using the Hitechnic IRlink.
































Watch a video of the Ball Pump module hosted at Google Video:



Check the complete GBC LEGO pump module high resolution photo gallery at Google Picasa...
Check the complete  GBC LEGO pump backet high resolution photo gallery at Google Picasa...
Or check links to other GBC LEGO sites...

 

Last Updated on Sunday, 11 January 2009 13:24
 
Written by Techbricks.nl   
Saturday, 23 August 2008 15:24

Pneumatic LEGO compressor based on PF motors


This page is under construction.......
I have build several pneumatic LEGO compresssors with small pneumatic pumps (part no: x191c01). This type of pump has a volume of only 0.5 cm³. A technic Pneumatic Pump New Complete Assembly (part no: 2797c01) has almost 7 times more volume: 3.3 cm³.  So with fewer movements you can have the same amount of air transfered. Thats why I tried to build a compressor with large pumps.   
 















A pump is a pneumatic cylinder with a one way valve. Air comes in from the outsite and goes out through the tube. A large pump does need more power to press the air out of the cylinder then a small one. The area of the piston is larger and therefor it takes more force to push. This type of pump has a spring which pushes the piston back. The construction of the compressor must be very strong and you need one or more strong motors to propel the compressor.















I placed 2 XL PF (Power Function) motors in this design. I used a technic gear box and a technic worm screw to slow down the gearing.



















A video of the compressor:


Check the complete Pneumatic LEGO Front-end Loader high resolution photo gallery at Google Picasa...
 
«StartPrev123NextEnd»

Page 1 of 3

Click on a tag in the cloud to see related articles and web links on techbricks.nl:

06?  ??????????????  afol  air  airtank  area  assembly  axis  axle  backward  balancing  ball  bar  block  blog  bluetooth  body  books  bot  brick  bricxcc  cable  center  chamber  change  clock  cm?  code  color  community  compass  compressor  connector  control  controller  create  cylinder  cylinders  derivative  design  device  diameter  digits  direction  directory  display  doesn  don  download  duplo  electric  engine  error  example  excel  fan  file  firmware  follower  forum  forward  friction  function  gain  gallery  gbc  gear  glue  google?  graphic  great ball contraption  group  gyro  hardware  high  hitechnic  hose  inch  instruction  instructions  integral  interval  java  joystick  labview  large  laws  ldraw  legacy  lego  lejOS  lejos  length  leocad  level  lever  light  line  line follower  link  links  log  lpe  make  mbar  measure  mindsensors  mindstorms  minifig  mlcad  moc  model  modify  motor  newton  nqc  nxc  nxt  nxt-g  nxtway  off roader  old  ones  open  original  output  partno  perl  pf  photo  physics  picasa  pid  piston  plate  plotter  pneumatic  pole  position  pov  power  pressure  program  projects  proportional  psi  psp  pump  ray  rcx  read  reference  regulator  remote  resolution  results  reverser  robot  robotc  robotics  rotation  rubic solver  run  runs  screen  search  self  sensor  sensors  set  simple  software  speed  square  start  steering  store  switch  switches  tachometer  takes  task  technic  test  time  touch  train  translate  truck  try  tube  turn  users  v8  value  valve  video  watch  wheel  wheels  wiki  wireless  x??
Copyright © 2014 www.techbricks.nl. All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.
Powered by WebRing.