3D Scanner – Part 6 – Laser holders

The scanner uses line lasers directed on the object being scanned. They don’t move but they need to be positioned.

This calls for a holder that will not only attach to the frame of the scanner but will also allow some limited movement. Preferably only limited movement when manually moved.

I thought about an axle like I made for the bearings but that would only allow movement in the horizontal axis. Instead, I decided on a ball joint. The fun was actually designing and printing it. I took a number of attempts before I had it working. The 3D design software lets you take a solid and subtract that from another solid so that the two should fix perfectly. That bit wasn’t hard. The thing I forgot is that if you have a ball inside a tube (socket) and that ball is bigger than the internal diameter of the tube, there’s no way the ball is going to pop into the socket when the parts are printed separately. So, I added slits down the side of the tube to allow for the tube to open up to allow the ball to pop in.

This is the ball part. It holds the laser:

 

 

IMG_3840

 

This is the socket part. It attaches to the scanner frame:

IMG_3841

 

With the laser and threaded rod. The threaded rod is loose because the internal diameter of the socket part is just enough to form a thread when I screw the rod in but then it wobbles once in place. I’m going to clamp it with a nut on either side.

IMG_3842

 

With the ball joint together. The laser will be hanging down and the friction of the material is enough to keep it in place when positioned.

IMG_3843

 

 

3D Scanner – Part 5 – Driver board case

The driver board needed some kind of enclosure.

I split the case into 3 parts: bottom, middle and top. Once again, this is for print reasons. 3D printers don’t like overhangs that much so the split was necessary so that the print was easier.

Bottom:

IMG_3824

Middle:

IMG_3825

Top:

IMG_3826

The driver board sits in the bottom part:

IMG_3827

 

The middle provides the top part of the holes for the connections:

IMG_3828

 

The top covers the board but also has posts that stop the board from rising to much:

IMG_3830

Each layer has a screw hole and the whole case is just tall enough that a 14mm M3-0.5 screw is sufficient to keep it all together.

 

3D Scanner – Part 4 – Turntable support

After identifying the reason for the print failure, I printed a cleaner version of the turntable support. I redesigned it to take the 4 struts. The design is modular for a couple of reasons but first and foremost it’s because, if I merge the struts with the motor support, there will be so much support material it won’t be pretty.

IMG_3817

I made the gap between the motor and the sides of the structure a little wider and this meant that the motor fit a lot better.

I also printed the 4 struts and popped the bearings on.

IMG_3818

You can see that I added a t-shaped tab to the strut design and that slots into the holders on the side of the motor support.

IMG_3819

 

With those printed, I can slot them into the motor support.

IMG_3821

You notice that there is a part of the tab which is not in a slot. Again, that was for printing reasons so I printed a second half of the same motor support design but without the top plate.

IMG_3820

That slots onto the struts and provides more stability.

IMG_3822

I thought about securing both halves to each other but the struts and tabs  plus the weight of the turntable ( and whatever is being scanned ) provides enough downward pressure to keep it all together.

Next step is to print a new coupler because I redesigned it to take more screws.

 

 

3D Scanner – Part 2 – Printed Parts

With the driver board working, I need to put the turntable on the motor which means I have to build a structure around it.

Some designs print the turntable as a whole. Others print quadrants and attach them together with screws. I’m having a little problem with my prints curling. I know it’s related to the temperature of the hot end but it’s a pain to tweak when all I want to do is to print a flat circle. So, I purchased some pre-cut 7″ diameter wooden circles from Amazon (http://www.amazon.com/gp/product/B00TGFWNMI) for $10. The suggestions I’ve read talk about either painting the turntable with a rubber coating or using the non-slip rubber matting that can be cut to size. I intend to use the latter.

To build the structure, I’m working in parts and will merge some of them so they can print together.

First step, is to attach the structure to the stepper motor. The motor is a NEMA-17 size which has some specific dimension. Lots of drawings can be found online. I’m new to 3D printing so there must be some rule of thumb to apply when copying dimensions verbatim.

IMG_3799

 

It’s supposed to be 42.3mm square with a 31mm gap between the screw holes. It took me several iterations to get the screw holes to line up with the holes in my design but I managed it.

IMG_3792

Now that I have the design for the top part, I can merge that with the other parts later.

Next step is to couple the motor shaft to the turntable. The shaft is 5 mm diameter and around 21-22mm high. My first pass at the coupling is designed so that the turntable is screwed onto the coupler ( screws descending ).

IMG_3788 IMG_3791

While I didn’t allow for any slop in the coupler itself ( it’s a tight press-fit onto the shaft ), I’ve included a hole for an additional screw to clamp the coupler to the shaft. I haven’t tested this yet but I have concerns whether the coupler is too small to allow the turntable to move smoothly. I may need to extend top of the coupler in the 4 directions so that I can add more screws to attach it.

 

IMG_3801

 

The coupler on its own is not enough to support the turntable so I have to build some support struts. Other designs include a large ring bearing but my plan is for 4 struts with a skateboard bearing on each one and the turntable sits on top of those bearings.

I designed an axle for the bearing with a split down the middle to allow the bearing to pop on but not come off without additional force.

IMG_3793

This one took a few attempts to get right as the diameter of the axle has to wide enough to fit through the bearing hole and tight enough to allow the bearing to spin correctly. Also, the wider part seen on the left has to be bigger than the bearing hole to prevent the bearing coming off but, when both sides are squeezed together, it has to be able to fit through the bearing hole. Now you see why it took a few attempts. I’m not an engineer and I don’t play one on TV.

Anyhoo, once I had that to my liking, I designed a simple strut to attach it to.

IMG_3794 IMG_3795 IMG_3796

 

That was fun to do because I could use the 3D design software to take the axle I made and merge it onto a basic strut.

I took another go because I wanted to make the struts a little more aesthetically-pleasing. So, this is the final design.

IMG_3803

To give you an idea on how this is supposed to look, imagine 4 total struts supporting the turntable:

IMG_3800

 

 

 

 

3D Scanner – Part 1 – Driver Board

I’ve been looking at a Kickstarter project from the guy who is responsible for FreeLSS. This is a 3D scanner using a Raspberry Pi to control a turntable, a couple of lasers and the Raspberry Pi camera. The software takes multiple images of a 3D object as it turns on the turntable and stitches them together to make a 3D model that can be printed.

The Kickstarter project is to put together the STL files to be printed for the structure and also to provide components for the driver boards.

Unfortunately, I was too late to jump on the bandwagon but, with the designer’s intention to make the whole project open source, there’s enough detail on the website to build the driver board and make a structure to support the components.

In another “How hard can this be?” moment, I’ve decided to take up the challenge and see if I can build this.

The hardware driver board is simple. You need something to work the lasers and something to turn the turntable when signals from the Raspberry Pi are received.

The FreeLSS site has the following design:

bb

The A4988 chip is the driver for the stepper motor and the ULN2003A is a Darlington Array responsible for working the lasers.

I’ve made a couple of adjustments:

  1. The input voltage is 5V for everything. I understand that the designer has made a similar change but that’s only been available to Kickstarter backers. This is handy because the stepper motors I have take a 5V input. Full disclosure: I successfully blew up a couple of L9110S’ by pushing too much voltage through them. They can handle up to 12V but no more.
  2. I’m not powering the Raspberry Pi from this board. I’m happy with powering it from its own power supply. Eventually I can build something that will power both the driver board and the Pi.
  3. I’ve replaced the A4988 with 2 L9110S H-bridge chips. This was because I had the chips available and I didn’t see a need to buy another driver board for this. This will require me to make modifications to the turntable software so that it will work with my driver board. That’s the beauty of open source 🙂

With those changes, I put together the schematic:

DriverBoardSchematic

and, after a couple of attempts at getting the board together, I have something that will drive both the lasers and the stepper motor and not get hot because of short circuits. Here’s a video of my working board.

Cinderella Clock Project – Part 2 – The Electronics

With the clock face constructed, I turned my attention to seeing what I could do to get it moving.

I knew it was going to have to be wirelessly-controlled because there was no way we would be able to run a control cable from a hanging beam to the side of the stage without complications.

So I put a few ideas together. I knew that an Arduino-like controller would be simple to put together. I’d played around with building a Bareduino ( https://www.virtuabotix.com/product/bareduino-bare-minimum-16-mhz-arduino-kit/ ) and found it fun and, more importantly, inexpensive. I ended up buying the components in bulk on eBay. Now I’m hooked on getting electronics from China for a couple of dollars.

The number of add-ons that are available for the Arduino market is impressive. I knew that it was possible to get wireless transceivers so I bought some nRF24L01+ transceivers from Amazon (http://www.amazon.com/gp/product/B00E594ZX0). These have good Arduino library support. There are a couple of libraries on GitHub and I found that the maniacbug version worked for me (http://maniacbug.github.io/RF24/). Also, I found his blog entry “Getting Started with nRF24L01+” really useful, particularly the pin connections from the ATmega328PU to the transceiver itself. The blog is at http://maniacbug.wordpress.com/2011/11/02/getting-started-rf24/.

I called my project a Nerduino due to the anticipated comments from my “friends”.

Initially, I breadboarded the circuits to show that I could send and receive

The wrinkle in building the circuit is that the transceiver is *powered* using 3.3v but the ATmega32PU is 5v-powered. This meant that I needed to build a voltage regulator to drop a 5v input down to 3.3v just to power it. That adds a few more components.

A LM317T is useful for building the regulator because it is adjustable based on the resistors that are used in the circuit. More information can be found at http://www.reuk.co.uk/Using-The-LM317T-To-Regulate-Voltage.htm but the schematic required to build a 5.5v to 3.3v regulator is:

IMG_3565

At the time I built the circuit, I didn’t have a 240 ohm resistor so I had to use a variable resistor instead but I managed to get the conversion to 3.3v

IMG_3568

 

 

I soldered together one Nerduino with the voltage regulator and tested again

After the successful test, I soldered another Nerduino and added a control panel

I added the servo output pins to one of the Nerduinos so that it became the receiver

 

The servo motor was running fast and unless I added gearing to the clock hands themselves, I needed to add a speed control to the control panel and slow the motor down from there.

The circuits needed to be able to run independently of a wall power socket so I wired up a USB cable to act as a power cable from a phone charger battery that I got from work.

Once the circuitry was working, I assembled it into the clock face with the help of a friend who was there to stop me from throwing the whole thing into the trash the moment we stumbled across minor issues.

I made sure that the clock could be operated from the sound desk at the back of the theatre (i’m standing next to the camera operator).

For those interested, the Arduino sketches for the transmitter and receiver are at:

http://projects.ravelox.com/files/ClockTransmitter.ino

http://projects.ravelox.com/files/ClockReceiver.ino

 

Cinderella Clock Project – Part 1- The Face

Let’s put a few things into perspective about my level of competence for things like this. I’m not presenting myself as an expert in this. I’m showing what I did. I’m not an electronics genius by any means. I have to look everything up so I couldn’t tell you the value of a resistor or put together a simple blinking circuit. I also don’t have a workshop bedecked with tools. I frustrate the heck out of my father because I don’t label all the boxes I put my screws in and I don’t have a place for all my flathead screwdrivers in ascending size. Yes, I’m that guy.

Electronics came to me at a late age. I had a kit when I was a kid and I would get onto my porch roof to put up the coat hanger antenna I made for my crystal radio. I do kind of know which end of a soldering iron to blow into but my technique leaves a lot to be desired.

I’m a member of the Mills High School Drama Guild which is run by parents of students who take part in the school Fall and Spring productions.  In particular, I help to build the sets. This year’s Spring production was Rodgers and Hammerstein’s version of Cinderella.

The Director had the following design in mind and, in particular, the all-important clock:

IMG_3445IMG_3446

 

At the time, there wasn’t much said about whether the clock should strike 12 but I looked at the design and thought “That’s seems easy”.

So, I started this project. I bought some corrugated plastic panels from Lowes to work out sizing. I tried two approaches: Making the clock face from a single panel ( approximately 3ft diameter ) and also quadrants from 4 panels making it a 5ft diameter face. Ultimately, the bigger size was better because the clock was going to be a way from the audience. I also cut some hands.

IMG_3531IMG_3532

 

I was originally intending for the exposed gears to mesh and to move when the hands moved. That was a stretch goal that was dropped early on because printing gears on paper and cutting around them into a strong enough material with enough precision to mesh them together so they move isn’t as easy as it sounds if you just have a craft knife. This is where a table-mounted scroll saw would have been useful. I did try with a Dremel but it’s not precise enough.

If you’ve never drawn a gear before, I strongly suggest http://www.inkscape.org. It’s a freeware vector graphics program and there are a lot of tutorials on how to use it. I found this http://www.wikihow.com/Draw-Gears-in-Inkscape and it came in really handy. I ended up drawing 2 styles of gear, printing it on regular paper and sticking the paper to the plastic to cut around. Once I cut one gear, I could use that as a template for another. Also, because the clock was going to be far away from the audience, the precision of the cutting wasn’t a high priority but I still tried my best to get them looking OK.

IMG_3601

 

I ordered some Roman numerals from a clock kit on Amazon (http://www.amazon.com/gp/product/B00LL1IEJ6/). They are self-adhesive but I should have used more glue because the 12 fell off just before opening night and broke into a few pieces.

I used spray paint for plastic to paint the pieces and we stuck the gears to the clock using double-sided tape.

IMG_3622

 

Some things that I would do better on the actual face:

Quadrants is a good idea when you’re carrying the pieces around but when you assemble them together, you MUST make sure that the seam is well supported and strengthened. The clock face had a tendency to fold on the seams and this made it difficult to stand up. We added some pieces of wood to the back.

This gave the clock some weight which was OK because it was hanging from a beam on set. It also gave us something to attach the circuitry, motor and battery to.

IMG_3645

IMG_3646

I hadn’t tested the servo motor properly to work out how to attach the hands. The hour hand was stuck at 12 so the servo only needed to move the minute hand. The minute hand had a tendency to slip on the axle even though it was secure on the screw, the screw would unwind itself it the hand got stuck. We resorted to gluing the screw into the servo motor coupling and also the hand to the screw.

The weight of the minute hand was unbalanced which meant the top of it would flop forward. I had reinforced the hand with wooden skewers to prevent it folding but there was still a noticeable lean. This didn’t matter so much for a couple of reasons. Firstly, because the audience was only looking at the clock from the front, they wouldn’t see the lean. Secondly, it meant that the minute hand had clearance to move and not catch any of the numerals or the hour hand.

Finally, the face design is more simple than the sketch. I didn’t have something to use to make fine circular lines that I could use to paint minute divisions. Painting circles at a large scale requires some finesse but I didn’t have any.

Design-wise, I was pretty pleased with it. I like the blue and gold together but I’m not sure the gold showed up when the stage lights were on it.

 

 

Etch-a-sketch

Thanks to a comment from one of my Facebook “friends”, who suggested I etch the name of each host name into the plastic plate on my Pi rack, I found a project for a Raspberry Pi controlled CNC laser etcher.

The details are at http://funofdiy.blogspot.co.uk/2013/10/a-raspberry-pi-controlled-mini-laser.html?m=1.

Someone tweaked the project and put together a video showing how his contraption works:

Thanks to Bryan, I got a couple of old DVD-RW drives and took them apart for the stepper motors.

IMG_2371.JPG

The project suggests that the laser diodes in the DVD drives can be salvaged but the manufacturers of *these* drives saw fit to encase them in concrete and diamond dust so there’s no way to get them out cleanly.

What’s next is to wait for my eBay purchases to show up and I can start on the stepper motor drivers. I know I can buy them fully-assembled but there’s no fun in just clipping it all together, is there?