Author:


Taking apart the CQ6123B Lathe – Part 1

Posted by on July 12, 2013

30030929

A few weeks ago I finally acquired my first metal lathe. It’s an import (Model: CQ6123B-750) from all the small Chinese bench lathes, this is probably one of the best, aside from the newer series with the spindle gearbox.

Before buying this lathe though I had looked into the available mini-lathes, they seemed nice but they didn’t meet all of my requirements, for instance a Unimat looks like a toy compared to this lathe. Don’t get me wrong, a well tuned mini-lathe can be a very useful piece of equipment, I just required a bigger distance between centers and some extra throw.

That said, lots of work can be accomplished with these import lathes… As long as you take them apart, clean them up, lube, reassemble and finish them with a nice calibration. There’s even some repainting involved, But it’s well worth it!

 

Getting started

Well, you’d think since it’s a new lathe you’d just set it up and go at it, but no. It’s nothing like it. Forget about the inspection sheet they give you, it’s a massive lie.

To begin with, familiarize yourself with the exploded views on the manual, you’ll need them because you’ll have to take the entire thing apart and reassemble it; that’s right.

The only portion I left in place was the headstock, my reasoning was that it should be aligned from factory and I didn’t want to go through the trouble of re-aligning it (plus I don’t currently own some of the tools required to do it properly).

Another good reason to take it apart is to make it easier to move and also to put less stress on the bed while doing so. But primarily because as-is it’s not really usable, or better put… You won’t get the most out of it and you may get into premature wear on several parts due to reasons I shall now explain.

You see, some parts are not even lubricated. Most of the lathe is covered in what’s called “shipping oil” which is most likely used, filtered motor oil. Similarly to cheap chainsaw bar oil (but in that case they may add thickeners, not always but quite often they do)

Here’s the problem with the shipping oil, as it dries up it ceases to provide lubrication, instead it provides protection. Well, that’s the intended goal, but it’s a problem for us because if we don’t fully remove it and oil everything up, we risk extreme wear of parts in a very short period of time.

One of the biggest shockers for me was finding no grease on the belt tensioner ball bearings, none whatsoever! — There have been instances of people complaining about “whining noises coming from the drive box” and it turns out it was the tensioner seizing up.

Another massive lack of lubrication was spotted on the apron, most of the gears were bone dry.

The lubrication ports provided are too small for most grease guns, they’re actually meant for thin machine oil but on an open gear system (that is, with no sump) you want grease on those gears, not thin oil. Unless they’re exposed to swarf, in which case you may want to stick with the lighter oil.

As per the actual lube ports, they’re of very low quality in fact the one by the side of the saddle (meant to lubricate the bed ways) had come apart causing the ball bearing and the spring to come loose inside the saddle. Not good at all.
Now, let me pause to make it clear this is not a series of complaints and assorted whining, it’s a narration of what I’ve encountered and what I’ve done to solve it. We all know what we’re getting into when we buy Chinese equipment like this, some of us have no other option so it is what it is.

I also haven’t gone through honing or “mating” the saddle to the ways yet, this is mostly a guideline on what I’ve done to get the lathe on a running state, we’ll deal about precision and feel later.

To begin I ran a quick inspection to determine whether everything was functional and nothing of importance was missing from the main assembly of the lathe. While the handles had massive play and everything had backlash, the gears where noisy and the overall feel was crap, it was all there (except for a live center and two combined wrenches which I suspect were stolen by whoever inspected the box prior to shipping it to my place, at the store) — Oh well…

 

Removing the apron

There are two variations to this method, I will explain how I actually did it and then I will present an alternative solution (now that I know how everything is assembled).

To remove the apron first you have to take the saddle off, and beforehand you have to remove the crosslide, and before that you have to remove the compound with the toolpost. Indeed, quite some work goes into getting to the actual apron, but don’t worry it’s doable and you don’t have to risk damaging anything if you follow the instructions carefully and you do it with patience.

The apron is held to the saddle by three allen screws, one of which is not visible due to the carriage being on top of it.

It’s a good idea to move the entire carriage to the far left of the bed for reasons that will soon become apparent.

To begin, remove the compound by undoing the two small nuts to the sides then pushing it up and sliding it off (or just remove the nuts and pull it up, then remove the two square bolts and replace them on the compound so you don’t lose them).

Now it’s a good idea to move the crosslide away from you, once you hit the limit back it off a couple turns. Remove the two allen screws holding the handle mount, keep it steady with one hand while turning the handle with the other, you’ll notice the shaft slowly begins to draw toward you. Be very careful not to bend or damage the leadscrew. Once it’s off, use some cotton cloth or bubble wrap on a clean bench to place it away from harms way.

The crosslide is now free to slide off, push it out carefully until it’s all the way out, the gib and the leadscrew protector will fall, so be very careful to put them back together and keep them together. The gibs you’ll most likely have to re-adjust anyway, but don’t worry we’ll get to it later. So far there’s nothing to worry about!

Now we can actually see the elusive third allen screw keeping the apron and saddle in place. To remove the saddle you’ll have to remove the two slide blocks, one is at the far end and the other one at the front. The big one at the back is held by three allen screws, the one at the front is held by two. Don’t be fooled by the third allen in there, it’s for the carriage lock, the tiny plate underneath locks the carriage when you fasten this allen screw. Surely we will soon replace it with an actual handle and a better block, but that can wait so let’s not get into a tangent!.

Before you go ahead and remove the three allens keeping the saddle and apron together, place some wood planks underneath the apron so that it doesn’t move once we do remove the bolts, reason being we don’t want to stress the leadscrew. If we bend or damage it in any way, we’re in deep trouble.

As the apron is now supported, feel free to remove the 3 allen heads and lift the saddle up, if it won’t budge double check that you’ve removed both slide blocks and the rest of the screws.

Once the saddle is off, make sure you don’t place it on the ways of the bed, instead have some more bubble wrap ready and place it somewhere else to clear the way.

The apron is now free, alright I lied. It’s free from the saddle, but not from the leadscrew. To proceed we have to roll it all the way off the leadscrew, however this is only possible if you move the saddle toward the left, not toward the right as you’d initially assume, because the leadscrew has a keyway that only goes to a certain point, this limits the movement of the apron for safety reasons.

First, the second roll/shear pin has to be punched out of the leadscrew shaft near the gearbox (toward the left), don’t worry these pins were a pleasure to remove on my lathe (I’ve had my “instances” with roll pins) since I didn’t have the right size punch tool (and you don’t want to use a center punch here, because it would expand the pin and we just want to push it out) I ended up using the shaft of a broken Dremel sharpening disk since it sits right over the roll pin. I braced the leadscrew mount with a 2×4 and some other scrap wood, so I wouldn’t impart force onto it’s rolling surface. A small (100 gram) hammer was used to punch the pins out, make sure as you are about to finally punch them out, that you turn the shaft to a side for clearance, otherwise the pin nearest to the gearbox will hit the cast iron shoulder and you won’t be able to remove it until you push it back and turn the shaft.

It’s not required to remove both pins to extract the leadscrew, only the far right one has to be removed. I removed both because I didn’t know this until I finally removed the leadscrew and noticed it’s only held by one of the pins.

Remember, this is not a race — take your time, be patient and very careful. We don’t want to harm the leadscrew or the halfnut in any way! — If you get frustrated, take some time off to do something else and come back with a cool positive mind. You can do it!

 

Now we have to remove the leadscrew mount at the far end of the bed. It’s held by two allen screws. However, first you should undo the grub screw on the leadscrew nut (look at the end of the leadscrew by the side of the mount and you’ll see it, regular allen grub screw right there on the nut!)

Now we need to remove the lock nut (that’s what I call it, the end nut that keeps a bit of tension on the leadscrew) to do this I had to use a vise grip, lots of cotton cloth and a 10mm wrench on the nut. Oh by the way, to do this you must be slightly insane or have a big pair of bawls. Maybe I’m tired but I have not found another solution that didn’t require shoving something into the drive gear to prevent the leadscrew from moving (I don’t like the idea and by the way the cotton rag protected the leadscrew and left no marks)

The only other way would be to clamp by the shoulder where we removed the roll pins, but that would impart torque all throughout the leadscrew, which is something I didn’t like either. When it comes to torque, keep everything as short as possible!

Removal of leadscrew mount on the lathe

Removal of leadscrew mount on the lathe

 

The trick is to wrap enough protective layers on the far end of the screw (to the left of the mount) so that we can grab it but not damage it with the vise grip, said vise grip will be set to a “light” clamp, not too tight — just enough so the leadscrew won’t move under a bit of torque.

Now we can remove the nut and undo the vise-grip.

DO NOT try to vise-grip the end of the leadscrew thinking you’ll get away with it, there’s a thread and you will damage it, in turn you will then damage the nut while trying to remove it and it will all become one big mess.

At this point we can actually knock the mount off, in my case it wasn’t budging because the paint was keeping it in place (they paint after assembly and often assemble while some parts are still wet).

The solution?, wooden mallet. You could try a brass or rubber hammer, I really really like the wooden ones. Don’t pry it with anything, just light taps to either side (horizontally, length wise and mostly toward the right — don’t knock on it from the vertical axis) until it releases gracefully.

After the mount is off, you can now slide the apron and leadscrew off. While you do this, make sure the wood planks track underneath it so that we don’t load the leadscrew down and risk bending it, likewise with the halfnut and gear assembly. We’ll be moving the apron to the left. It would be ideal to ask for help at this point, someone should keep the apron steady while we carefully slide the leadscrew off to the right.

There’s no way to remove it to the left (ie. moving the carriage to the right), since the key notch won’t allow it.

If all went well you should now have the leadscrew apart from the apron and the apron apart from the lathe bed!

 

Second alternative to removing the leadscrew:

In theory you should be able to pull the pin out from the coupling, remove the grub screw and the nut, remove the leadscrew mount and proceed to “unscrew” the leadscrew out to the right while leaving the apron in place. Make sure the half-nut is not engaged. This method should work, but I haven’t tried it yet. If this works, it would mean you don’t have to take as many precautions because there’s no leadscrew to be damaged anymore.

Remember:

Don’t force it, if something won’t budge don’t go nuts with a hammer, don’t try to cut corners. This takes time, I had to take several pauses and study the diagrams more than once before I went to remove each specific portion. I even asked around to see if others had done the same in the past or had any suggestions on the matter. A quick google search revealed no such information.

 

Asking for help is not a sign of weakness. If you know yourself you’ll know your limits and you’ll accept them for what they are, knowing that someone else may have already experienced what you are about to experience allows you to take a pause and listen to what they have to say on the matter. You can take it or leave it, but if you don’t ask and you don’t have the knowledge or experience, you may end up damaging something or worse. So by pure intelligence on your side, ask around. Asking for help is actually a sign of strength and not weakness.

 

I’m sorry for the lack of pictures, I actually wasn’t planning on documenting this. Once I put the lathe back together I’ll take pictures and post them here (in reverse order, of course).

More on part two coming soon (removing the motor, gearbox, electrics and more)

Have fun. Cheers!

 

 

DIY Refurbishing your espresso machine

Posted by on May 16, 2013

Leaky head?, Low flow rate?, read on…

Most of mid to low end espresso machines share pretty much the same pump and block assembly with very few differences, there are in fact just a few major designs out there most of which are aluminum/brass based and manufactured in China, however that doesn’t neccesarily make them bad.

In all inexpensive units (and some expensive units sold as “professional” but they’re actually a product of marketing bullcrap) the group head has a spring valve that opens when enough pressure builds on the head, this happens when the pump is turned on and it’s there to prevent water leakage. Some better units will use solenoid valves instead, which also allow to set the flow rate in some cases.

The passive valves used on inexpensive units require a clean surface to sit on, much like an engine valve does. The reason espresso heads can leak is simply because of an uneven mating surface (dirty valve seat or dirty valve) it doesn’t have to be a faulty part so if your machine leaks, don’t assume you’ll need rare / expensive spare parts to fix it. If you’ve taken good care of your unit chances are it needs a slight clean up and polish.

Like I said, this gparticular uide is mostly for inexpensive machines, I don’t have experience with high-end units as I’ve never had the pleasure to work with them.

 

Alright, bring it on!

To proceed, remove the water reservoir, portafilter and any loose parts such as filters, trays, etc. Tip the unit over, I use bubblewrap on the countertop to prevent scratches. In my case I had to remove the bottom cover (plated steel) which was held in place with 4 security torx screws.

Identify the type of head/block assembly, mine has a 12MM nut which holds the diffuser and forms part of the valve assembly itself. Other heads may use a notched nut or similar assembly allowing for a flat-head screwdriver to be used. Go ahead and remove it.

diy_espresso_head_before

A view into the brew head before cleaning it, you can clearly see it’s become obstructred. The valve was in even worse shape!

The valve is often spring loaded and has a silicone seal / head. This is where some of the sediment build-up occurs and prevents it from sealing the boiler properly. But most of the build-up occurs on the valve body, which is often (but not always) brass, on more expensive units you may also find stainless steel parts.

Once you’ve removed the nut pull out the spring if it didn’t come out on it’s own, now that the entire valve assembly has been taken apart, use a flashlight to look into the valve body, you’ll probably find the opening to the boiler is slightly (or severely) restricted with build-up.

If there’s no way to remove the bottom of the unit, you’ll need to work with a mirror to look into the boiler.

diy_espresso_head_valve

Valve assembly after clean-up.

To proceed with the clean-up of the valve body you’ll want to use ~300 grit sandpaper (emery cloth) and then 600 to finish off. You could use your Dremel / rotary tool with a fine brush attachment used for polishing brass (don’t use any compounds, just water) but you have to be very careful not to damage the threads or the valve seat, if you increase the original diameter there’s a chance the valve could pop in and float inside the boiler, allowing all of the boiler contents to spew out and it would never seal again forcing you to replace the entire valve head which may end up costing quite a bit of money and may not even be worth it on inexpensive units. Another possibility is for the bulb to catch and get stuck, so beware of the Dremel and abrasive tools.

 

After cleaning and polishing, it looks brand new!

After cleaning and polishing, it looks brand new!

If you want to make sure all the surfaces are neatly cleaned up and polished, you can use an old lead pencil as a former to wrap a piece of sandpaper around, tapering the top into a cone and then inserting it inside the valve body (with water) you’d proceed by twisting it a few times, removing it, inserting some cloth or paper towel wrapped around to clean up the valve and then take a look inside with a flashlight, repeat until it’s all nice and polished, specially the valve seat.

The silicone valve in my case had a lot of build-up but was easily removed by hand, don’t use any abrasives on it and try not to scratch it in any way.

Now that you’ve cleaned it all up, go ahead and add some water with the unit standing on it’s usual position and give it a few flushes, any loose pieces of build-up should come out, as well as anything you’ve unwillingly introduced while cleaning and polishing the valve body.

 

This is how the assembly goes, valve bulb/head pointing up.

This is how the assembly goes, valve bulb/head pointing up.

If all looks good, go ahead and assemble the valve back to it’s original state. The silicone valve goes facing up into the valve seat, make sure the spring is nice and clean as well as the silicone valve head. If you see any damage on the silicone it’s time to replace the valve or come up with a makeshift solution…

Once it’s all assembled, torque the nut down making sure your diffuser disc / plate is in the right position and turn the unit on, give it a nice flush.

 

In my case the diffuser was slightly blocked so I had to clean it up with a needle and lots of patience before I installed it, This procedure made heaps of difference. Basically my espresso was not only leaky but also had low flow rate and it sputtered a lot making it difficult to obtain a straight shot with good crema.

 

Next in my list would be to access the pump to see if there’s a pressure relief adjustment and go ahead to calibrate it up to 9BAR at the head, that however is going to be a whole ‘notha quest for me. In that event I may probably end up refurbishing the pump as well.

 

Hopefully this guide has been of use to you!
And as you know, don’t send your machine to the store… A good barista fixes his/her own espresso!

 

Have a good one,
Gus

UT61E Protocol Description

Posted by on March 18, 2013

Intro:

The protocol used by the UT61e is quite simple, each packet contains 14 bytes. It constantly streams packets as the screen is updated at around 2 packets a second. The 14 bytes are basically a string where the range, digits, function, status are contained.

The serial interface settings are:

19200 baud, odd parity, 7 data bits, 1 stop bit, no handshake.

Describing the protocol:

This snippet shows you how the data is separated, I handle the 14 bytes as a string, which simplifies the process of separating each portion and since this is a low sampling rate application with low priority, it’s not a resource hog.

If ReadSerialPortData( port, @inp, 14 )
 
	If AddElement( *this\sample() )
		*this\sample()\range 		= Asc(Mid(inp,  1))  ; RANGE
		*this\sample()\digits		= Mid( inp, 2,  5 )  ; DIGITS
		*this\sample()\function 	= Asc(Mid(inp,  7 )) ; FUNCTION
		*this\sample()\status		= Asc(Mid(inp,  8 )) ; STATUS
 
		*this\sample()\option[0]	= Asc(Mid(inp,  9 )) ; OPTION 1
		*this\sample()\option[1]	= Asc(Mid(inp, 10 )) ; OPTION 2
		*this\sample()\option[2]	= Asc(Mid(inp, 11 )) ; OPTION 2
	EndIf
 
EndIf

I believe the last two digits are the “end of packet” limiter (CRLF) however I currently cannot test this, I wrote the code a long time ago and I forgot to comment on this slight detail, but as you can see I’ve defined the CRLF contants, so it must be there.

A list of constants:

Here are some constants from my UT61e (unpublished) library…

#FUNCTION_VOLTAGE 		= %0111011
#FUNCTION_AUTO_CURRENT_UA 	= %0111101
#FUNCTION_AUTO_CURRENT_MA 	= %0111111
#FUNCTION_CURRENT_22A		= %0110000
#FUNCTION_CURRENT_MANUAL_A	= %0111001
#FUNCTION_OHMS			= %0110011 
#FUNCTION_CONTINUITY		= %0110101
#FUNCTION_DIODE			= %0110001 
#FUNCTION_FREQUENCY		= %0110010
#FUNCTION_CAPACITANCE		= %0110110
#FUNCTION_TEMPERATURE		= %0110100
#FUNCTION_ADP			= %0111110
 
#RANGE_ONE			= %0110000 ; Example: 22.000nF
#RANGE_TWO			= %0110001 ; Example: 220.00nF
#RANGE_THREE			= %0110010 ; Example: 2.2000µF
#RANGE_FOUR			= %0110011 ; Example: 22.000µF
#RANGE_FIVE			= %0110100 ; Example: 220.00µF
#RANGE_SIX			= %0110101 ; Example: 2.2000mF
#RANGE_SEVEN			= %0110110 ; Example: 22.000mF	
#RANGE_EIGHT			= %0110111 ; Example: 220.00mF
 
#DIGIT_0			= %0110000
#DIGIT_1			= %0110001
#DIGIT_2			= %0110010
#DIGIT_3			= %0110011
#DIGIT_4			= %0110100
#DIGIT_5			= %0110101
#DIGIT_6			= %0110110 
#DIGIT_7			= %0110111 
#DIGIT_8			= %0111000
#DIGIT_9			= %0111001
 
#STATUS_OL			= 1 < < 0
#STATUS_BATT			= 1 << 1
#STATUS_SIGN			= 1 << 2
#STATUS_JUDGE			= 1 << 3
 
#OPTION1_RMR			= 1 << 0
#OPTION1_REL			= 1 << 1
#OPTION1_MIN			= 1 << 2
#OPTION1_MAX			= 1 << 3
 
#OPTION2_0			= 1 << 0
#OPTION2_PMIN			= 1 << 1
#OPTION2_PMAX			= 1 << 2
#OPTION2_UL			= 1 << 3
 
#OPTION3_VAHZ			= 1 << 0
#OPTION3_AUTO			= 1 << 1
#OPTION3_AC			= 1 << 2
#OPTION3_DC			= 1 << 3
 
#UT_CR				= %0001101
#UT_LF				= %0001010

That’s all for now, I currently don’t have a serial interface to test with (Ain’t got the USB cable either) so I can’t finish the library as to post it, but hopefully I’ll get it done eventually.

The supplied software by UNI-T is pretty bad and it’s Windows only, hence the drive to write my own.

As it is, it should give someone a head-start if they’re about to write their own front-end. On the datasheet of the UT61e controller it’s all explained in fine detail, but I can’t recall the number at the moment.

This whole thing was part of a bigger picture, but I had to give up the concept due to lack of funding.

Alright, enough of this shoulda, coulda, woulda!

Cheers,
Gus

(PB) Loading CSV directly to a Hash Map

Posted by on February 21, 2013

When dealing with string maps, being able to easily load them from a file is a must. For example take language files for different local translations. The simplest, cleanest format would be CSV. The ideal data structure? — A hash map.

While trivial, this code will come in handy for many other things!

EnableExplicit
#CSV_QUOTE 	= "'"
#CSV_SEPARATOR 	= ","
 
Procedure IsEvenNumber(N)
   ProcedureReturn ( 1 - 1 & N )
EndProcedure
 
Procedure IsOddNumber(N)
   ProcedureReturn ( 1 & N )
EndProcedure 
 
Procedure.s RemoveQuotes( String.s )
 
	If Left(String, 1) = #CSV_QUOTE
		String = Mid( String, 2 )
	EndIf
	If Right(String, 1) = #CSV_QUOTE
		String = Left( String, Len(String) - 1 )
	EndIf
 
	ProcedureReturn String
EndProcedure
 
Procedure.i LoadStringMap( FileName.s, Map StringMap.s() )
	; escaping of quotes is currently not supported
	; if an uneven number of quotes is found on a line, the line is ignored.
 
	Define.i fp = ReadFile( #PB_Any, FileName )
	If IsFile(fp)
 
		While Not Eof(fp)
 
			Define.s line = Trim(ReadString( fp ))
			If line
				If CountString( line, #CSV_SEPARATOR ) => 1
 
					Define.i quote_count = CountString( line, #CSV_QUOTE )
					If IsEvenNumber( quote_count )
 
						Define.s key		= RemoveQuotes( StringField( line, 2, #CSV_QUOTE ) ) 
						Define.s content	= RemoveQuotes( StringField( line, 4, #CSV_QUOTE ) )
 
						StringMap( key ) 	= content
 
					EndIf
 
				EndIf
			EndIf
 
		Wend
 
		CloseFile(fp)
		ProcedureReturn MapSize( StringMap() )
	EndIf
 
EndProcedure

Example of data:

'Update', 'Actualizar'
'Databases', 'Bases de datos'
'Program', 'Programa'
'Options', 'Opciones'
'Export', 'Exportar'

Example of use:

NewMap spanish.s()
LoadStringMap( "locale/spanish.csv", spanish() )
 
ForEach spanish()
 
	Debug MapKey(spanish())
	Debug spanish()
 
Next

Couldn’t be easier!
Cheers.

(SQLITE) When duplicate tables are needed…

Posted by on February 5, 2013

Here’s a quick tip if you want to keep a “schema” or “template” table on your database that you’ll then duplicate to populate with arbitrary data. This system works for collection of files where a particular table could represent a specific drive or medium, just as an example of the many uses it can have.

CREATE TABLE 'new_table' AS SELECT * FROM 'schema'; -- where 'schema' is our template table.

This is basic SQL, but if you were to look up how to duplicate a Sqlite table you may come up short if you aren’t aware of standard SQL. As an exercise, here’s how Sqlite interprets the CREATE command.
A few restrictions could be applied to your SELECT statement, this will depend on your particular requirements.

As always, don’t forget to sanitize every input and when possible, remove user interaction altogether from the query — specially during the construction phase.

Cheers