Monday, September 29, 2014

Finite State Machine

I've spent the last weekend learning how finite state machines (FSM) work and how I could implement one. I plan to use one to keep track of the state of a menu system for my bulb-ramper project. After browsing stackoverflow.com and Google, I found that it's actually fairly easy to implement. My code is based off of the code here. I have a list of possible states (e.g. menu1, menu1_entered, menu2, menu2_entered, ...) and a list of possible actions (e.g. button press, encoder turn, ...). I then create an array that contains the action that should be performed when a certain event has happened and what state to transition to based on the current state.

I also wanted to test SyntaxHighlighter (for any code I post here; 2020 Update: SyntaxHighlighter is now replaced with prism):

int test = 0;

Saturday, September 13, 2014

Table Clamps and Rockets

Today I had the machine drill holes into the table for table clamps. This would allow me to securely hold down material that wasn't very big. However, my calculations were off and half the holes (the outermost two columns) were unusable because they intersected the bracing below. Still, there should still be enough usable ones for most projects. I still need to cut out clamps to use with the holes.
Afterwards, I cut out two new fin designs for the Team America Rocketry Challenge (TARC) rocket my team is using. I used my new 1/8" end mill and cut at 10 ipm. I was not in a rush and wanted to make sure the fins were as accurate as possible. They came out very nicely.


Saturday, September 6, 2014

Alignment

Today I took a little time to level the spindle to the base. I did this by making sure the height of the spindle to the table was the same at all four corners of the table. Beginning near the origin, I lowered the spindle until the end mill was just above a piece of wood. Then I jogged the spindle to all four corners and adjusted the bearing pipe supports as needed. If the bit dragged into the wood, I would raise that corner up.

While adjusting a corner, the screw in the adjustment block stripped its threads out and broke off a piece of the super-glued wood (which was supposed to harden the wood so the threads would hold better). My dad and I made a new block by using a scrap piece of wood from cutting out router clamps. We took the center circle and made it into an adjustment block.

Old vs. New
New adjustment block.
I did get the machine reasonably level but since the center of the machine has a little sag (I would say ~1/50 of an inch) from the unsupported rails the alignment isn't perfect.

I hope to test the accuracy and precision of the machine with some simple shapes. I also intend to use a slower feed rate.

On another note, my 1/4" end mill and 1/8" ball mills from eBay came in a couple days ago. I should soon get the 1/8" end mill. I also received some plastic drawer cabinets for sorting my haphazard electronics workbench.

Monday, September 1, 2014

Waste

Today my dad and I cut out the back of the gantry so it would line up with the sides and have a hole in middle (like the original plans). This wasn't as easy as we expected. Only on our third attempt did we finally get the exact shape we wanted.

Back of gantry. 1/8' too short.
The first time went very smoothly, except that the length of the back was 1/8 of an inch short. The wobble from the only partially-tightened bearing rails cause this. Every other axis didn't have this issue.

To compensate for the 1/8 inch, I made the gantry CAD file 1/8 of an inch longer and updated the tool paths. After I installed the new back I would re-tighten all the axis to remove the wobble.

The second time was going along fine until... everything shut down. I opened the shed door to find everything shut off and the gantry stuck on a cable. The motor shaft caught onto the power cable of the overhead lamp and cut through the insulation. This caused a short circuit that blew the surge protector in the extension socket (I couldn't reset it anymore). I was just relieved that all the expensive electronics survived.

Uh oh.
After cleaning up the dust and fixing the lamp cord, we began cutting the back for the third time. This went off without a hitch and we were able to install the new back.



Today was definitely a day of learning and a warning to pay more attention to the machine. The torque of the motors aren't meant to be joked with.

I just need to tighten up all the bearing pipes and create a dust boot with vacuum attachment for the router. The dust is really getting out of hand.