Friday, November 12, 2010

Mindsensors' Numeric Pad

Last week I received the new Numeric Pad from Mindsensors to test. It has 10 digits (0...9) a "*" and a "#" key. The keyboard can be operated without actually pushing buttons. They sense the presence of your finger. Great ! To give some feedback that the key was pressed, I added a 'beep' to the software.

To give it a spin I created 2 contraptions. The first was a simple calculator. It consists of an NXT and the keypad. Nothing fancy, but it does work.



The second is a gate that is locked with a code. If you enter the correct code the gate opens, if not it stays closed. I used the colorsensor to show the state : Blue = Initializing / Red = don't drive / Green = drive

Thursday, July 29, 2010

Nissan Patrol - WIP

NissanPatrol_1280 Inspired by Sariel and ATR, I wanted to build my own scale model of an off-road jeep. I chose the Nissan Patrol 4x4 (model 1980) and want to build it on scale 1:13. This has proven hard work with many changes and restarts to make something that actually works and fits in the limited space, but I think I am making good progress. The chassis, steering mechanism and drive train are ready.

Here is a video of the tests I have done so far :



I hope it will be good enough to participate in a TruckTrial :-)

Sunday, May 16, 2010

Brickmania 2010

Today I visited Brickmania, an event organized by the Belgian Lego Users Group in Wetteren (Belgium). The event itself was relative small in size, but that doesn't mean it wasn't fun or interesting. During my visit I made following video

Friday, April 30, 2010

1 NXT, 5 Motors

Mindsensors is developing a new multiplexer which allows to connect 2 extra engines to the NXT. It is a complex device that has its own built-in controller and needs a seperate power supply. How does it work ? You connect it to any of the NXT sensor ports for the communication, connect 1 or 2 engines to the multipler and hook up the batterypack with 6AA batteries. To control the engines you need software that can be downloaded from the Mindsensors website, including some test programs. Controlling the engines is pretty similar to controlling the standard engines because the microcontroller on the multiplexer handles the intelligent part. It reads the motor encoders and therefore allows you to accurately control the number of rotations, time, speed of any of the engines. Furthermore you can still connect a sensor to the port, since the multiplexer has a pass-through connector that allows you to add an I²C connector to that same port. Pretty neat !

Here is a little video that was meant as a teaser

Sunday, February 28, 2010

Ground control to Major Tom

Debugging microcontrollers has always been a challenge for us, mere mortals. You can of course buy an in-circuit debugger, but this will cost you a few hundred bucks. Given that most microcontrollers have a serial connection (USART) built-in, a cheaper solution is to build a cheap, simple RS232 interface to your computer. Two problems :1) modern laptops don't have an RS232 connector anymore. 2) We build robots and they move around making a cable a bit of a nuisance, so we wanted to have a wireless connection to our PC. Several options exist : Wifi, Zigbee/Xbee, FM, ... but we decided to build a bluetooth connection using a BlueSmirf module (Sparkfun). This modules has a serial interface at TTL level and can be directly interfaced with the microcontroller and emulates a virtual COM port on the PC where you can read/write to it using a terminal program.

The hardware implementation was straigtforward : connect the +5V, Ground, connect RX to TX, TX to RX and you are good to go.

The pairing was straightforward : let your PC search for new Bluetooth devices, enter the password and Windows will do the rest. All you now need is a terminal program (e.g. Hyperterminal or Putty), choose the correct virtual COM port, set the baudrate and other settings correctly. That's all. Sadly enough that leaves you with a blank screen. One more step ...

The last part is the hardest : write the code for your microcontroller. Luckily there are very good examples to be found. Like this one for the Arduino. I decided to use a Microchip PIC (18F4550) and write the code in MPLAB C18 (the student version). C18 has a library to interface with the hardware USART module, making it easy to write programs. Reading can even be done via an interrupt routine or simply by polling the input queue. An afternoon of searching, trying and coding and ... tada ... I could send messages from my PIC to PC and vice versa.

One drawback is that I need to power-on the PIC (with BlueSmirf) first, then PuTTY on the PC. At that moment the PIC can send messages to the PC. To allow the PC to send messages to the PIC I need to reset the PIC after PuTTY has started. Not too much of a problem, but something to keep in mind. Some other wireless systems are less sensitive to the order in which the programs are started.

Anyway, not bad for an afternoon of fooling around, even if I say so myself !

Sunday, February 21, 2010

Lego Crane Truck 8258 NXTfied

Remember the truck I got for Christmas ? Remember that I wanted to automate it ? Well, the job is done, the movie made and the pictures taken. The brain of the truck is a NXT which controls the driving and steering motor directly, but also controls the 3 PowerFunction engines I used for the Crane. Instead of using the standard remote control of the PF engines, the NXT uses a HiTechnic IRLink to control speed and direction of the engines. The entire truck is controlled from my mobile phone via Bluetooth. The software for this was written by Alexander Demin. We made some changes to the portion that runs on the NXT to allow the commands from the phone to be interpreted correctly.

Here are some pictures and here is a video of the truck in action.

Saturday, January 9, 2010

WOLL-Y : Wake On LAN Appliance

Sorry, No LEGO this time, Guys & Gals…
Wolly_proto A friend of mine had decided to build his own DVD/Hard disk recorder based on a PC with Linux and a TV card. This turns out to be a very cost-effective and future-proof solution that allowed to add many features. However it had also one disadvantage : the PC had to be switched on before the recording would start. Not very power friendly. Some experimenting showed that it was possible to turn on the PC using a the 'Wake-On-LAN' feature in the BIOS. Having one PC switch on another was obviously nonsense, so the idea grew to develop a power-friendly, microcontroller based little appliance that could send a 'Wake-On-LAN' signal to the PC at predefined times.

The appliance we built is based on a microcontroller (PIC 18F458) with an extra Ethernet interface. Via this interface the device will receive commands from a host computer. These commands allow the user to specify at which times which computer has to be turned on, sort of an alarm clock with repetitive alarms. WOLL-Y will then issue so called 'Wake-On-Lan' Magic packets at the preset times and send them to the desired computer (identified via its MAC address). To allow WOLLY to determine the time it has a battery backed up real time clock. All configuration is stored in non-volatile RAM (either EEPROM or battery backed up RAM). To allow monitoring of the health state of WOLLY, the device has a status led and will send broadcast UDP packets at preset intervals containing its basic settings.

The PC user interface is written in Qt4 and automatically finds WOLLY on the LAN (by looking for the packets WOLLY broadcasts) and then allows to read the current config and add/remove or change entries in the table.

Wolly User Interface
More detailed information, the circuit, the PC software and firmware can be found [HERE]