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.