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

From Open Source Ecology
Jump to navigation Jump to search
No edit summary
No edit summary
Line 87: Line 87:
##You may need to install python-imaging, python-imaging-tk, python-serial, arduino and avrdude in Linux to make it work
##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
##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://www.pythonware.com/products/pil/">PIL</a> and <a href = Pyserial if you are using Windows
##You may need to install <html><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.
##If you are using a Mac, I have no idea what you'll have to do.
##If you are using a Mac, I have no idea what you'll have to do.
# Connect to the Arduino using the GUI button
# Connect to the Arduino using the GUI button

Revision as of 17:21, 11 August 2011

Ceb-controller.jpg


Tools Required

  • Wire Cutters
  • Soldering Iron Kit
  • PC
  • Hand Drill
  • Wire Crimper Cutter

Materials Required

Cutlerhammerbox.jpg
Breakout Shield & Arduino
PWM Driver
  • Outdoor Main Lug Box - 125Amp, 2Spaces, 4Circuits, 1Phase, 3Wire, 120/240VAC
  • Extension Cord
  • Alligator clips (2)
  • Home wiring box [1]
  • Fuse holder - 30Amp Inline Mini Blade-Type Buy
  • 12v quick connect plugs (5 pairs)
  • Stranded 5A wire ?
  • Spade terminals (10)
  • Underground phone cable
  • Potting compound Buy
  • PVC pipe
  • PVC pipe cap
  • Stranded Cat 5 cable
  • Supermagnets (6) - N42 Buy
  • Arduino (Duemilanove) Buy
  • MOSFET replacements (5) - Single 35A 70V 0.028Ω TO-220-3 Buy Buy
  • Hall Effect sensors (2) - US1881 TO-92 Buy
  • 3/8" V-groove bearings (4) Buy
  • Molex connector Buy Buy Buy


Sub-project Materials

Diagrams

Controllerbox.jpg

Fabrication Steps

  • Assemble entire Control Box
    • Blue spacer box - Arduino attached on top with 2 small screws. Slightly slanted attachment to make screw holes fit on blue spacer box
    • Terminal in electrical outlet box cut in half on metal cutoff saw to create + and - terminals
    • Plastic mount on bottom of electrical box was shaved to allow 2 solenoid drivers to fit


Test 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 PIL and Pyserial if you are using Windows. ##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 Testing Procedure

      =
  • Test sensors by passing magnets over them. See this sample code.
    • Data Sheet
    • Supply voltage is 5V from the Arduino breakout shield
    • The pins are +,-, OUT reading from top (printed / smaller face)
    • The output is "Open Drain" - this means you need a "pull up" resistor on the output (10K connected to +)
    • This model is "latching" which means it turns on from one pole, and off by the other, remembering its state in the meantime.

Controller checklist (ie, So you don't burn your components, check these):

  1. Arduino powers on with USB cord? Check.
  2. Arduino works - ex. blink Channel 13 with an LED? Check. Atmega 328 Duemilanove - on Ubuntu 10.04.
  3. Controller main power switch light red when battery is connected and switch is turned on? Check.
  4. With Molex connectors disconnected, 12V appears at pins 1 and 2?
  5. With Molex connectors plugged into solenoid driver boards, main power switch turns the drivers on?
  6. Arduino powers on with battery supply after flipping main switch on?
  7. Solenoid drivers are turned on with main switch?
  8. Solenoids turn all of their MOSFETS as seen via indicator lights?
  9. Solenoids can cycle the solenoid valves?

C


  • Test solenoid valves by attaching power to battery and running this sample code for 2 solenoid channels.
    • Note we can reduce 3 solenoid channels to 2 by running both the shaker motor and the drawer cylinder from the same channel - the shaker is activated at every stroke of the drawer, as there is ample hydraulic fluid flow available in that part of the overall CEB operation cycle.

other pages with info that should end up on this page

Merge icon.png It has been suggested that the text on [[::CEB_Automation_Prototype_II|CEB_Automation_Prototype_II]] be merged into (added to) this page or section. (Discuss)

Merge icon.png It has been suggested that the text on [[::Arduino_Control_of_CEB_Prototype_2|Arduino_Control_of_CEB_Prototype_2]] be merged into (added to) this page or section. (Discuss)

Merge icon.png It has been suggested that the text on [[::FeF_Liberator_Fabrication|FeF_Liberator_Fabrication]] be merged into (added to) this page or section. (Discuss)