Search the Community
Showing results for tags 'nxt'.
-
Hello everyone, I would like to present my project: Lego NXT RC Karts. The idea was to build Lego RC Karts with a remote control that recognize the race track and respond to various inputs :) Originally, communication between the karts was also supposed to be possible. Unfortunately, the NXT master-slave-slave-slave combination was too slow for data exchange and therefore not feasible (the complete code was ready, but the response to inputs was much too slow). Then I switched to the remote control (master NXT), vehicle (slave NXT) option. I used the NXT Shooter as a basis and built two vehicles from it for testing. The vehicles each have two motors for propulsion, one motor for the shooter (useless but fun gimmick) and a color sensor to recognize the track. In one vehicle, the tracks are controlled individually and the other has separate steering and acceleration. The remote controls have two motors for steering and buttons for shooting and stopping the drive motors :) The color sensor detects the track beneath the vehicle. It distinguishes between the road surface (white, 80% power), red (braking strips, 60% power), green (boost, 100% power), and beside the track (neither white, red, nor green, 40% power). The track will consist of a paper roll (white) with obstacles (red areas) and boosts (green areas). It all works (hurray, took quite some time) Next, I'm going to build some fancier vehicles. I'm thinking of a tracked vehicle (similar to 42095) and a go-kart :) Programming was painfull and I had to start from very little knowledge. Many thanks to @Philo as I learned a lot from his spy bot and the related NXT programs. If there are requests for videos I might try my luck and learn where to upload and how to share those :P More Pictures of the vehicles, remotes and code can be found on Bricksafe. Names are Remote (Master: M1 or M2) vehicles (Slave: SM1 and SM2)
-
I wanted to power static Mindstorm builds at shows/events through wall power instead of rechargable AA batteries. I was going to design my own AA battery adapters then I found these on Thingiverse. They came in STL files that can be 3D printed. You only need to print two per Mindstorm unit. They have a nice opening to feed the wires through. AA Battery Eliminator by movotrab: https://www.thingiverse.com/thing:3160060 I had to make a small notch on the battery cover for the wires to come out. From here you connect to a 9V DC wall adapter.
-
Hello! I own the 8527 Mindstorms NXT set, in like new condition, and am looking for a buyer! All parts are present, including the red and blue balls, CD-rom, user guide, and original box. It was assembled once, and then shelved. Price: Please send me an offer! I am looking for something a little lower than similar Bricklink listings but I am willing to negotiate. Shipping: I will be shipping the set from USA. I am looking for sellers in North America so I can provide free shipping, but if the buyer is out of country then I might have to add part of the shipping costs to the total price. Please DM me if interested! (sorry for the blurry photos, these were taken on my camera and not my phone)
-
I am working on building the classic video game Theme Park in LEGO using a lot of NXT's, conveyor belts to get minifigs to walk around and try out the rides. You can read more about the standard I am using here: https://c-mt.dk/mmm/ I have Discovered that the ride, that I have Endevoured into here, is the most Challenging Enterprise of Columbian proportions: Space Shuttle. Should I fail, then I'm sure this will sink like Atlantis. There is not much info online about this, but you can see the Wiki entry here: https://bullfrogproductions.fandom.com/wiki/Space_Shuttle The LEGO model is full of smaller challenges that all have to be solved. The current state of this model is not pretty: It is very much a work in progress! But let's dive into the challenges. Challenge 1: The Outer Track The first is to get visitors into the ride, and leave it again. The track has the following deviation in order to allow visitors get in and out: The wheel helps push the track down in order to avoid the issue seen with the Bouncy Castle in this video: The two rides in that video use the following mechanism to allow a single motor to make the figures either pass by, enter or exit the ride: For the new module, I am using a much simpler mechanism, which is "stolen" form the original 8094 LEGO Technic Control Center. If this new drive turns out to be a success, then I will try to update the old modules similarly. Challenge 2: Getting Figures into the Space Shuttle I have been working on 4 different approaches for getting people into the space shuttle: - From the front by having the cockpit tilt up. - From the back by having that section lift similarly - From the side using a door like in a bus - From the side by lifting the whole wing. In the current version I have gone with the full-wing lift. I am not sure if this was a vise choice, since it has turned out to be quite a challenge. It would, however, be super cool if I got it to work. Here are the details: The track splits up underneath the space shuttle. This section is able to lower in order to allow the shuttle to move back and forth. It lifts to a bit higher than level: When lifted, it grabs onto the shuttle in order to keep it in place: From the inside of the shuttle, the tracks fit into some slots. There is space for 3 minifigs in the ride: The idea is that by running the tracks, 3 figures should be pushed toward the wall, which fills the ride. Unfortunately, testing shows that the figures prefer to place themselves like this: The figure outside simply does not have enough traction to push the others to the sides. This is a problem that I have not yet solved properly. Challenge 3: The Door Mechanism Originally I wanted to push the wing up directly. However. A lot of distance had to be cleared for this approach, so I changed to a separate lifting arm to push the door up. This mechanism looked like this, and had an arm dangling next to the cockpit of the shuttle: That mechanism was fairly unreliable, as it pushed the shuttle too much. So I went with another approach: Adding the lifting mechanism to the shuttle itself, instead of outside. The suspension arms of the shuttle now look like this: By turning the white clutch wheel, the door opens up: Now the challenge for me is to drive the clutch wheel, but that should be possible from the big arm of the ride that holds the shuttle, which leaves the largest challenge: Challenge 4: The Big Rotating Arm The crazy part of this ride is that it goes upside down in the video game. I want to recreate that in LEGO. This will require a very strong mechanism. I think that a counterweight might be necessary, but let's wait with this challenge until the other ones get solved. I will keep you updated with progress in this thread, and feel free to come with ideas and input.
-
This is the very first interactive MMM module. See a short 30 second presentation of it here: It is controlled by an NXT and activated using a sound sensor. Visitors are greeted with the exposed sound sensor, making it obvious that the model is sound-activated (and thus Corona friendly) When a figure stands in front of the trigger, they are pushed into the "shooter" part, which tips over any duck in front of it. You thus need a bit of practice to shoot a duck. The self-righting mechanism lets the ducks get up again before the next round. Here you can see how the NXT is packed: It is a fairly compact mechanism, and the access plates makes it easy to perform repairs. Since only 2 motors are used, the third motor output is used to power other MMM modules. If you want to build MMM as well, then I have made a handy "standard" page here: https://c-mt.dk/mmm/ My plan is to make more interactive modules, where visitors can not only see motorised functions, but also affect them. If you want to see all the details and how the mechanism works, then there is this extended video:
-
One of my NXT servos is exhibiting some odd behavior. I had to replace a servo for a different reason and this might be the replacement, but I'm not entirely sure as I didn't mark it as such. In any case, I'm curious if anyone else has seen this and knows the cause. With two servos that act as expected, I can place a single Move block in the program and use any of the duration settings and both servos will run and stop when programmed or run continuously if "Unlimited" is selected. However, when one servo is replaced with the misbehaving one, regardless of the duration setting, the latter servo will run continuously and the good servo will twitch as if it's about to run, but stops immediately. I have to end the program to get the "bad" servo to stop. If I place the Move block inside a Loop set to "Forever," the above behavior will be identical except for one scenario. If I set the Move block duration to "Unlimited," both servos will run and can be controlled by the Loop's "Control" setting, i.e. they will either run continuously or run and stop as set by the loop control setting. Simply using individual "Motor" blocks to control the servos does not solve the problem. There are good and bad programming scenarios with those as well with regard to the bad servo. The best guess I can come up with is that the bad servo is either not sending or not receiving a feedback signal, maybe both. I did wonder, though, if these servos have any firmware in them that might behave differently depending on when they were made. This isn't a fatal flaw as I can use the servo, but I am curious what might be going on. Thanks, Paul
-
HiTechnic make third party sensors for NXTs. One of their sensor’s, the gyroscope sensor, can be used to create a LEGO NXT Segway. A video of their model is available Additional details and building instructions are available at http://www.hitechnic.com/blog/gyro-sensor/htway/ Having seen how much enjoyment my children had when playing with this model, I decided to build some for a show being run by my LUG. I endeavour to provide the public an opportunity to interact with my displays, on the premise that it is more interesting for them. While testing the models prior to the show, I identified some minor alterations to HiTechnic’s program which appear to improve the stability of the Segway. The remainder of this post describes some observations about running the model and alterations which were made to the original program. But first, Cutting to the Chase If you’re more interested in running the modified program rather than reading the rest of the post, download this zip file and follow the instructions in the readme.txt file to install the program on your NXT. General Observations 1) Having similar motor speeds helps The robot stability seems to improve if the two NXT motors rotate at close to the same speed. An issue of differing motor speeds is described here and includes some techniques you may wish to try to better identify suitable motor pairs. Alternatively, within the zip file identified above, there is a program named rotation_count. You can install it, connect one motor to the A port and one to the C port and run the program. The program will identify the number of rotations each motor makes in 20 seconds. The closer you can get the numbers to match, the closer the motor speeds should be to being the same and the more stable the robot appears to be. 2) Battery charge level matters I tend to run my NXTs with the rechargeable battery pack. It is noticeable that when the robots have been running for a considerable duration (hours), they become more prone to falling. This is resolved instantly by replacing the rechargeable battery pack with a fully charged battery pack. Program Tweaks I made a couple of tweaks to the program. One was to try to improve the stability and the others to enhance the usability. a) Gradual Speed Change The original program treats the command from the Infrared remote as an instant command. The two lever IR controller has three speed values; -7 (backwards), 0 (neutral) and 7 (forwards). If the Segway is travelling backwards and both levers are pushed forward, the Segway responds by changing the motor direction at full throttle i.e. from -7 to +7. The modified program treats a change in the IR remote lever position as a speed delta change. When the Segway is travelling backwards and both levers are pushed forward, the Segway responds by changing the motor speed and direction in single increments i.e. -7, -6, -5, -4, …, 4, 5, 6, 7. This results in a more gradual acceleration/deceleration for the Segway and less “rocking”. b) Prompt for IR Channel The modified program begins by prompting for which IR channel number you want to control the Segway with. This allows multiple Segways to run concurrently using independent IR remote controls. c) Continue After Falling When the Segway falls, the original program displays a message and then exits once the NXT’s “return” key is pressed. The modified program displays the same message but then loops back to the point where the Segway is stood up. This alteration makes it easier to continue running the program when it is under the control of a member of the public e.g. at a display. Demonstration The following video is split into 3 segments. They illustrate; the impact of having a low battery (segment 1) the benefit of a fully charged battery (segment 2) the behavioural difference between the original program (yellow Segway) and the modified program (white and red Segways). The difference is most noticeable toward the end of the segment. The yellow Segway will start and stop turning before the other two Segways. Similarly, the yellow Segway will begin to move forward and backwards sooner than the red and white Segways, which results in it swinging more. If you have any questions about anything above, please post them here and I will do my best to answer them. Regards, David
-
weight(only Lego parts): 1300g weight(with cutting board and knife): 2000g lenght: 50s width: 45s height:45s The main function of this device i cutting fruits in squares. For the driving part i used 2 motors, one of this motors move a knife. Second motor is responsible for driving. This machine also have a safety system. When you move hand in front of knife, everything will stop. After cutting, the machine pushes the fruit into the bowl. "Agresive mode" - this is my brother's creative idea... All functions can be seen in my movie. Have a nice watch. :)
- 9 replies
-
- food cutter
- nxt
-
(and 1 more)
Tagged with:
-
Dear All, there are numerous contributions on electrifying LEGO train switches, including those here on EB. All-LEGO solutions, all-custom solutions and “everything in between” has been presented. One issue for my layout was: How to control about 30 electrified switch points on a fairly large and rather congested layout with many areas not readily accessible – in a purist solution? Using individual cables going from one single “control center” to the switches would result in some considerable cable mess. Alternatively, PF receivers may serve as remote controllers on “PF layouts” – manipulated via IR light from the center. That is a very elegant solution, however, there are only 4 x 2 IR channels (or 8 x 2 in extended mode with a mandatory custom remote control program), which is not enough on my layout, particularly when running several PF controlled trains eating up channels as well. One approach is a fully LEGO based solution using LEGO programmable bricks (PBricks). With such PBricks one can use a variety of motors on the drives and also some fairly flimsy switch drives because of power and timing control of the drive train. Furthermore, with some software development (e.g., NQC, RobotC, NXC, NXT-G …) the controllers may get their own “address” and operation software. However: Cost may become an issue: You need 1 NXT or 1 RCX for each set of 3 switch drives, or 1 Scout for each pair of 2 drives (in case the drive is operated with one additional MicroScout, the Scout can also operate 3 drives) … More recently, LEGO compatible 3rd party switch drive controllers have become available: The 4DBrix (https://www.4dbrix.com/) varieties are extremely nice! What I find particularly intriguing is the control software. The entire product line from switch drive, controller, to full software integration is the best LEGO compatible solution I became aware of. Nevertheless, here is my all-LEGO “solution”: Brick-built switch drive controllers equipped with PBricks. Please don’t take this post too seriously. It was a lot of fun to build these – plus I like to see stuff moving and making noise (in addition to trains that is) on my layout. Since a video says more than 1000 words, here is the “visual summary” of the rather long write-up following below: And here are some more detailed descriptions ... Working principle The idea of this approach is rather old; in 2007 this article in Railbricks Issue #3, page 44 illustrated some details: The controllers serve more than 3 switch drives with only one PBrick by “mechanical address decoding” – or whatever you want to call it. At that time though I did not think about “simple” motorized switch drives; the ones I used then were all equipped with MicroScouts and were designed to run only with these. That limited the applicability of the controllers on my layout significantly: You need to turn on a MicroScout and put it into “P” mode to let it do what is expected from an electrified switch drive. However many of the switches are hard to get to – hiding behind bookshelves and underneath/within furniture. I have thus added mechanical switch drive controllers for operation with NXT, RCX, and Scout PBricks operating most of the LEGO electrical motors, including PF. So far I have electrified all my switches and bunched them up in “groups” using four such switch drive controllers. What are the controllers supposed to do? They serve as “local remote control hubs” for a group of switch drives. There is essentially only a purely mechanical “bricking” limitation on how many switches can be handled by each controller. The controllers have a dedicated address, for simplicity let’s say address 1, 2, 3; the individual switch drive is hooked up to the respective switch drive controller and has a local “address”, let’s say a, b, c, … The last bit of information required is the switch position, let’s call that “straight (s)” or “turn (t)”. The information sent to all the controllers on the layout is then “controller address + local switch address + switch position”, for example “2, d, t” means that switch “d” operated on controller “2” should go into “turn” position. As shown in these posts here and here, all communication on my layout is via the LEGO IR messaging protocol, mostly transported via RF. Figure 1 shows a “bare” Scout operated switch controller without any decorative stuff; Figure 2 a controller with an additional decorative brick structure remotely matching the Toy Story steam engine coaling station, Figure 3 a controller that is residing within a “building” remotely matching (if at all) the appearance the #10027 train shed – however with a rather “transparent” roof (in fact I got hold of 50+ of transparent #41750 pieces for free and all were left handed … what to do with them?). Figure 4 shows a more or less bare controller I built because I needed to serve 12 switch drives in locations under my desk and further away. All four work on the same principle, but use slightly different mechanical operating techniques. The Scout operated controllers in Picture 1 and 2 use the Scout’s Visible Light Link (VLL) terminal (“Output C”) to connect with MicroScout operated switch drives via an optical fiber link. In my opinion, TLC never really exploited the possibilities of the VLL link. They for example never produced optical fibers longer than about 20 cm, as far as I know. Rather cheap plain vanilla optical fibers (1 m for less than 1 €) are good enough. The controller in picture 3 runs with an RCX PBrick and uses PF switches to operate switch drives equipped with PF or 9V motors. It features a moving stage powered by a PF M motor and a Technic mini motor for actuating the lever throwing the PF switches. The controller in Picture 4 operates an almost identical stage. The stage drive is not mounted on the stage itself; the Scout drives the stage via Technic chain links (#3711) with a stationary #47154 motor and again a Technic mini motor (#43362) for switching. Common to all controllers is the “positioning” mechanism of the moving stage: In case of the optical controllers, VLL light from the Scout output needs to go through the corresponding fiber connecting with the MicroScout operating the switch drive. The fibers are simply pushed through Technic bushes into a Technic brick with holes, in other words they are always nicely lined up. So we just need to get the VLL light from the Scout to the corresponding hole. That is accomplished by either moving the entire Scout PBrick (see controller in Picture 2) or by moving the 20 cm long LEGO optical “fibers” (BrickLink ID x400c20). These are more or less plastic tubes that came with the ExoForce sets – finally I found a way to use them …) connected to the VLL terminal to the target hole, see picture 1. The Scout has a built-in light sensor; that one is used to detect when the VLL output diode is in line with a hole or somewhere in between by measuring the light intensity emitted from a LEGO light brick (9V or PF): When the light from that brick goes through a hole, the detector sees it “brightly”, when it is more or less blocked, it only sees a fraction of the “bright” light. When the “hole detection” mechanism is lined up with the fibers, we are done; this is readily the case when stacking Technic bricks with holes. Basically the same approach is used for the RCX controllers; here we need to get in line with the PF switch levers. When lining up PF switches directly next to each other, the levers are 3 holes apart, and we can use a simple optical positioning mechanism again to get to the right switch. The actuator of the moving stage for throwing the PF switches (see Figure 3 + 4 and video) is partly shown in Figure 6. Since the PF switch has three positions (“forward”, “0”, “reverse”) and the switch drive motor is turned on only for less than a second, the PF switch needs to be swiftly turned back to the “0” position. That is tough to do with powering the actuator motor accordingly. Furthermore, the lever needs to be straight up after switching, as the stage/actuator needs to freely pass the switches when moving to a new target. I have used the fairly tight 6.5L shock absorbers (#73129) to push the actuator back into “0” position after the switch was thrown. As mentioned, the switch is thrown with full torque of the Technic mini motor (PBrick output “full forward/reverse”) as the actuator has also always to push against one of the two springs of the shock absorbers. The output of the PBrick is then put into “float” rather than “stop” mode, so that the motor axle turns freely and the compressed spring of the absorber pushes both the PF switch lever as well as the actuator into “0” position. Programming the PBricks The programs running on the PBricks are rather straight forward. NXT, RCX, and Scout PBricks are all capable of multitasking. In my programs, one task is handling incoming messages. The moment an address is recognized by a PBrick as “my ID”, it listens very carefully for the next message(s) to come in; that one contains local switch address and desired position. The routine puts that message onto a stack, sends a “got that” reply and continues to listen for further messages to arrive. A second task watches the stack: Nothing here, nothing to do. Once there are messages on the stack it fetches one, analyzes it and drives the positioning mechanisms to the appropriate output, sends out either VLL light or briefly operates the PF switch by changing the driving Technic mini motor from “float” (off) to “forward” (or “reverse”) and then back to float. After completion it throws the message away and continues with the next one on the stack. How does each controller know, where the moving stage actually is? Upon startup, the stage is driven all the way to the right, until it reaches the “right limit” touch sensor. Then the light brick is turned on and the trolley moves all the way back to the “left limit” touch sensor. On this journey, the light sensor continuously monitors the light intensity. The brightest light value detected is then considered a “hole”; everything else “in between”. Then the trolley moves back all the way to the right touch sensor and on its way, holes are counted and each switch is thrown to get all switches into the “straight” position. Now we know how many switch points are present, we know they are all set to straight, and we know that we are at position “0”. Upon getting a message, let’s say “turn switch 5” it starts to move left and simply counts up holes. Once it arrives at “5” it stops and is automatically aligned with either a corresponding hole for the VLL output of the Scout or the lever of a PF switch. Then it either sends out the VLL forward/reverse command (Scout) for a given amount of time or it throws the PF switch (RCX/NXT), again for a given amount of time. The switch drive motors are turned on within a “hundreds of millisecond” time frame. This time is adjusted to the requirements of the switch drive. That is basically it. The VB6 program (I am old …) running on my laptop is showing my layout with all the track including switches. Basically the program is one database with some graphics and in/output around. Clicking on one of the switch symbols makes the corresponding real switch change its direction. The program searches the database and finds out which controller is assigned to this switch. Furthermore it finds out to which local output (a, b, c …) that switch is connected on the selected controller. Since the program knows the current status of the switch on the layout it composes a message as described above: Controller address + local switch address + new position and sends that out via the IR tower into RF space. There is a little more to it. To ensure rather secure communication between host computer and remote controller, there is a handshake protocol: The controllers acknowledge messages they understood. If there is no reply, the host control program repeatedly sends out the same messages. If there is still no answer for let’s say five consecutive attempts, a warning message tells that something is wrong. The controllers also have some safety routines – should the stage go beyond the end points it stops operating and sends an SOS message, and do on. Seeing this happen is real fun! However the SOS thing hardly happens at all … Another thing to notice is that MicroScouts go to “sleep mode” when not doing anything for about 10 minutes. So every 9 minutes or so, the stage is driven all the way to the left, then right, recalibrates the light sensor, and then back left, stopping at every hole and let each MicroScout play some sound. So they never fall asleep … and there is even more action on the layout. One thing I am somewhat proud of is that all that functionality is possible with 396 LEGO byte codes on the Scout controllers. The RCX PBricks have monstrous 8 kByte of storage space – I believe you could use an RCX to successfully fly to the moon, land there, play soccer, and safely return. These TLC folks are ingenious. And if you don’t want to run a clumsy computer based control program – learning remotes work also very well for easily controlling more than 30 switch drives. This was already discussed in this post. The number keys “1” through “9” correspond to switch drives 1 to 9. I first press one color key (ID), addressing a particular controller and then swiftly a number key. The controller that recognizes the address operates the corresponding switch drive and puts the switch to the “branch” position. Upon pressing the address and then number key twice, it goes to “straight” … Some files The LDraw mpd files for three controller types (Fig 1 – 3) are here along with the NQC programs here running on the PBricks. The controller in Fig. 4 is in the works). Please see readme files in the directories. Note that you need to have the official and unofficial LDraw parts libraries installed. When opening the LDraw files with MLCad, the program tells you that newer versions of some parts are available. Ignore that, otherwise the model may be corrupted. All LDraw files open correctly with LDView 4.2 and MLCad 3.5 Best regards, Thorsten
-
Dear All, since 2001 I am working on this: LEGO train layout control from one single computer (trains, switch points, light, bridges, …) using as much as possible original LEGO hard- and software. Still WIP but getting close. Most of the LEGO stuff used here is – since long – not officially available anymore. But LEGO is LEGO and lasts forever … and now I am close to getting it all to work. This project has survived Win98, QBASIC, WinXP, VB6 (well not true, still using it, see below …). And as sPy pointed out correctly in his reply on my PF RF hack, all this is building on stone-old electronics hardware. But: All this stuff is still available today. BrickLink is very close to LEGO heaven, I believe. And because nobody really cares anymore about RCX’ or MicroScouts – they have become dead cheap. I recently ordered RCX’ 1.0 with power jack for less than $20 each. These are the best PBricks ever made by TLC … imho, of course. There are many powerful and elegant solutions for controlling PF operated trains as well as track/track side-related functions such as remote switch operation, lighting, train detection, and much more. Most of these are based on home-built (as for example the myriads of wonderful Arduino-based solutions) or third party commercial devices, e.g. SBrick, 4DBrix/nControl, PFx Brick, and increasingly more. And this is wonderful. This post is just another one in this line. The difference is that I tried to use exclusively original LEGO stuff. Based on IR communication, it works perfectly well, but only within a range of about 1 m, which is not that good for train/track control ... So there was “only” one but significant modification required: Changing from IR to RF communication. This post illustrated how to do that. And if you don’t want to break into your PF receiver at all but just an add-on, this works also perfectly well, but is somewhat more elaborate. The ultimate goal of this project is to control diverse LEGO devices (PF, RC-train, RCX, NXT, Scout, MicroScout, Spybotics) from one device. In my case from a program running on my computer. However this could also be any device that can generate LEGO Mindstorms IR messages (which were introduced with the RCX, as far as I know), for example: A computer with one of the LEGO IR Towers attached, running the Bricx Command Center (BricxCC) software, A computer with one of the LEGO IR Towers attached, running any other program, which has access to the LEGO IR Towers; this includes the various programming environments and languages such as NQC, RobotC, or any custom program that has access to either a serial port for the serial tower or the LEGO drivers for the USB tower. (Note that on 64 bit platforms, the USB tower does not work anymore, since TLC never updated the required driver for the tower. In that case the stone old serial tower attached to a RS232-to-USB converter has to be used and accessed via a free COM port, preferentially in the COM1 … COM8 range. Works like a charm. Some people have trouble to get BricxCC or the original RXC 2.0 Mindstorms software communicate with the RCX only caused by the missing driver. Some revert back to 32-bit or even Win98 … not necessary!) Any of the RCX, Scout, or Spybotics, NXT(+IR Link Sensor) PBricks, Any learning remote, that was trained with any of the above means of generating LEGO Mindstorms messages; I am usually using BricxCC for programming. For testing purposes on my train layout, the programmed learning remote is very handsome: On my home-office style train layout (yes, I do work here as well), there are currently running/installed 8 PF trains 1 RC train 2 RCX controlled trains In addition to 2 RCX switch controllers (one serving 7 switch points using PF M motors, the other 12) 2 Scout switch controllers (one serving 3 switch points using 3 MicroScouts, the other 7) 1 Scout train bridge controller, see below 2 RCX light controllers with 3 outputs each, see below Each of the PBricks (RCX, Scout, NXT) have their own "personal" ID they recognize and respond to; the PF and RC trains are handled by the NXT PBrick (equipped with the IR Link sensor from HiTechnic) serving as central “PF/RC-train communications hub”. The NXT recognizes a total of 3 (RC) + 8 (PF) = 11 ID’s and maps these to the 3 RC and 8 PF channels: The NXT is operated with standard LEGO firmware (V1.31) and the LEGO NXT-G software environment is used for programming. Unfortunately the IR Link sensor has a very limited communication range, far less than any other IR light emitting LEGO device. This was one more reason for me – other than wanting no line of sight operation – to switch to RF. I have thus placed one of my IRRF transceivers (big words for not much, this is just what I am calling them) right in front of the IR Link sensor, which sends out every 38kHz modulated IR light it detects into RF space and listens for any 433 MHz signals in half duplex mode on a first come first serve basis: If IR light is detected then RF is sent out – if RF is detected IR is sent out. Both channels are dynamically mutually “blocked”; when an IR message is sent out it will continue to do so until finished, the same holds true for RF. Here is an overall schematic of the RF connectivity and direction of signals. In case of PBricks (NXT, RCX, Scout, Spybot) bi-directional half-duplex communication is possible (but not required), thus the IRRF transceivers come in handy. In other words: The addressed PBrick may reply with “OK”, “Did not recognize the payload”, or “I am busy”. In case of NXT to PF or RC-train, just uni-directional communication without any feedback is possible. The NXT-G program running on the NXT PBrick equipped with the HiTechnic IR Link sensor is is available on my university account. This navigates you to a folder , which contains the entire program. It is divided into the main program “RCPF_Control_14” and several “MyBlocks”. This structure is entirely owing to the limitations of the LEGO NXT-G software GUI. One could readily program (“tie together” is better phrasing) this is one block – but the GUI freaks out when exceeding a couple of nested loops. Putting these into individual MyBlocks circumvents this problem. The compiler readily generates the correct output code – “regardless” (I found no limits) of number of MyBlocks nested or called. This is the workflow on the entire layout: Essentially, one supplies an address byte plus a payload byte consecutively as two LEGO messages within let’s say 2 seconds; that is easily manageable with the programmed remote. When programs send out the two messages, the time between ID and payload byte can be much shorter, in the 100 ms range. The two bytes are each encoded according to the “LEGO Mindstorms IR message” protocol. Prepare 2 messages: Address as LEGO IR message + payload as LEGO IR message: Send these messages consecutively out into RF space: Any “intelligent” device equipped with an RF receiver will recognize its own address, listen for the payload and act appropriately. Example: RCX1 has address 192. We issue the sequence “message 192” + “message 8”. RCX1 will now do what “8” means within its own program running. Another example: NXT1 recognizes all addresses between 194 and 205. Let us say, 194 to 202 are mapped to PF trains 1 to 8, and 203 to 205 to RC train devices 1 to 3. That would cover the regular PF and RC address space. NXT1 senses address 194 and payload “-5”. It then uses the IR Link to send out the PF single pin command “PF channel 1A motor power -5” into RF space. Which lets the corresponding PF train equipped with an RF receiver “go reverse at power level 5”. And “205 + 4” will then get RC train #3 on forward level 4. The device addressed acknowledges the reception of the messages by sending out “OK” or any kind of error message (e.g., “I am busy”) to the caller. When using one-way communication, e.g. the handheld remote control, that acknowledgement goes of course unheard – when running a program with IR tower that could be recognized by the program and acted on (simply resending the message or wait and then resend and so on). Using the PF single pin command lets the PF receiver “jump” to the respective power level; when it was at 0 = stop, sending “7” would bang the motors full forward. This is handled by the NXT program as well: It slowly increases the power level with programmable delays between the steps. This results in a more “realistic” train behavior. The LEGO RC train protocol just allows the commands “increase” (+1), “decrease” (-1), “stop” (0) on a scale of -7 to +7. The PF protocol allows the increase (+1)/decrease (-1) scheme as well, however, a control program may lose “track” when such a command issued was not received properly, since there is no feedback. When all three available RF frequencies 315, 418, and 433 MHz are used, 8 x 3 = 24 PF devices can be controlled with a total of 12 PF receivers. That is not including the change of the “address space”-bit in the PF protocol, which would double this number to 48. Any other track or trackside devices to be remotely controlled with PBricks works of course as well; here is an RCX turning on/off the light in the light house or the diffuse and changing light in a scary tunnel not shown (yet). Or a Scout letting a bridge go up or down and reporting the bridge status to the host control program. Switch drives hooked up to an RCX or Scout based brick-built “switch drive controller” may also recognize the address + payload sequence and act appropriately: “RCX2, put switch #5 in branch position”. See list of my controlled stuff above. In summary: You can control PF, RC, RCX trains and RCX, Scout, Spybot operated switches or other devices with an almost pure LEGO solution. Up next: Build switch drives and controllers solely from LEGO bricks + Scout, RCX or Spybot PBricks and then program them using LEGO software. (Sorry for the long post) Best regards, Thorsten
- 4 replies
-
- layout cotrol
- nxt
- (and 5 more)
-
Hello friends, It is I, elrid from india, and I am of having difficulty sending sounds over bluetooth to a second NXT. I have a master-slave relationship between two of my best NXT specimens, but one of them does not have working speakers (even the startup noise doesn't work my friends!!!). So, I am of trying to get the first NXT to signal one of another NXT with speakers work over bluetooth connect. I use BrickxCC language. Any help is appreciate. Thank you friends! I am see with my eyes there is individual named DR_SPOCK who is very helpful and handsome. Hopefully he can help.
- 1 reply
-
- nxt
- programming
-
(and 1 more)
Tagged with:
-
I created this modified Bucket Wheel Excavator some time ago, and I thought I would like to share it on this forum. After building the original BWE, I wanted to try to incorporate some Mindstorms functions into it. I managed to motorise all the active functions, using both an EV3 brick and motors, as well as some PF motors. Functions can be preprogrammed, or can be remotely controlled using an EV3 IR remote. Here is a list of the functions: Bucket wheel rotation and main conveyor belt - PF XL motor Lower conveyor belt - PF medium motor Boom arm elevation - EV3 large motor Lower conveyor swivel - EV3 large motor Superstructure rotation - EV3 medium motor Driving - EV3 medium motor Since I owned an NXT as well, I used it to motorise the small mining truck that was included in the set. There are also some LEDs that illuminate the 'work area', but they don't really do a good job, its just a nice thing to include. Here is a video of the excavator in action, as well as the mining truck (sorry about the poor resolution and bit rate): More info about the machine can be found here: https://www.us.lego.com/en-us/mindstorms/community/robot?projectid=3e125a5b-475c-4a4c-b3ed-e4b4f2192907 Let me know what you think of it in the comments!
-
For our Sioux.NET on Track project (see https://siouxnetontrack.wordpress.com), we not only write a PC application in Microsoft.NET (C#). But we also write quite some code that runs on the EV3 bricks. In this article, you'll find programming tips & tricks for the Lego Mindstorms EV3 programming environment. Is it possible to have two or more EV3’s in Daisy Chain mode and use WiFi to connect to the PC application? Yes, you can. Read the full article how you can achieve this at the blog: https://siouxnetontrack.wordpress.com/2017/04/08/how-to-ev3s-in-daisy-chain-mode-plus-wifi You can use two or more threads in parallel to run on an EV3. But how do you synchonize them? Read the article how to do this at the blog: https://siouxnetontrack.wordpress.com/2017/04/02/how-to-synchronizing-two-threads/ More to come later. Enjoy, Hans (moderator of our Wordpress blog Sioux.NET on Track)
-
- programming
- mindstorms
-
(and 4 more)
Tagged with:
-
Hi, my NXT Axle Sorter is finished. This machine works with a Lego Mindstorms NXT 2.0 and an IR Link sensor. The little car that you see puts the axles in the right containers. The large 'building' with AXLE measures the length of an axle with the color sensor as you can see in the video. The little car drives over some gear racks. The ultrasone sensor reads the distance and the IR Link sensor sends the signals to the little car. Here you can see the inside of the machine: The machine sorts normal axles. Also the new colors (example: the red 4) If you want to sort your axles you need to do these five steps 1. Put the axles in the machine 2. Press the button on the NXT 3. Have a drink 4. Take the containers with the sorted axles out of the machine 5. Make your next Lego Creation If you want more pictures about some details, let me know. Here is the video:
- 12 replies
-
- nxt
- mindstorms
-
(and 1 more)
Tagged with:
-
Lego doesn't support a message protocol that is interchangeable between the NXT and EV3 brick. To overcome that problem, I have written a small program in C# to make the translation between the two different bricks. It works fine, but you always need a PC in between. At our blog (see https://siouxnetontr...pc-application/), I have written an article with a completely different solution, namely a 'motor communication protocol'. Enjoy. /Hans
- 19 replies
-
I am trying to make my Mindstorms NXT communicate with an Arduino board. The final project will be a warehouse robot that checks the colour of the contents on a pallet and stores it on a shelf. You can then order a number of pallets in different colours and the robot will get the order on a first-in-first-out basis. The inventory will be kept on the Arduino board along with the ordering interface and the Mindstorms will do the colour checking. New pallet operation: (NXT) Senses the pallet (NXT) Checks colour (NXT -> Arduino) Notifies the Arduino of a new arrival and its colour (Arduino) Finds a suitable location (Arduino -> NXT) Notifies the NXT of column and row (NXT) Puts the pallet in place (NXT -> Arduino) Sends an ok message (Arduino) Updates inventory Order operation: (Arduino) User creates order (Arduino) Checks which pallets to use (Arduino -> NXT) Requests NXT to get pallet (NXT) Delivers pallet (NXT -> Arduino) Sends ok message Step 3-5 is repeated for every pallet in the order (Arduino) Updates inventory What I can do at the moment: Connect the two manually Send single characters from the NXT to the Arduino What I would need input on: Sending information from the Arduino to the NXT At the moment the two units seems out of sync in some ways. The information sent from the NXT to the Arduino is sometimes picked up and sometimes not. I an guessing this has something to do with the Wait block and the delay() function. I am using the blocks for sending and receiving messages on the NXT and I am using Serial.write() and Serial.read() on the Arduino. The bluetooth module is an HC-06 ( http://www.kjell.com/sortiment/el/elektronik/mikrokontroller/arduino/bluetooth-transceiver-p87942 ) and I am using an Arduino Uno. I have found some information when searching, but many are specific to an alternative NXT language.
-
- mindstorms
- nxt
-
(and 1 more)
Tagged with:
-
I made a printer
technical posted a topic in LEGO Technic, Mindstorms, Model Team and Scale Modeling
This is an early proof of concept before rebuilding it completely: Running down the pen: I built this printer LEGO parts. It prints pretty well with markers. It prints in dot-matrix and line modes. I did this with an unmodified EV3. Some of the work was creating huge binary files to print from. Video: -
Hi all. Here's a brief video of the EV3 floor roving robot I've been working on for the past few days. It's pretty crude but can go a long time without getting stuck. It makes use of one distance scanner in three positions by using a clutched IR sensor, has two bumper sensors that are padded by shock absorbing springs to reduce impact on the touch sensors. Behind the bumper is mounted a color sensor on the front that is used to measure near distance and ambient light. It appears to flash because it's rapidly switching between measuring these two things, With this sensor it can detect objects near to the ground that the main sensor peers over, and also back out of shadows so it doesn't get under furniture. Working on the software has been the long part as there is much debugging to do and each test run can take a long time depending on what I'm trying to improve. It makes decisions based on distances to its surroundings on three sides, so if it senses it's coming up on something in front of it, or a bumper strike is detected, it will choose to turn left or right depending on which direction is more open.
-
...hello out there... this past weekend, I was able to buy an opened/used Mindstorm EV3... some of the baggy parts were open, while some were not... I did check the big and important pieces by looking at the parts list at the back of the manual... although it wasn't listed, I've been told prior that there was a CD that comes with it... the one I bought did not... My questions are: (1) how important is this CD to the overall functionality of the EV3, (2) where can I get a hold of one without going through TLC and Bricklink and (3) can the content of the CD be copied for personal use? Any help is much appreciated.
-
I don't write that often in here, but I simply had to share this model. A friend and I have worked on how to introduce kids to programming from a very early age and this is our first project: As said this is our first project in this direction and we are already tinkering with the next project, as this model have quit a few problems. The steering is not precis enough, red balls are often registered as yellow and you need two NXT models to build it! The idea with the next model is that the students should put QR stickers on a paper. We then use a smartphone to register the QR codes. The smartphone then tell the robot how to drive based on the QR codes. The only problem is that we haven't tried to combine smartphones and mindstorms yet. Does any one here have any idea what program to use, how to start working on it or another place we might be able to find some startup help? Part of the model builds on Robin Newmans ball sorter, found at: http://r.newman.ch/lego/ The program can be downloaded at: https://www.mediafire.com/?9h6bb8pggw6ymhm
-
So basically I am doing the sumobot challenge where you have to build a robot that has a max length and width of 20 cm each. The arena of the competition is a hexagon with white borders and has 6 poles. The rules and everything is online and is pretty self-explanatory and we are also allowed to have 1 extra sensor than what is in a standard nxt set which is 1 of every sensor in case you were wondering (so we could have 2 light sensors instead of 1). I was wondering how we would detect the poles and and avoid them without interfering with the actual pushing off other people (so not as simple as a touch sensor in the front since other bots would push that too. Someone told me there is multiple ways to do it. I don't really know any efficient ones. Any ideas? Sorry if I posted in the wrong area I am new.
-
A large Steampunk creation displayed at BrickFair VA 2014! I used Mindstorms NXT to motorize the doors, the airship, and the winged flying machine. Previous Steampunk creations of mine took inspiration from the orient and the wild west. For the Steam Workshop, I wanted to capture the essence of Victorian England. The above image is linked to a video of the Steam Workshop in motion! A gentleman and his robot await the unveiling of a new airship! He is also having a picnic! Inventors and workers toil away in the workshop, working around the clock! Ladies and gentlemen watch their progress from above. Test pilots are always needed! Next to the steamy industrial workshop is a refreshing garden! A Steamcopter rests on a special landing pad. The Steam Workshop was Nominated for "Best Steampunk"! I hope you enjoyed this tour of the Steam Workshop!
-
Hi. it's been a long time since last moc. on account of me moving. however i have been working on a articulated truck inspired by the Uniknick. like this one: Here it is: the model features (at the moment): - XL-motor for steering. - 2 x NXT motors for drive. Features i would like to implement: - front and rear hitch. - winch. i also mean to build a unimog u4000 or 402 cab for it. however i am not too good at building those sorts of things. i hope you can help me there. Here is the LDD file: http://www.brickshel...thout_motor.lxf Enjoy! Will upload more pictures to my brickshelf soon. http://www.brickshel...gi?m=KopMaister