Saturday, October 25, 2014

TRENDnet TEG-S50G Gigabit Ethernet Switch Physical Teardown

A project that I'm working on needs an small embedded Gigabit Ethernet switch, so I decided to tear down the consumer one that I own to see what the board looks like inside. I wasn't able to find many pictures of what's on the inside of these little switches online.

This is the TRENDnet TEG-S50G (Amazon, Newegg) that I actually purchased refurbished (note the RB- prefix on the part number) from TigerDirect earlier this year for $10 after rebate. It is the V3.0R version based on the label on the bottom.




It has a nice metal chassis with 5 RJ-45 ports on the back and a 5.5mm OD barrel jack for power.


The supply that came with it is for 5V, 1A.


It's just two flathead Philips screws to get it open, where you can see that the board fills the enclosure and is held down by two panhead Philips screws.



Here is the board removed from the enclosure. Under the heat sink is the chip that runs the whole show.



Lastly, here are the board dimensions, 110mm x 65mm. The tallest component is the heat sink, which sticks up 15.3mm above the top of the board. The board thickness is 1.67mm. The two mounting holes are 100mm apart, and at 3.2mm diameter appear to be clearance holes for M3 fasteners.

Thursday, October 9, 2014

Bed Leveling on the Mini Kossel

After a month of the assembled printer sitting around, I fired it up today. The good news is that it turned on with no smoke, but the bad news is that I had several embarrassing problems getting the bed leveled.

The power-on process was pretty straightforward -- plug in DC power, and flick the switch on the power supply. The LCD came and I plugged in the USB cable to my computer. I needed the driver located here for the control board to come up as a serial port on my Windows 7 computer.

I downloaded the ready-to-run Pronterface software for Windows here. After some trial and error, I determined that the control board likes to talk at 250000bps. I set about doing the bed leveling procedure described on the kit's build guide here, which involved the creation of a few custom command buttons on the Pronterface GUI.

The first time I ran the motors, they went in the wrong direction (down instead of up toward the end-stops). I was prepared for this with my finger on the power switch to stop them. I was a little puzzled because I was pretty sure I had copied the motor connector orientation from the guide pictures, but I went ahead and swapped them anyway.

The next time I tried the homing command, the carriages went up and hit the end-stops as expected. The next step was to send the printhead down to a position just above the glass bed for the bed leveling process. The button sent the head crashing into the glass, which sounded bad as the timing belt slipped, but didn't seem to cause any damage. Again I was puzzled, since the guide stated that the head should stop several millimeters short of the glass.

I thought that maybe I didn't have the end-stops high enough, so I clipped the center lead and bent the two connected tabs to allow the end-stop holder to go almost flush to the top triangle.

End-stops now all the way up.

Tried it again, and again it crashed. At this point I started writing up an email to Ultibots support, but fortunately before I hit send, I went and checked the build guide pictures again. Oops, I had the carriages mounted upside-down. This puts the arms and the printhead significantly lower, which explained the crashing. With a little bit of work I was able to take off the top triangle, disconnect the carbon fiber arms, and flip all the carriages.

Now I was ready again! I powered up and ran the homing command. Unfortunately I had gotten a little too comfortable with the system and wasn't ready to kill the power, and the motors unexpectedly went down and into the glass bed. I killed the power, but it was too late, and this time the beefy stepper motors had split a carbon fiber rod and broken one of the printed rod end mounts on a carriage. I would have taken some pictures but I was sulking too hard.

After some cooling down, I was able to patch everything back up with some 5-minute gel epoxy (gotten a lot of mileage out of this dollar store purchase). Good as new!

The motors had gone the wrong way because in flipping the carriages, they were attached to the other side of the timing belt. So I flipped the connectors back the way they originally were....

Once again, I powered up and ran the homing command. This time the carriages went the right direction, but instead of hearing the click of the end-stop microswitches, I head the awful sound of timing belts slipping. The new orientation of the carriages caused the end-stop bracket to collide with the V-slot rollers, which I had to flip around also.

One last time, I powered up and ran the homing command. This time it all worked and now I could actually start the bed leveling. The X home command took the print head over to one corner with the extruder nozzle a little over 16mm above the bed. Following the instructions, I sent the command:

M666 X-16.00 Y-0.00 Z-0.00

This command appears to adjust the offsets for each axis, but seemed to be geared toward conventional printers where there are motors that correspond directly to X, Y, and Z movement.

After top homing and X homing again, the head was still pretty far from the bed, which was the first indication that the bed leveling process isn't really tailored for the complex forward kinematics of a delta printer.

Running through the bed leveling process (adjusting each offset at the X, Y, and Z homing positions to get a piece of paper to barely fit between the extruder nozzle and the bed), I ended up with the following offsets:

M666 X-21.95 Y-19.58 Z-17.38

Paper-height gap between the extruder nozzle and the glass bed. If the print head looks like it is slightly off of parallel to the bed, that's because it is.

This seemed strange because the end-stop switches were all at pretty much the same heights. It was clear that these offsets were going to result in crashing into the bed if I used them. This was going to be an iterative process, at least with the way that the software currently works.

Taking the smallest magnitude offset from the prior process, I decided to start the iterative process with fixed offsets of:

M666 X-17.00 Y-17.00 Z-17.00

With a little bit of guesswork and a lot of moving around between the X, Y, and Z homing positions, I ended up with offsets of:

M666 X-17.70 Y-17.20 Z-17.90

Unfortunately I couldn't find offsets that resulted in a consistent gap, so I settled for ones that didn't drag the extruder nozzle against the bed anywhere. This means that my printer is imperfect in a way that fixed actuator offsets can't fix, which is probably in inconsistent arm length or rod end positions. Fancy parallel robots have ways to calibrate this out empirically. Maybe when I add force-sensitive resistors to the bed for auto-leveling I can try to tackle this.

Anyway, I ended up with a top home position that is well below the end-stops, so later on if I recompile the firmware I can squeeze out a little more height on my build volume. I briefly tested the extruder motor (had to turn on cold extrusion with the M302 command) and the extruder heater/thermistor, so hopefully the next one of these will actually have a printed part!

Carriages and end-stops are now flipped, home position is well below the switch.

Sunday, September 7, 2014

Mini Kossel V-Slot 3D Printer Kit

A couple months ago, I purchased the Mini Kossel V-Slot 3D Printer kit from UltiBots. It's a "delta" style printer based on the Rostock and Kossel designs from the RepRap community, originally designed by Johann C. Rocholl. I went with the orange printed parts and shelled out for the black-anodized aluminum extrusions. The whole kit wasn't cheap, but about the best I could do for this style of printer (parallel robots are cool).

It arrived a week later and I started putting together the frame and linear mechanisms, which turned out to be the easy bits. The following pictures are by no means a step-by-step (see the official instructions), but rather an incomplete record of my assembly that may or may not be useful to myself and others in the future. There is also a super-secret Q&A document that you get a link to with the kit.

The RepRap project is all about self-replicating machines, so many of the parts are themselves 3D-printed. Here are all the printed parts, in awesome orange ABS. The support material and some of the holes need to be cleaned out by hand (with a knife and drill bits).

Assembling the three carriages.

Assembling the wheels that allow the carriages to slide smoothly up and down the aluminum extrusion. Each wheel is a plastic double-V profile with bearings pressed into either side.

Assembled carriage in the top left. Here are the stepper motors that drive the linear mechanisms. Each one gets a sprocket set-screwed to the shaft that meshes with a toothed belt.

The motors then get fastened to the corner base pieces.

All three assembled corner base pieces with motors.

Next, the long aluminum extrusions get fastened to the corner pieces (check out that sweet black anodization, mmm). Note that I actually have the black plastic cable guides inserted in the wrong face of the extrusion. They should be in the face closest to the motor.

The short extrusions that form the base go on next. I kept all the fasteners loose so that they'd find their happy place when the three corners are put together. Need more bench space!

All together now. It was actually something of a process to get all these together (all three corners have to slide in simultaneously). Note that the tabs to support the glass bed are now present, as well as some T-nuts for the LCD housing and for the control board mounting (unseen). It was a little dicey cranking down on the M5 fasteners that hold the extrusions together -- the corner fittings are prone to splitting when overtightened.

The electronics for this kit (and I gather for many of the RepRap machines) is a board called RAMPS (RepRap Arduino Mega Pololu Shield). This shield has sockets for Pololu stepper drivers (mine appear to be clones) for the actuators, power electronics for the heaters/fans, and sensor inputs, among other things I'm not familiar with yet. The bottom board is an Arduino Mega derivative called the Taurino.
I forgot to take pictures here, so you'll have to take me at my word that I fastened the electronics and a fan to the electronics bracket and built the LCD housing (which was a little painful since the beta instructions did not cover this at the time).

Base with carriages and LCD housing installed. Even the dial and pushbutton on the housing are 3D-printed.
At this point I had gone past what the beta instructions had covered, and I'd forgotten about the super-secret Q&A document, so I thought I was stuck on what I found to be the harder parts (the hot end and extruder assembly as well as the linkages). Also I got busy with other things and so took a month break and just resumed work a couple days ago. Turns out all the info I needed was in the Q&A (thank you UltiBots support for the quick turnaround on my email).

Here is the partially-assembled work platform. Seating the nuts for the nut traps is a bit of a pain. There is a neat mechanism inside to keep pressure on the filament as it passes by the extruder motor, which is the bit with the red heat sink. The hot end (black PTFE with brass tip) actually has to come off for assembly.
I forgot to take pictures of the hot end assembly, but this video was extremely useful:

The kit I have actually has the option of a fancier heater (which I used) in addition to the resistor, as well as some muffler putty to try to cement everything in place with decent thermal contact. I found that this was a really messy and difficult process, and I'm not sure how great of thermal contact I ended up with, both on the heater and the thermistor.

The next thing was to tap the carbon fiber rods to accept the M4 studs (actually long set screws) to fasten the Traxxas 5347 rod ends to. A lot of these delta printers actually use R/C car rod ends for the linkages, which is a cool repurposing. (I also own a Traxxas R/C car.)

The kit includes a 3D-printed jig for holding the rods, both for ease of tapping and to prevent the rods from splitting. I don't have metric drill bits so I used 15/64" and 5/32" bits to substitute for 6mm and 4mm respectively.

The tapping jig, with thumbscrews for tightening.
I found this to be the worst part of the assembly process. Maybe I have crappy taps or maybe I'm just not very good at this, but I ended up just boring out the centers of most of the rods to 4mm as opposed to tapping to M4. Also in the process I generated quite a bit of carbon fiber dust which I think I had to be careful with. To attach the rod ends, I ended up just screwing them in a little further than the tap-bored holes, which split the rods but still seemed to work. I also pre-threaded the plastic rod ends (which don't start with any threads in them) so that the set screws wouldn't thread and split further in the rod than I wanted them to. This probably doesn't make a whole lot of sense unless you're actually doing it.

The finished product, 6 rods with rod ends.

The most satisfying part of the assembly, popping the ball into the rod ends.

The parallel robot is complete! I skipped over the end stops (limit switches) on the linear mechanisms, as well as the top triangle and belt assembly. I think the springs between the rods are to eliminate backlash in the mechanism.
Just a few more little things remain.

Two fans need to be installed and spliced into extension wires. This is the fan for the extruder motor. It actually needs to be further spliced with the electronics motor (this is kind of janky) because there is only one always-on fan connector on the RAMPS board.

I turned the frame upside-down to work on the wiring. It's still a big mess and needs some clean-up.

The power supply got wired up (underneath the 3D-printed cover) and the Kapton film heater got affixed to the circular glass build plate.

Here are the bits to hold a spool of filament on the top of the frame and let it freely rotate. My work surface isn't really this nasty, it's just the lighting....
And that's it! Here are some glamour shots of the mechanically complete printer.











This was actually a lot more work than I anticipated when I purchased the kit. I estimate that it was a solid 20 hours of work. Things could have gone a lot smoother if the instructions were all collected in one place. The personal support from UltiBots is great, but the kit needs more work on the instructions for 3D printing newbies like me (especially since it looks now to be out of beta status).

The next step is to actually fire it up and do the system checks and calibration. After that, I should be able to actually print. But that looks to be pretty involved so I'll leave it for another day.