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

From Open Source Ecology
Jump to navigation Jump to search
(moved sensor unit making instructions to its own page)
Line 170: Line 170:
**Terminal in electrical outlet box cut in half on metal cutoff saw to create + and - terminals
**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
**Plastic mount on bottom of electrical box was shaved to allow 2 solenoid drivers to fit
===Sensor Fabrication and Attachment===
[[Image:sensorfab1.png|thumb|Step 1. Start with potting compound, 2 parts.]]
[[Image:sensorfab2.png|Step 2. Take one Hall Effect sensor.]]
Fabricate the Sensors
#Cut three 3’ sections of Underground Telephone Cable.
#Strip about 3” of the outer covering off each end of the three sections
#Strip about ¼” off the orange, blue and blue-white wires at each end of each section.
#Tin the ends of the all of the wires on all of the sections
#Splice, with Solder, about 6” of the inner strands of some Cat-5 Cable (E17) to the wires at one end of each of the sections of Underground Telephone Cable
#Thread shrink-wrap (E28) to the three wires on the other end of each of the three sections of Underground Telephone Cable.
#Solder a Hall Effect Sensor (E20) to one endof the ther sections (pins numbered from left to right)
##Pin 1: Orange
##Pin 2:  Blue-White
##Pin 3: Blue
#Shrink the Shrink-Wrap around each of the solder joints
#Cut three 3” sections of PVC Pipe (E15).
#Place a section of Pipe around each of the three hall effect sensors and encase them in Potting Compound (E29) with the Pipe Caps (E16) in place.


Attach the Sensors
Attach the Sensors

Revision as of 06:11, 5 September 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

Wiring Instructions

The CEB controller involves the following wiring:

  • Battery power cord/Fuse/Switch
  • Arduino/Breakout Board/Solenoid Driver sandwich
  • Circuit board power – solenoid driver and Arduino power connections
  • Sensor connections
  • Solenoid driver power outputs to solenoids
  • Solenoid connections

Note: Reversing the polarity on the power input to the solenoid driver has been shown to fry the solenoid driver board. Other damage may also occur by incorrect connection.


Battery Power

Fig. 1. Battery connection.
Fig. 2. CEB controller v2.0 (2011).
Fig. 3. Hydraulic solenoid valve.
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).

The circuit schematic of the Solenoid Driver Board is shown in Fig. 13, and the Bill of Materials here - File:Driverbom.odt. This is care of Blair Evans of the Detroit Fab Lab.

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.

Sensor Connections

The sensor connections are color coded: blue is the sensor input, blue/white is ground, and orange is 5V.

When looking at the Hall Effect Senor chip (now encapsulated) from the front (front is the side with the writing), the left pin is 5V (orange), the middle pin is ground (blue/white), and the right pin is the sensor input (blue). The pull-up resistor (10k on the Detroit Fab Lab solenoid driver board, already included on the driver board) is connected between the 5V and sensor input terminals.

To connect the sensors, use the terminals on the breakout board to make the connections. Use the Analog 0 (A0) and Analog 1 (A1) pins on the breakout board to connect to the main cylinder and secondary cylinder sensor inputs, respectively. Note: the 3rd sensor (soil shaker) is optional, and it will not be used here. Connect the sensor 5V connections to the corresponding terminals on the breakout board, and connect the grounds to the corresponding breakout board terminals as well. The sensor connections should look like that shown in Fig. 16.

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:

Conttesterrors.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

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, A1 and A2 on the Breakout Shield.

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

Previous Versions

Future Versions