CEB Press/Manufacturing Instructions/Controller Box: Difference between revisions

From Open Source Ecology
Jump to navigation Jump to search
Line 190: Line 190:
Here are errors upon running the Python script and upon trying to upload the CEB Testing Program to the arduino:
Here are errors upon running the Python script and upon trying to upload the CEB Testing Program to the arduino:


Dude, this error says you're missing a package.  Run
Dude, see 13.2 above.  This error says you're missing a package.  Run
  sudo apt-get install python-imaging python-imaging-tk
  sudo apt-get install python-imaging python-imaging-tk



Revision as of 22:17, 22 November 2011

Warning.png Warning: The documentation for the CEB Press is undergoing a thorough overhaul. CAD models and written directions are presently obsolete. For more information, see Talk:CEB_Press#Documentation_overhaul_in_progress. When the models, specifications and text on this article have been thoroughly reviewed, updated when necessary, and confirmed as whole and accurate, this warning may be removed.

Ceb-controller.jpg


Materials

Warning.png Warning: A transition to a milled circuit board for the solenoid driver is in progress but not complete.

Cutlerhammerbox.jpg
Breakout Shield & Arduino
  • Arduino Duemilanove Microcontroller Board

Technical Specifications

  • Arduino Breakout Board

Assembly Instructions

  • Solenoid Driver

Assembly Instructions

  • Sensors

Assembly Instructions

  • Case

Assembly Instructions

  • Soldered LED and Resistor

Assembly Instructions

  • Linked Extension Cord

Assembly Instructions

  • 18 AWG Red Wire
  • 18 AWG Black Wire

Wiring Diagrams

  • Overview of controller box, some wires not shown

Fig. 2. CEB controller v2.0 (2011).

  • Main power wiring

Casewiring.png

  • Wiring into the arduino breakout board and solenoid driver board

Ceb-controllerbox-small.png

  • Set of solenoid valves: the hydraulic opening to the left is tank (T) and the one to the right is pressure (P)

Solenoidvalve.jpg

  • Wiring into the solenoid valves: note the red and black wire connections as well as the terminal jumper locations

SolenoidValveWiring.png

Battery Power

Fig. 1. Battery connection.
Fig. 4. Alligator clips.
Fig. 5. Safety disconnect.
Fig. 6. Main power switch.
Fig. 7. Terminal strip inside the controller box.
File:Safetyfuse.jpg
Fig. 8. 10 amp safety fuse.
Fig. 9. Arduino on bottom.
Fig. 10. Breakout board.
Fig. 11. Solenoid driver board.
Fig. 12. Lining up of pins.
Fig. 13. Circuit schematic of driver board.
Fig. 13b. Traces schematic of driver board.
Fig. 14.Controller testing GUI.

The Power Cube battery, or any other 12V source (Fig. 1), provides electrical power to drive the CEB controller (Fig. 2) and hydraulic solenoid valves (Fig. 3). Alligator clips (Fig. 4) are used to make the connection. The white lead in the power cord is the positive terminal, and the black lead is the negative terminal. This polarity matters.

The battery power cable connects to the controller via a safety disconnect (video in last year's CEB documentation) - which are 2 plugs plugged into each other (Fig. 5). Once battery power is connected, the main power switch (Fig. 6) turns on the power to the controller, where the controller feeds power to the solenoids. Inside the controller, a terminal strip (Fig. 7) is used for the ground (black) and positive connections to the circuit boards. A fuse (Fig. 8) should be located between the main power switch and the positive terminal.

Circuit Boards

Three circuit boards are used in the controller. They are plugged one on top of the next in a sandwich configuration. The spacer on the bottom is a standard household electrical outlet, which insulates the circuit boards from the controller box.

The bottom board is the Arduino (Fig. 9). The Arduino Breakout Board (Fig. 10) sits on top of the Arduino. The circuit-milled Solenoid Driver Board (Fig. 11) sits on top of the Breakout Board. The pins on each of the 3 boards line up (Fig. 12).

Circuit Power

The Arduino and the Solenoid driver must be powered by 12V from the battery. For the Arduino, the connection is made via the Breakout Board. 12V from the battery must be connected to Vin on the shield (bottom right of Shield in Fig.10), and ground must be connected as well. Use the terminals above the Vin.

Power must be connected directly to the solenoid driver board via the terminals in the upper left of Fig. 15. The + terminal is 12V, and the – terminal is the battery ground.

Steps

Installation of the Controller Board, Breakout Board, & Solenoid Driver Board into the Controller Box

The main components of the controller box are an electrical enclosure with an Arduino microcontroller board, an Arduino breakout board, and a solenoid driver board. You will need:

  • a drill with a twist bit
  • wire strippers
  • a flat head screwdriver
  • a Phillips head screwdriver
  • a small precision flat head screwdriver
  • a pen or something to mark with.
  • a Control Box
  • an Arduino Uno or Duemilanove microcontroller board
  • an Arduino Breakout board
  • a solenoid (PWM) driver board
  • 2 screws that will fit through the Arduino board's screw holes
  • 2 100-Ohm resistors soldered to LEDs.
  1. To begin, clear the mounting platform by gently bending away all of the wiring.
  2. Next, place the microcontroller on the blue mounting box, and the breakout board atop the microcontroller, matching the breakout board's male pins to the microcontroller's female pins. The "tops" of the boards should be aligned to the left of the control box. Center the boards to leave as much room as possible around the breakout board. Remove the breakout board while holding the microcontroller in place, and mark screw locations on opposite corners.
  3. Remove the microcontroller, and carefully drill the top hole at the mark. Attach the microcontroller with one screw and mark the second hole again for accuracy. Remove the board and drill the second hole. # Then attach the microcontroller with small screws. Be careful not to screw the board in too tightly, or the board may bend or crack.
  4. Next, mount the breakout board onto the microcontroller. To accommodate the microcontroller's USB port and power jack, some pins on the breakout board must be removed. Snip the third, fourth and fifth pins from the left and the third and fourth pins from the right on the underside of the bottom of the breakout board. Then gently install the breakout board atop the microcontroller.
  5. Next, connect the power wire from the control box to the breakout board. Use a precision screwdriver to unscrew the terminal labelled "V in" located second from the right on the top terminal block of the breakout board. Attach the red positive voltage wire from the control box to this terminal. Insert the wire and screw the terminal back down while continuing to hold the wire until it is secured.
  6. Connect the black ground wire to the leftmost ground terminal (GND) at the bottom of the breakout board.
  7. Connect the two orange ground wires to the two "GND" terminals that are 5th and 6th from the left of the top terminal block.
  8. Connect the two blue sensor positive voltage wires to the two "5V" terminals that are the 5th and 6th terminals from the right of the top terminal block.
  9. Connect the two sensor signal wires, which are white with blue stripes, to the "A0" and "A1" terminals which are the 7th and 8th terminals from the top of the right terminal block. Make a note of which wire goes to A0 and which wire goes to A1, as they are different sensors. The sensor that wires into A0 is for the primary hydraulic cylinder and the sensor that wires into A1 is for the secondary hydraulic cylinder.
  10. Connect the two soldered LED/resistor pairs to the breakout board one at a time. The procedure to soldering these is explained above. Bend the wires on each end to facilitate the connection. Connect the LED end into terminal blocks 12 and 13, which are the second and third lowermost terminals of the right terminal block. Connect the resistor end to any of the ground terminals on the bottom terminal block.
  11. Mount the solenoid driver board onto the breakout board. This driver board will be oriented such that the five terminal blocks that go to the solenoids are on the right side facing right, and the power terminal points down.
  12. Connect the ground to the solenoid driver board. Take a piece of stranded 18-gauge wire long enough to reach from the bottom-left ground terminals of the breakout board to the solenoid driver negative power terminal. Strip a quarter inch off both ends of the wire, tin the ends of the wire with a soldering iron, and connect. Note that the power terminal block has both ground and +12V connections, and if you reverse this polarity you will burn out the driver board.
  13. Connect the power to the solenoid driver board.Take a piece of red 18-gauge wire long enough to reach from the V in terminal on the breakout board to the solenoid driver positive power terminal. Strip a quarter inch off both ends of the wire, tin the ends, and connect.
  14. There are 5 connections going to the hydraulic valve of the CEB press. These are labeled 1-5. Strip 1/4" from the ends of each wire, tin the ends, and install them into the negative solenoid terminals. Start with 5 at the top and go down sequentially. It may be necessary to trim off a few strands of the ends of the wires to get them to fit in the terminals, but do not cut any more than necessary.
  15. Finally, ensure that the terminal block screws are firmly fastened to the connected wires and that the microcontroller, breakout, and solenoid driver boards are firmly mounted together.

This completes the installation of the controller board, breakout board, and solenoid driver board into the Controller Box.

Attach the Sensors

  1. Feed the CAT-5 ends of the sensor cables through either the power cable hole or the right side hole of the Electronics Box.
  2. Attach the orange ends of the sensor wires to GND terminals on the Breakout Shield.
  3. Attach the blue ends of the sensor wires to the 5V terminals on the Breakout Shield.
  4. Attach the blue-white ends of the sensor wires to terminals A0 and A1 on the Breakout Shield.

Testing from Zero

  • Arduino Testing - Preparation
  • Note: For this testing procedure, you will need a computer with Arduino software, Python and pyserial loaded.
  1. Solder 100 Ohm resistors to the negative (short) ends of three LEDs.
  2. Connect the Positive ends of the LEDs to Ports 11, 12 and 13 of the Breakout Shield
  3. Connect the resistor ends to GND port of the Breakout Shield
  4. Double-check the connections!
  5. Connect the Arduino to the Computer using a USB Cable
  6. Download Arduino Environment
  7. Open the Arduino Environment
    1. Double click on executable text file in Ubuntu
    2. Select the board that you are using (Duemilanove 328) under Tools / Board.
  8. Select the Appropriate Serial Connection under Tools / Serial Ports.
    1. Troubleshooting - if Tools / Serial Ports is blanked out, connect Arduino board
    2. Generally, the appropriate serial connection will be the number of the lowest unused USB port starting at 0.
  9. Download the CEB_Testing_Program.pde
  10. Open the CEB Testing program in last step in the Arduino program by going to File / Open...
    1. Note: if the above file is not in its own folder, Arduino Environment will create a folder in Ubuntu
  11. Load the CEB Testing Program into the Arduino using the Upload Button in File / Upload to I/O Board
  12. Download the Python-based Arduino Testing Program
  13. Open the Python-based Arduino Testing Program
    1. Run python code in Terminal - python CEB_Testing.py
    2. You may need to install python-imaging, python-imaging-tk, python-serial, arduino and avrdude in Linux to make it work
    3. Try this command in Debian-Based Linux Distros such as Ubuntu: sudo apt-get install python-imaging python-imaging-tk python-serial arduino avrdude
    4. You may need to install Arduino for WindowsPIL and Pyserial if you are using Windows.
    5. If you are using a Mac, I have no idea what you'll have to do.
  14. Connect to the Arduino using the GUI button
  15. Arduino - Testing - Click the Blink Test Button to Check if the Arduino is working. LED 13 should blink on and off.
  16. Click the Sensor Test Button. The Arduino’s sensors should cause LEDs 11, 12 and 13 to blink on and off in the presence of the magnets.
  17. Click the MOSFET Testing Buttons. The green LEDs on the MOSFET should blink on and off accordingly.
  18. Solenoid Connections - Cut five 2’ pieces of 16-gauge black wire and five 2’ pieces of 16-gauge red wire.
  19. Strip ¼” off each of the five black and five red wires.
  20. Tin the ends of each of the wires.
  21. Attach black wires to each of the negative terminals of the MOSFET connectors on the Detroit Fab-Lab board.
  22. Attach red wires to each of the positive terminals of the MOSFET connectors on the Detroit Fab-Lab Board.
  23. Run the black and red wires through an available hole in the Electronics Box.(Should we use the left-side hole for this???)
  24. When all wires have been checked, tighten each of the cable clamps.
  25. Solenoid Testing - Remove the bridge connector between the Common Ports of each solenoid unit.
  26. Connect each of the five red-black solenoid wire pairs to terminals in the solenoids. Black wires should attach to the Common ports and Red Wires to the Solenoid a and Solenoid b Ports
  27. Double-check the connections!
  28. Test the Solenoids with the Python-based CEB Press Testing program.

Notes

Here are errors upon running the Python script and upon trying to upload the CEB Testing Program to the arduino:

Dude, see 13.2 above. This error says you're missing a package. Run

sudo apt-get install python-imaging python-imaging-tk

to install the Image and ImageTk libraries.

Conttesterrors.jpg

Previous Versions

Future Versions