Stain Dipping Machine Cable Winding Pulley

The cable winding pulley was the most complicated part of the machine due to it’s multiple set screws, flat surfaces, precise bore, and threading.  One set screw holds the pulley on the shaft.  The other set screw holds the cable firmly attached to the pulley.

20180714_190920

Here is a picture of the pulley mounted to the DMM Tech Servo Motor.  In the background you can see the cable go up through the top of the machine, over the free pulley, and back down to hold the main slider mechanism.

IMG_2388

Example of Python Generator Function.

One of the great features of Python is Generator Functions.  Generator functions allow you to convert any function to a generator function by simply including the yield keyword somewhere in the function body.  When a generator function is called, the response is a generator object, which can be iterated over among other things.

To boil this down to basics, generator functions allow you the programmer to create a function which yields one value at a time (and pauses until the next value is requested) until you decide it is done.  This opens endless possibilities for converting sequences, creating sequences, filtering, and more.

The following example is a generator function which will take a simple list or iterator and return pairs of (element, previous_element).  This is a great use for generators and the yield statement.

Generator Function:

def lineandlast(listish, first=True, last=True):
    iterator = iter(listish)
    lastline = next(iterator)

    if first:
      yield lastline, None

    for line in iterator:
        yield line, lastline
        lastline = line

    if last:
        yield None, lastline

Example:

for line, last in lineandlast([1,2,3,4,5]):
    print(line, last)

Output:

1 None
2 1
3 2
4 3
5 4
None 5

Notes:
There are two keyword arguments, first and last, which can be used to control the output of the first and last items on the output example above.

Stain Dipper Upper Pulley

The Stain Dipper is taking shape one component at a time.  We have the servo controller, servo motor, brass for pulleys, bearings, blocks of UHMW Polyethylene for supports, taps, set screws, aluminum rods, shafts, an Arduino Mega, buttons, switches, power supplies, wire, and more…

Here are some views of the upper pulley system.

Free_Pulley_Assembly_2018-Jul-03_05-07-33AM-000_CustomizedView6207873165

Free_Pulley_2018-Jul-03_03-14-42AM-000_CustomizedView48552900108

Fudge Version 2

Fudge version 2.  (Version one wasn’t good enough to write about).

This is a cross between two recipes that I learned about.  I made use of some of the techniques but did not follow the recipe that Alton Brown explains so well in his episode “Fudge Factor” at https://www.foodnetwork.com/shows/good-eats/episodes/fudge-factor

Fudge V2

… start with …
2 3/4 cups sugar
1 cup cocoa
1/4 cup corn syrup
1/4 stick butter
1 cup milk

… and later …
1/2 stick softened butter
1 tbsp real vanilla extract

… and if you want…
Cocktail peanuts (or walnuts or whatever)

Put the “start with” ingredients in a saucepan over high heat and stir constantly with a wooden spoon until boiling.  I tried covering it as Alton Brown said, but it just tried to boil over, so maybe I did that wrong?

Turn heat down to medium low and DO NOT TOUCH IT.  As soon as the temp hits 232F, turn off heat and just let it set there.   Place a small amount of butter on the top to prevent it from drying out.  Let it sit undisturbed until it is 110F…. then…

Dump in the “and later” ingredients and stir it AS HARD AS YOU CAN with a wooden spoon.  When it starts feeling like it’s time, maybe losing it’s sheen, maybe starting to get stiff, it’s time to dump it into a parchment paper lined 8×8 pan before too late.

I then poured the peanuts on top and worked them down in with a spatula.   I though it was ruined, because it just wasn’t setting up.

But I got up the next day and sure enough it was perfect.