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

From Open Source Ecology
Jump to navigation Jump to search
No edit summary
 
(20 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Template:CEB Press Manufacturing Instructions Navbox}}
The CEB Press's controller box houses the switches and electronics that are used to operate the hudraulics of the CEB Press and to process data from sensors on the machine.
{{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.}}


[[Image:ceb-controller.jpg|right]]
=Video=


<html>
<iframe src="https://player.vimeo.com/video/33885023?title=0&amp;byline=0&amp;portrait=0" width="400" height="225" frameborder="0" webkitAllowFullScreen allowFullScreen></iframe>
</html>


=Materials=
=Tools=


{{Warning|A transition to a milled circuit board for the solenoid driver is in progress but not complete.}}
*Straight Pattern Tin Snips


[[Image:Cutlerhammerbox.jpg|thumb]]
*Wire Strippers Compatible with 18 and 22 Gauge
[[Image:Breakoutparts.jpg|thumb|Breakout Shield & Arduino]]


*'''Arduino Duemilanove Microcontroller Board'''
*Crimpers


[http://arduino.cc/en/Main/arduinoBoardDuemilanove Technical Specifications]
*2.3mm Flathead Screwdriver


*'''Arduino Breakout Board'''
*Screwdriver with Number 2 Philips Bit


[http://www.reprap.org/wiki/Arduino_Breakout_1_4 Assembly Instructions]
*Needlenose Pliers


*'''Solenoid Driver'''
*Measuring Tape


[http://opensourceecology.org/wiki/CEB_Press/Manufacturing_Instructions/Detroit_Fab_Lab_Solenoid_Driver Assembly Instructions]
=Materials=


*'''Sensors'''
*Case
 
[http://opensourceecology.org/wiki/CEB_Press/Manufacturing_Instructions/Sensor_Unit Assembly Instructions]
 
*'''Case'''


[http://opensourceecology.org/wiki/CEB_Press/Manufacturing_Instructions/Case Assembly Instructions]
[http://opensourceecology.org/wiki/CEB_Press/Manufacturing_Instructions/Case Assembly Instructions]


*'''Soldered LED and Resistor'''
*[2] Sensor Units


[http://opensourceecology.org/wiki/CEB_Press/Manufacturing_Instructions/Soldered_LED_and_Resistor Assembly Instructions]
[http://opensourceecology.org/wiki/CEB_Press/Manufacturing_Instructions/Sensor_Unit Assembly Instructions]


*'''Linked Extension Cord'''
*Solenoid Driver v2


[http://opensourceecology.org/wiki/CEB_Press/Manufacturing_Instructions/Linked_Extension_Cord Assembly Instructions]
[http://opensourceecology.org/wiki/CEB_Press/Manufacturing_Instructions/Detroit_Fab_Lab_Solenoid_Driver_v2 Assembly Instructions]


*'''18 AWG Red Wire'''
*18 Gauge Red Wire


*'''18 AWG Black Wire'''
*18 Gauge Black Wire


=Wiring Diagrams=
*Ring Insulated Connector with Small Hole for 10-12 Gauge


*'''Overview of controller box, some wires not shown'''
*[14] Ring Insulated Connectors for 10-12 Gauge


[[Image:cebcontroller.jpg|300px|Fig. 2. CEB controller v2.0 (2011).]]
*[6] Ring Insulated Connectors for 14-16 Gauge


*'''Main power wiring'''
=Steps=
 
[[Image:casewiring.png]]
 
*'''Wiring into the arduino breakout board and solenoid driver board'''
 
[[Image: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)'''
 
[[Image:solenoidvalve.jpg|300px]]


*'''Wiring into the solenoid valves: note the red and black wire connections as well as the terminal jumper locations'''
*Mount the solenoid driver on top of the Arduino microcontroller.


[[Image:SolenoidValveWiring.png]]
*Using the tin snips, cut 6 pieces of 20cm black wire, 2 pieces of 20cm red wire, 5 pieces of 1.5m black wire, and 1 piece of 1.5m red wire.


=Battery Power=
*Using the wire strippers at 22 gauge, strip half a centimetre at one end of the 6 pieces of 20cm black wire and 1 piece of 20cm red wire.
[[Image:batteryconnection.jpg|thumb|Fig. 1. Battery connection.]]
[[Image:alligatorclips.jpg|thumb|Fig. 4. Alligator clips.]]
[[Image:safetydisconnect.jpg|thumb|Fig. 5. Safety disconnect.]]
[[Image:powerswitch.jpg|thumb|Fig. 6. Main power switch.]]
[[Image:terminalstrip.jpg|thumb|Fig. 7. Terminal strip inside the controller box.]]
[[Image:safetyfuse.jpg|thumb|Fig. 8. 10 amp safety fuse.]]
[[Image:arduinolayer.jpg|thumb|Fig. 9. Arduino on bottom.]]
[[Image:breakoutboard.jpg|thumb|Fig. 10. Breakout board.]]
[[Image:driverboard.jpg|thumb|Fig. 11. Solenoid driver board.]]
[[Image:pinlineup.jpg|thumb|Fig. 12. Lining up of pins.]]
[[Image:driverschematic.png|thumb|Fig. 13. Circuit schematic of driver board.]]
[[Image:Drivertraces.png|thumb|Fig. 13b. Traces schematic of driver board.]]
[[Image:testcode.jpg|thumb|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.  
*Using the wire strippers at 18 gauge, strip a centimetre at the other ends of the 6 pieces of 20cm black wire and the 1 piece of 20cm red wire, as well as both ends of the other 1 piece of 20cm red wire, the 5 pieces of 1.5m black wire, and the 1 piece of 1.5m red wire.


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.
*Using the crimper, crimp the 10 to 12 gauge ring insulated connector at one of the 1 centimetre stripped ends of the 6 pieces of 20cm black wire, the 2 pieces of 20cm red wire, the 5 pieces of 1.5m black wire, and the 1 piece of 1.5m red wire.
Also crimp the 10 to 12 gauge small hole ring insulated connector at the remaining 1cm end of the 20cm red wire and crimp the 14 to 16 gauge ring connector to the remaining 1cm ends of the 5 pieces of 1.5m black wire and 1 piece of 1.5m red wire.


===Circuit Boards===
*Using the screwdriver with the number 2 philips bit, connect the small ring end of the 20cm red wire to the remaining power switch terminal.


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.
*Insert the large ring end of the 6 1.5m wires through the bottom-middle hole of the lug 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).
*Using the screwdriver with the number 2 philips bit, connect the large ring end of the 1.5m red wire, the remaining ring end of the switch-connected 20cm red wire, and the ring end of the other 20cm red wire to the bottom-left screw of the terminal platform.


==Circuit Power==
*Connect the large ring end of the 5 1.5m black wires and the ring end of 5 20cm black wires to the top 5 screws of the terminal platform. Then connect the ring end of the remaining 20cm black wire to the bottom-right screw of the terminal platform.


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.
*Using the flathead screwdriver, connect the half centimetre ends of the 6 pieces of 20cm black wire to the lower terminal of the 5 mosfet terminal blocks, and the left terminal of the power terminal block. Note that the mosfet connections from left to right on the terminal platform should go from bottom to top on the solenoid driver. Also connect the half centimetre end of the 1 piece of 20cm red wire to the right terminal of the power terminal block.
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=
*Insert the 2 sensor units by their wire end into the right-bottom hole of the lug box.


== Installation of the Controller Board, Breakout Board, & Solenoid Driver Board into the Controller Box==
*Using the flathead screwdriver, connect the bluewhite wires, orange wires, and blue wires into the top, middle, and bottom terminal blocks, respectively, on the right side of the solenoid driver.
<html>
<iframe src="https://player.vimeo.com/video/30768723?title=0&amp;byline=0&amp;portrait=0" width="400" height="225" frameborder="0" webkitAllowFullScreen allowFullScreen></iframe>
</html>
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.  


#To begin, clear the mounting platform by gently bending away all of the wiring.
*Using the screwdriver with the number 2 philips bit, screw-tighten the wire clamp at the right-bottom hole of the lug box.
# 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.
# 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.
# 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.
#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.
# Connect the black ground wire to the leftmost ground terminal (GND) at the bottom of the breakout board.
# Connect the two orange ground wires to the two "GND" terminals that are 5th and 6th from the left of the top terminal block.
# 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.
# 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.
#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.
# 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.
# 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.
# 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.
# 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.
# 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
 
#Feed the CAT-5 ends of the sensor cables through either the power cable hole or the right side hole of the Electronics Box.
#Attach the '''orange ends''' of the sensor wires to '''GND terminals on the Breakout Shield'''.
#Attach the '''blue ends''' of the sensor wires to the '''5V terminals''' on the Breakout Shield.
#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.
# Solder 100 Ohm resistors to the negative (short) ends of three LEDs.
# Connect the Positive ends of the LEDs to Ports 11, 12 and 13 of the Breakout Shield
# Connect the resistor ends to GND port of the Breakout Shield
# Double-check the connections!
# Connect the Arduino to the Computer using a USB Cable
# Download [[Arduino Environment]]
# Open the Arduino Environment
##Double click on executable text file in Ubuntu
##Select the board that you are using (Duemilanove 328) under Tools / Board.
# Select the Appropriate Serial Connection under Tools / Serial Ports.
##Troubleshooting - if Tools / Serial Ports is blanked out, connect Arduino board
##Generally, the appropriate serial connection will be the number of the lowest unused USB port starting at 0.
# Download the <html><a href = "http://openpario.mime.oregonstate.edu/documents/1250">CEB_Testing_Program.pde</a></html>
# Open the CEB Testing program in last step in the Arduino program by going to File / Open...
##Note: if the above file is not in its own folder, Arduino Environment will create a folder in Ubuntu
# Load the CEB Testing Program into the Arduino using the Upload Button in File / Upload to I/O Board
# Download the Python-based <html><a href = "https://docs.google.com/viewer?a=v&pid=explorer&chrome=true&srcid=0B2ZOu2AF-TF5MTgzMjM1MjgtYzQwMS00ODQ5LTlkMTgtYjg3YmI1NzRkNmY0&hl=en_US">Arduino Testing Program</a></html>
# Open the Python-based <html><a href = "https://docs.google.com/viewer?a=v&pid=explorer&chrome=true&srcid=0B2ZOu2AF-TF5MTgzMjM1MjgtYzQwMS00ODQ5LTlkMTgtYjg3YmI1NzRkNmY0&hl=en_US">Arduino Testing Program</a></html>
##Run python code in Terminal - python CEB_Testing.py
##You may need to install python-imaging, python-imaging-tk, python-serial, arduino and avrdude in Linux to make it work
##Try this command in Debian-Based Linux Distros such as Ubuntu: sudo apt-get install python-imaging python-imaging-tk python-serial arduino avrdude
##You may need to install <html><a href = "http://arduino.cc/en/Main/Software">Arduino for Windows</a>,&nbsp;<a href = "http://www.pythonware.com/products/pil/">PIL</a> and <a href = "http://pypi.python.org/pypi/pyserial"> Pyserial</a> if you are using Windows.</html>
##If you are using a Mac, I have no idea what you'll have to do.
# Connect to the Arduino using the GUI button
#'''Arduino - Testing''' - Click the Blink Test Button to Check if the Arduino is working.  LED 13 should blink on and off.
# 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.
# Click the MOSFET Testing Buttons.  The green LEDs on the MOSFET should blink on and off accordingly.
#'''Solenoid Connections'''  - Cut five 2’ pieces of 16-gauge black wire and five 2’ pieces of 16-gauge red wire.
# Strip ¼” off each of the five black and five red wires.
# Tin the ends of each of the wires.
# Attach black wires to each of the negative terminals of the MOSFET connectors on the Detroit Fab-Lab board.
# Attach red wires to each of the positive terminals of the MOSFET connectors on the Detroit Fab-Lab Board.
# Run the black and red wires through an available hole in the Electronics Box.(Should we use the left-side hole for this???)
# When all wires have been checked, tighten each of the cable clamps.
#'''Solenoid Testing''' - Remove the bridge connector between the Common Ports of each solenoid unit.
# 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
# Double-check the connections!
# 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:
 
[[Image:conttesterrors.jpg|500px]]


==Previous Versions==
==Previous Versions==
Line 203: Line 87:
[[Category: CEB Press]]
[[Category: CEB Press]]
[[Category:CEB Press Fabrication]]
[[Category:CEB Press Fabrication]]
==See Also==
*[[Terminal Block]] - replacing screw platform in these instructions
*[[CEB_Press/Pictures_of_Newest_Controller|Pictures of Newest Controller]] - these pictures are of a controller box that is newer than the one described here

Latest revision as of 02:20, 17 February 2017

The CEB Press's controller box houses the switches and electronics that are used to operate the hudraulics of the CEB Press and to process data from sensors on the machine.

Video

Tools

  • Straight Pattern Tin Snips
  • Wire Strippers Compatible with 18 and 22 Gauge
  • Crimpers
  • 2.3mm Flathead Screwdriver
  • Screwdriver with Number 2 Philips Bit
  • Needlenose Pliers
  • Measuring Tape

Materials

  • Case

Assembly Instructions

  • [2] Sensor Units

Assembly Instructions

  • Solenoid Driver v2

Assembly Instructions

  • 18 Gauge Red Wire
  • 18 Gauge Black Wire
  • Ring Insulated Connector with Small Hole for 10-12 Gauge
  • [14] Ring Insulated Connectors for 10-12 Gauge
  • [6] Ring Insulated Connectors for 14-16 Gauge

Steps

  • Mount the solenoid driver on top of the Arduino microcontroller.
  • Using the tin snips, cut 6 pieces of 20cm black wire, 2 pieces of 20cm red wire, 5 pieces of 1.5m black wire, and 1 piece of 1.5m red wire.
  • Using the wire strippers at 22 gauge, strip half a centimetre at one end of the 6 pieces of 20cm black wire and 1 piece of 20cm red wire.
  • Using the wire strippers at 18 gauge, strip a centimetre at the other ends of the 6 pieces of 20cm black wire and the 1 piece of 20cm red wire, as well as both ends of the other 1 piece of 20cm red wire, the 5 pieces of 1.5m black wire, and the 1 piece of 1.5m red wire.
  • Using the crimper, crimp the 10 to 12 gauge ring insulated connector at one of the 1 centimetre stripped ends of the 6 pieces of 20cm black wire, the 2 pieces of 20cm red wire, the 5 pieces of 1.5m black wire, and the 1 piece of 1.5m red wire.

Also crimp the 10 to 12 gauge small hole ring insulated connector at the remaining 1cm end of the 20cm red wire and crimp the 14 to 16 gauge ring connector to the remaining 1cm ends of the 5 pieces of 1.5m black wire and 1 piece of 1.5m red wire.

  • Using the screwdriver with the number 2 philips bit, connect the small ring end of the 20cm red wire to the remaining power switch terminal.
  • Insert the large ring end of the 6 1.5m wires through the bottom-middle hole of the lug box.
  • Using the screwdriver with the number 2 philips bit, connect the large ring end of the 1.5m red wire, the remaining ring end of the switch-connected 20cm red wire, and the ring end of the other 20cm red wire to the bottom-left screw of the terminal platform.
  • Connect the large ring end of the 5 1.5m black wires and the ring end of 5 20cm black wires to the top 5 screws of the terminal platform. Then connect the ring end of the remaining 20cm black wire to the bottom-right screw of the terminal platform.
  • Using the flathead screwdriver, connect the half centimetre ends of the 6 pieces of 20cm black wire to the lower terminal of the 5 mosfet terminal blocks, and the left terminal of the power terminal block. Note that the mosfet connections from left to right on the terminal platform should go from bottom to top on the solenoid driver. Also connect the half centimetre end of the 1 piece of 20cm red wire to the right terminal of the power terminal block.
  • Insert the 2 sensor units by their wire end into the right-bottom hole of the lug box.
  • Using the flathead screwdriver, connect the bluewhite wires, orange wires, and blue wires into the top, middle, and bottom terminal blocks, respectively, on the right side of the solenoid driver.
  • Using the screwdriver with the number 2 philips bit, screw-tighten the wire clamp at the right-bottom hole of the lug box.

Previous Versions

Future Versions

See Also