Dec 31, 2013

Profiling DC motors

For the second design of the LEGO test machine #2, I stopped using rotary encoders an switched to ACS712 lowcurrent sensors.

I initially hooked them to a multimeter and an Arduino to tweak the 2 potentiometers of the sensors. Following some of the steps from this MobileAPES post, I've set the voltage (Vref potentiometer) to 2.5v without any problems but the gain (GAIN potentiometer) was initially tricky. Back when I was using the rotary encoders, I was running the motors as slow as possible (speed of 65-85) in order to not stress the parts. At those speed the current fluctuations are too large and I had to find out what is the optimal low speed of the motors.
I decided to log the data out to better see what was going on. The initial test was to log the current sensor values every 1ms while raising the motor speed from 64 to 210 by increment of 5 every 20ms. 

Yellow=speed / Blue=running freely / Red=stalled (prevented from turning)

Clearly the values I get from the motor is erratic when the speed is below ~110. So I profiled the motor again from 130 to 230.

Yellow=speed / Blue=running freely / Red=stalled (prevented from turning)

Now I know the how slow the motors can go and how to detect a stall using the current sensor. This also told me how long the motor takes to ramp up to speed when initially set at a speed of 130.

Here's the diagram of the machine made with Fritzing:

I don't have the Adafruit motor shield [fritzing] part so I used the Arduino motor shield rev3 instead. The missing details are the following: The servo is connected on SER0 (pin 9), the push-down motor is connected on M2 and the lift-arm motor is connected to M3.

The code and the Fritzing diagram for this new version are available on git.

Oct 23, 2013

Once more into the [legotest] breach

Here's a video update about the progress of the LEGOtest machine #2 (#legotest)

Here is some extra info and progress starting with something I forgot to mention in the video: the shorter lever beam.

The lever was too long and, out of sheer luck, one of the shorter beams was the exact length needed. After that, I finally strengthened the base by removing the last LEGO legs and installing the Makeblock leg I showed in the video.

Once that was done it just made sense to attach the Arduino to the front leg as you can see in this picture of the whole machine:

The Makeblock parts are provided by The Little British Robot Company

As for the double action on the new motor; it both assembles the LEGO bricks and helps disassemble them.

The two movements are difficult to perform with a single motor since assembling needs a lot of strength while disassembling is all about subtlety. The part was first designed using LEGO Technics and it took 2-3 iterations before I found a way to achieve the two movements. To better understand the motion, check out the video.

Sep 15, 2013

Unboxing and Doodle cool

The parts for LEGO Test Machine #2 have made it safely across the Atlantic.

Makeblock parts from The Little British Robot Company

You can see me open the boxes and give some initial thoughts and ideas in this video:

When opening the shipping box, I've discovered a DoodleBot which the guys from TLBRC added as a gift. It's robot that can hold a pen and use it to either draw or write. I couldn’t resist so I built it right away and tested it by trying to make it write “Thanks TLBRC”. It 'kind of' looked good on the first try but clearly there is something wrong with one of the servos or sensor. I'm pretty sure that I didn't mount the rotation sensors properly so I'll have a look at it.

Seriously, look at this little thing. How can I stay made at it?

Still it's a really cool little robot base. The Arduino board that comes with the kit contains a ton of features and most are not used by the Doodle Bot. It even has a header to plug a Bluetooth device. Needless to say that I'll most likely reuse it for a future project.

If you ever get your hand on this kit, here are a couple of tips to make it work with the current Arduino IDE. By following the kit instructions you'll get to the right drivers and select the proper board. But to open and build the code in the IDE, you can do this:
  1. Open the Doodle_Bot_Text_Demo.pde with the Arduino IDE.
  2. Click OK when prompt about creating a ''Doodle_Bot_Test_Demo” folder.\
  3. (In a file explorer) Manually copy all the other demo files into this new folder
  4. (In Arduino IDE) Manually 'Add' all those files into the project
  5. In the Alphabet and Doodle_Bot_Text_Demo files, rename all the letters functions by adding the prefix 'l'. (e.g. F() becomes lF())

That's it, you should be ready to build and upload the code to the DoodleBot.

If you have any questions let me know.

Sep 6, 2013

Inside the box

So close I can almost touch it. Parts for the LEGO Test Machine #2 are coming and I feel like a kid before Christmas. Here's some pictures taken by the guys at The LittleBritish Robot Company while boxing all the goodies.

WhoooOOOoooo motors

Looking at the content I got inspired to create a new design focus around the use of the Makeblock wheels.

The top part (1) would go back and forth to assemble the brick by compressing them together. Disassembling the bricks would be done by a claw system (2) able to twist off the bottom brick. Finally the bottom plateau (3) would go up and down using an off-centred wheel, helping in the process of assembling or releasing the parts. It's just a rough idea but feel free to leave your thoughts and suggestions.

Now, how can I make time go faster? I could go to sleep until the package arrive. Naaaaaah I'll probably wait in front of the door like Scott Pilgrim.

You can see all the 'boxing' pictures on my G+ album

Aug 28, 2013

When in doubt... TLBRC

Oh yeah, this project is rolling again, thanks to The Little British Robot Company (TLBRC).

Like many modern relationships, we met on Twitter. They followed me, I followed them. I complimented their product, they answered (knowledge of social media is a good sign). Finally, I proposed a partnership and they said yes. WooooOOOOooooo!!!!!

[pause to reflect on how cool the Internet era is and how lucky I am to be part of it]

Anyway, I will redesign the second set of LEGO testing machines using almost only Makeblock parts (distributed by TLBRC) and TLBRC parts.

To get better results than the first LEGO Test Machine, certain features and constraints will be added to this new project:
  • Gather more than one control point (e.g. adding voltage, pressure, time, ...)
  • Use a rotation motion to remove the LEGO bricks.
  • Keep the test speed at 10 seconds per iteration to prevent heat from friction.
  • Perform many tests. Hopefully, many tests at the same time.
  • Test bricks from different eras.
  • Once the LEGO bricks have fallen the first time, rotate them 180 degrees to continue testing until they fail again.
  • Have a way to query the test status while it's running.
Also, instead of machining everything myself, I will be using the following:
  • Makeblock
  • TLBRC parts
  • LEGO parts
  • Arduino and other electronic components
  • TLBRC custom milled parts (If needed)

Let's get this show on the road...

Jul 9, 2013

Endor Observation Post

The story of a kids playhouse

Some years ago, after the pool was wrecked by the weight of a record snow year, we dismantled a part of the deck. Suffering from the common makers sickness that prevents you from throwing away good material, I stored all that wood away. Here's the pile after we got it back out and inventoried what we had to work with:

The only new wood was the 4 columns and the cross braces at the base. To ensure (completely overkill) stability I went for a design where all the columns are leaning inward.

For extra QA and on the spot design-validation, my dad was part of the build. By working with him him when I was a kid, I learned to build and to problem solve. I always loved building things with him.

Here is the playhouse partway during construction:

Since we finished the playhouse some days ago, the kids have played in it every day. Like a moths to a flame all the kids in the street were also sucked into the playhouse. It is one happy place.

Now let's renovate our old bathroom...

May 27, 2013

LEGO Wear Test #2 - Design

I have the basic design  for the second LEGO wear test machine.  Here is a prototype made with Castilene plastic:

The result will be a long rig that will hold all 10 pairs of LEGO bricks to be tested simultaneously.  The parts will be made of machined metal fitting the brick shape as precisely as possible.  One thing that I learned from the first test is that it takes a lot of strength to hold those bricks, which is why I'm overkilling this one.

The bottom part is composed of two halves enabling the rig to either hold tight or release the piece completely.

Following comments that many viewers/readers have left, here are the new requirements:
  • Use a rotation motion to remove the LEGO bricks.
  • Keep the test speed at 10 seconds per iteration to prevent heat from friction.
  • Test 10 sets at the same time.
  • Test bricks from different eras.
  • Once the LEGO bricks have fallen the first time, rotate them 180 degrees to continue testing until it fails again.
  • Run the machine in the shed to keep the noise down.
  • Have a way to query the test status while it's running.
Not following comments that some viewers/readers have left:
  • This will not solve global warming
  • I will keep playing with LEGO bricks
  • My accent should not improve before the next test
One thing I'm leaving out is to have many control points and this test will [again] only count the iterations.  I initially wanted to monitor forces and current but it makes no sense with this simultaneous test. Next time...

For the test I've done my best to select bricks from 3 eras.  The new ones (3 pairs) were the easiest to find while the 2 pairs from the mid 70s posed a challenge.  It started with one pair I took from a set  bought at the flea market.  It was the set #370 from the mid 70s.  Looking at those two white bricks I noticed that they had a unique casting mark on one side.  After a lot of digging, I finally found two bricks with similar marks.  In a very non-scientific moment I declared that this unique feature probably means that they're from the same era.  Shoot me.

Now that the 10 pairs of bricks have been selected they are set aside until the test and other bricks are used during the rig's development.  Also, in a wave of madness, I might even run this new test twice with the side effect that I'm slowly destroying all the 2x3 bricks in the house.

May 2, 2013

Test design & LiveTankGame

Well, while I'm working on the design of the new LEGO test rig (see test1), I'm getting back into the tank project.  My generic goal for this long term project is to design a table top robotic game that will be a cross between a live card game and robotics.  So far I will have two tank platforms to test all the robotic modules so that I can prototype the gameplay based around those features.

TA1 (aka: whydontyouworkyou...)

You may ask yourself “Where the heck are you going with this?”, and that is a good question since I don't have a final answer yet.   You see, I like building stuff and I like cool-unusual-geeky-things that I can't afford so, many times, if I want something I have a tendency to build it.  My latest crazy idea came during the last Christmas vacation when my wife and I started playing a live card game called Android Netrunner.  No it has nothing to do with mobile phones.

The box

I found this game so cool that I had this crazy idea to reinvent the same level of gameplay using robots instead of cards. Why? Well... why not? Sooooo this is going to take a long time and I have to start by testing what kind of electronic interactions/capabilities the tanks can have. Once I have enough working features I will design the basic gameplay around them and build the two game tanks. Like I said... long term and so geeky that it technically falls into the nerd realm.

Here is a short update: The mobility base is composed of a robotic tank kit and a homemade DC motor driver. The motor driver PCB still needs a bit of redesign but it's functional for now and that... is good enough. Here I am building one of the two tank kits:

For now, the tank is controlled using an Android phone via bluetooth and I'm ready to start testing the other features like the laser, IR proximity sensors, light sensors, Ultrasonic range finder, etc...

Starting now, I will also tweet the updates using the hashtag #livetankgame.  

Apr 23, 2013

3 Great Rockets Moments

Watching the SpaceX March 7th (2013) Grasshopper test, I realized that this was one of the best rocket video moments I had seen.  Now, the minimum I could do was to list my [new] top 3.  This list is not chosen based on the historical importance of the event but on the emotional impact of seeing a rocketry  rare and amazing moment.

Apollo 11 landing sequence
This one may sound like an easy choice but, having read so much about the Apollo program and understanding the level of complexity of the events leading to a moon landing, this video makes me sit at the edge of my seat every time.  Especially with the added stress of the 1201-02 alarm that almost forced them to abort the landing. (info about the 1201 alarm)

Space Shuttle SRB Flight
This is a long one to watch but it's worth it. The camera is attached to the top of one of the Space Shuttle Solid Rocket Boosters (SRB).  The strange feeling of seeing the ground 'fall' away at this ridiculous speed is hard to beat.  After the noisy first part of the takeoff, there is a change in the sound while the rocket leaves the dense atmosphere followed by the silence after the separation.  But the most awesome part is when the booster enters back into the dense air with the eerie moaning-sound of the empty cylinder growing into a full roar while the rocket is slowing down to terminal velocity.

SpaceX Grasshopper test
This video just climbed into my top three list for the simple reason that it is filmed from the air.  This was done probably by using a sort of radio controlled camera platform (e.g. Quad-copter).  It is a strange feeling, to virtually be there and float next to this monster while it just stands in mid-air.  You expect a rocket to either do nothing on the pad or go full throttle but to see this delicate precision, now that is crazy cool.  SpaceX made it look like they do this every day... but wait.. they ARE doing this every day.  Go SpaceX!

Apr 19, 2013

LEGO all worn out

As suggested by Christopher Gaul, I took some macro(ish) pictures of the wear patterns on both the studs of the bottom LEGO brick and the inside walls and tubes of the top LEGO brick.

Clear marks are left on the sides of the studs (bottom LEGO)

The small ridges on the inside walls (top LEGO) are visibly worn down.  There is also damage to the tubes and even the walls themselves.

Here are the 2 pictures in full resolution (sorry for the low quality) without the notes:

CSI case #66531

Mar 2, 2013

Adventure Time Sword

My son was invited to the birthday party of one of his friend.  His friend mentioned to him that he liked   the Adventure Time cartoon and would like to have the sword.  My son then told him that we could probably make it because we are always building stuff.

We looked it up on the web and since it's a simple shape I decided to give it a shot.  Using the hard wood from an old shelf we took down, I drew the rough dimensions on it

I then cut the rough shape using a skill saw and a jig saw

The guard was build with 2 pieces with grooves screwed and glued on both sides

This was the fun part where I sculpted all the notches and scratches followed by some sanding

It was then time for primer and painting.  The handle was done by hand using acrylic paint

This the final product after gold metallic paint and a clear acrylic coat.  The jewel was made with Super Sculpey and also painted using acrylic paint.

Action shot with my son

Feb 28, 2013

LEGO's magic number is 37,112

Have you ever asked yourself this question: "How many times can I assemble LEGO bricks before they wear out?"

Well... probably never but I did (on LEGO SE).  The story would end there if didn't had the knack to build a machine to test it.  Here it is:

The first version was using a metal tube attaching the top servo to the LEGO brick.  It was too flimsy and died during initial testing.  So I took an old CPU heat sink...

And using my trusty angle cutter, I made this new arm:

A successful test proved that the LEGO was no match for this chunk of aluminium.  I then made an infra-red proximity sensor to detect if the presence of the LEGO and rigged the whole thing to an Arduino.  This was shot before the test started:

and this was shot about two thirds into the testing that lasted a whopping 10 days!!!

So here are the 2 dead LEGO bricks after 10 days and 37,112 assembling and disassembling.

Don't try this at home. It's long, noisy and cruel to LEGO bricks.

In the end, both pieces failed at 50%. The studs of the bottom brick and the inside walls of the top brick are visibly worn. Both bricks can still hold on (not strongly) to normal bricks but, when put together, they can't hold. In a way, you could say that they are still in working conditions as long as they don't meet again.

Here are some more answers:

This story was covered in the follow media:

Jan 21, 2013

DIY desk

This is our homemade studio desk.

It's a large U-shaped desk built of plywood that is laminated with a nice wood layer. The desk (including an integrated back-shelf) is built onto the walls and has no front legs with the exception of the two end corners. This gives us more freedom of movement. We stained the desk a dark brown color to match the wood floor.

The desk also includes built-in electrical sockets, place for the printer and paper and a ventilation slit over the heater.

Jan 6, 2013

RoboTank #3 / motor driver version 2

Here is the second version of the programmable motor driver.

It uses a L239D chip to drive two DC motors and modulate their speed individually.   The board can be controlled with only two input wires.  This is made possible through an interface program loaded in the ATMEGA238 (same as Arduino UNO) onboard chip.  The interface chip and the driver chip are running on two separate power circuits and both are in sockets and can be easily replaced or, in the case of the ATMEGA238 chip, reprogrammed.

Using the ATMEGA238 chip makes this motor driver very versatile since 10 pins (5 digital and 5 analog) are still available for inputs/outputs.  This driver can then be reprogrammed and customized rapidly.  Here is the etching pattern I made using ExpressPCB:

Finally here's the part list:

  • 1x - Small copper clad laminate board
  • 1x - 16 pins socket
  • 1x - 28 pins socket
  • 2x - 0.1uf capacitor
  • 1x - 16MHz crystal
  • 2x - 6 pins female headers
  • 2x - PNP transistors
  • 2x - Inputs Screw Terminal 3.5mm (2 pins)
  • 2x - Inputs Screw Terminal 5mm (3 pins)
  • 1x - L293D (or SN754410)
  • 1x - ATMEGA238P-PU
  • Some wires
  • (optional) 1x - Heatsink for the L293D
I'll put up a Instructables ASAP with the PCB layout file.  Until then I can send it to you if you contact me directly.

Jan 4, 2013

RoboTank #2 / homemade PCB

This was my first attempt at making a PCB at home.  I follow this awesome tutorial explaining how to make PCB using a laser printer.  The first step was to design the board.  For this I used ExpressPCB free software.  Then I printed the design on a magazine paper.

The next step (which took me 3 tries) was to transfer the design to the copper plate using an iron.  This was a big learning experience about the necessary spacing between the traces and the amount of time to apply the iron.  In the end I got something that was good enough to go to the next step.

As suggested, I corrected the mistakes using a Sharpie pen.  After a Ferric Chloride bath here is the result:

I used a sponge to rub the surface during the etching.  Apparently the Sharpie fix is not meant to survive that kind of abuse.  This is still fixable.  The final step was to drill the through holes and do the assembly.