Search This Blog

Thursday, March 10, 2011

Motor moves!

In our last post we mentioned a couple of problems that we had with trying to get our stepper motors working. In order to clear things up a bit we spent a few hours in Waterloo's Mechatronics Lab (also known as the Church Lab) in order to try and diagnose the problem.

Here we are trying to hook up the output of one of the stepper motors to the oscilloscope. You can see the abnormally noisy output on the oscilloscope that David is pointing at. We weren't too sure what the problem was with this noise (as the voltage on the logic inputs from the microcontroller were fairly clear and steady). In our fumblings we managed to burn out one of the stepper motor drivers (how we did that exactly, we don't know). We also found that I made a very novice mistake when wiring the protoboard together in that I left the sleep and enable pins floating and not pulled up to High >.< Even after fixing these problems we still had problems with the stepper motor output, with it rotating smoothly for 1 second before suddenly seizing and vibrating between two states irregularly. Additional poking around with the multimeter and schematic scouring made us realize that the issue likely had to do with not setting the onboard potentiometer on the stepper motor driver board.

A second visit to the lab had us repairing the omissions/mistakes we found in the first session, and trying to deal with the tiny potentiometer. At that point we found something weird, in that the onboard resistor leading to the potentiometer was listed in the schematic was 20kohms, but we measured it to be more in line with 10kohms. This of course would affect what resistance level we would have to set our potentiometer to (our aim was to get 0.8V across the potentiometer, as that was what was calculated when referring to the current-limiting section of pololu's website). Even more odd was the fact that we couldn't get the desired 0.8V through the calculation way (ie. using voltage divider law to calculate what resistance we needed to make our potentiometer, given our desired voltage of 0.8V and a second resistor of value 10kohm). In the end we got the correct voltage through powering on the electronics and adjusting the potentiometer until the multimeter read 0.8V. The result? smooth motor motion and no more issues. See below for a quick video of the motor operating.

Now that we know how to wire the motor up to at least make it move, our next step will be trying to implement the whole cartesian system (and replace the broken stepper driver board) so that we end up with a fully functioning xyz stage.

'Til next time,


Sunday, March 6, 2011

Electronics update

So one of the reasons we haven't been able to update this blog is because we've been caught up in the "wonderful" life of being an engineering student. Between trying to pass courses, complete assignments, prep for midterms, hands on labs and trying to find co-op jobs, we unfortunately haven't had a lot of time to work on the printer. Hopefully it hasn't been too long.

So as seen from the recap post, most of the mechanical work has been completed, and electrical work is the next big hurdle. But enough of the intro, onto the pictures!

You can see here a bit of an overall setup shot in my uni room with the tangle of wires (I had to guess at their length so they're a little long). At the bottom of the picture is the PC power supply (Antec Basiq at 350 watts) that we use to provide the power for the whole machine. In fact we only use 2 12v lines and 2 ground lines coming from the supply (same rail), so in reality most of those wires on the floor in the picture are unused. Sitting on the middle platform is the arduino mega and the protoboard containing the electronics required to run our four stepper motors.

The protoboard layout can be seen in the photo on the right. We followed the schematics posted here on the reprap wiki to come up with the layout. In detailed terms its a fairly simple layout, with the 12V lines running along the top of the board with the stepper motors plugging into headers visible there. 12V from the power supply can be seen in the left border of the picture with the header connection, and 5v logic from the microcontroller is also on the left. Enable,step and direction lines from the micro are along the bottom of the board, with some bypass capacitors sprinkled here and there to help level any voltage fluctuations. The circuit for the heated bed and the heater block haven't been made yet since we're still missing the mosfets to control them and the 6.8 ohm resistor for the heater block (hard to find here in Waterloo). Plus it's probably a good idea to try and get the stages moving first before trying the heating components.

In the final photo you can see the wire connections of some the motors and limit switches for the xyz stage. The z stage limit switch is sort of dangling in midair since it requires me to know at what height the build platform will rise to (which itself hasn't be built yet). It doesn't look incredibly professional with all that coloured wire and foil tape holding it together, but its fairly solid and easy to follow.

So in the end how does it all work out? Well we haven't even gotten around to moving it yet, but initial tests pulling all the inputs (enable,step and direction) to zero have led us to find some weird oscillations in the motors. It seems that 3 out of the 4 drivers have the stepper motors oscillating back and forth between two states, which is a little worrying. We're trying our best to isolate the issue and hopefully fix it, and we'll be looking into using one of the waterloo labs to do some poking around with an oscilloscope. Hopefully that will lead somewhere because I really do not want to buy 3 more expensive drivers and resolder them in.

Hopefully the next blog post will show the stages actually moving -and if we're lucky- the heater block electronics installed.

Until next time,