Electronics overview

From ShapeOko
Revision as of 15:53, 18 September 2012 by Admin (Talk | contribs) (Test Arduino)

Jump to: navigation, search

Layout and Identify Components

Batch2electronics.jpg

Part # Description QTY
IEK-01 Stepper Motors 3
IEK-02 Power Supply 1
IEK-03 Wall Plug 1
IEK-04 Arduino Uno 1
IEK-06 grblShield 1
IEK-07 Stepper Cable 810mm 3
IEK-08 Solid Core Wire 300mm 1
IEK-10 USB Cable 3m 1
IEK-11 E Stop Button 1
IEK-14 Pigtail Adapter 1
IEK-15 Mounting Panel 1
IEK-16 Arduino Mounting Hardware 1
IEK-17 Spindle (not shown) 1

Arduino and grblShield

Arduino uno smd.jpg

The Arduino is the heart of the electronics. It contains an AVR Processor, a USB connector, and I/O pins. The Arduino comes with grbl already installed on board. grbl reads g-code that is sent over USB and translates it into movements for the stepper motors on the ShapeOKO. The particular version of grbl on the Arduino also comes pre-configured for the ShapeOKO, and should not require any tweaking to operate.

Grblshieldv3.jpg

The grblShield plugs into the top of the Arduino, and is what takes the signals grbl generates and drives the steppers. As shipped from Inventables, the shield has had the micro-stepping changed on the Z-axis driver to 2x microstepping to enable faster travel speeds for the machine. You will notice on the grbl shield there are small white "pots" that look like philips screw heads. These are used to adjust the current going to the motors. The motor drivers are sensitive and you may need to SLOWLY adjust the pots. The total travel of the pots are 270 degrees. Don't touch them now, this was just a heads up. The Syntheos wiki has a good article on how to properly set the motor current.

Power Supply

Batch2powersupply.jpg

The power supply provides 24 volts at 4.5 amps. Be careful with it, and don't work on power wires when the power supply is plugged in. The connector that ships with the power supply comes with a barrel connector at one end. The pigtail adapter that's included with the kit (shown below) plugs directly into the barrel connector.


Batch2pigtail.jpg

The pigtail adapter comes pre-stripped but needs to be modified in order to accommodate the estop and also plug into the grblShield. To do this, strip back the protective cover about 150mm. It should look like this:

Batch2pigtailstripped.jpg

The video below shows you how to strip all of the wires in the Inventables kit using the included razor blade.

Electronics Stand

Unscrew the top of the E-Stop switch. Then unscrew the silver collar below it. Below that, there is a white collar with a rubber ring on top of it. Screw it all the way down.

InvElec11.jpg

Fit the switch into the large hole on the case, and then screw down the silver collar to hold it in place. Replace the top.

InvElec12.jpg

Place the Arduino on top of the case. The USB jack should be facing away from the E-Stop switch. Using M3x12 screws and nuts, attach the Arduino to the case. Snug down the screws, but don't make them too tight. You don't want to crack the circuit board or the acrylic.

InvElec14.jpg

The grblShield plugs into the top of the Arduino. It only goes in one way -- the power connectors should be on the same side of the Arduino as the USB jack.

Grblarduinoright.jpg (Shown not attached to acrylic stand for simplicity)

Grblarduinoleft.jpg

Verifying

Now that we have all of the parts laid out and identified, let's assemble a minimum electronics setup.

By testing your electronics first, without attaching anything to your machine, it will be significantly easier to troubleshoot if something were to not work as expected. Once we are done verifying the electronics, we'll continue on with the build process. Here's a picture of the full assembled minimum electronics setup:

400px

Connect Steppers

Start by connecting each of your stepper motors directly to the grblShield.

Dryrun1.jpg

  • Note the wire coloring from left to right (as shown): Black, Green, Red, Blue
  • I found it easier to detach the grblshield from the arduino and acrylic stand before attaching the stepper motors.

Test Arduino

Once your motors are connected to the grblshield, set it aside for a moment. Dryrunarduino.jpg

We're going to test the arduino to make sure grbl is functioning correctly:

  1. Attach arduino to computer, does green light turn on?
    1. Test for general functionality
      • open gcode sender or universal g-code sender
      • select appropriate com port, 9600 speed
      • Click open
      • send '$' command
      • does the unit return your current settings?
        • If Yes, continue with instructions
        • if no, click here (arduino grbl troubleshooting section)

Wire E-Stop

Alright, your arduino is working and grbl has been loaded and is operational. Unplug the USB cable from your Arduino to disconnect from your computer.

Now it' time to wire up the e-stop and connect the power supply

  1. attach pigtail adapter's gnd (black) directly to grblshield (note polarity on connector)
  2. strip wire ends on included red wire (strip back ~6mm)
  3. attach one end of stripped cable to estop (red side)
  4. attach other end of stripped cable to grblshield (note polarity on connector)
  5. Attach power supply VMOT (red) to estop (again, use the red side)

Final Test

At this point, everything should be connected properly. Does your setup look like the picture above? Great! If not, go back through the instructions and figure out where you strayed from the path. If you get stuck, head over to the forum and ask for some help.

If everything is connected and you're ready, let's go ahead and try to stream gcode over to the arduino form your computer.

  1. Open gcodesender or universal g-code sender
  2. Select the appropriate com port
  3. Select 9600 for the speed and click 'open' to make a connection
  4. Download this File:Verifyelectronics.txt test file and open through your gcode sender
  5. Click Go!