CEB Press Control Code

=Overview=

The Compressed Earth Brick Press operation is automated using a microcontroller.

Code is uploaded to the microcontroller and the microcontroller saves the code; when the microcontroller is turned on, it will run the saved code to control the other CEB Press electronics; the CEB Press operation code is written to loop so that the operator does not need to reset the microcontroller for each brick.

The code commands the microcontroller to send digital signals to the solenoid driver, which powers the hydraulic solenoid valves. The hydraulic solenoid valves open hydraulic flow to the hydraulic cylinders for motion.

=Regular Operation (Continuously Press Bricks)=


 * Download the Operation Code File. This file contains the code that you will upload to the Arduino microcontroller. (Right-click the link and choose Save Link As. After downloading, ensure that the file extension is .ino. If not, rename the file. This file can also be used with older versions of Arduino IDE by changine extension to .pde.)'''

http://opensourceecology.org/wiki/File:CEBControl.ino


 * Upload the Code to the Arduino Microcontroller. The steps are explained in the following link.

http://opensourceecology.org/wiki/CEB_Press/Manufacturing_Instructions/Code_Upload


 * Power Off the CEB Press Electronics. Turning off the power to the microcontroller and solenoid driver ensures that the hydraulic solenoid valves are not activated when turning on hydraulic flow. You can do this by disconnecting the CEB electronics from both the battery and the computer.


 * Perform CEB Press Area Safety Check. Ensure that no unintended objects are in or around the CEB Press area.


 * Turn On Hydraulic Flow. Because the hydraulic solenoid valves are not activated, they will be in their neutral, open position, which allows the hydraulic fluid to directly return to the pump. '''If you experience operation problems, disconnect the CEB Press electronics from the battery or shut off hydraulic flow.


 * Power On the CEB Press Electronics. Connect the battery to the CEB Press Electronics. The microcontroller's LEDs should light up to show that the code is running. The solenoid driver's LEDs should light up to show which direction the hydraulic solenoid valves are being powered, if any.


 * Check Proper CEB Press Operation. Look at the motion of the CEB Press and ensure that the soil loading, soil compression, and brick ejection movements are correct. Note that the CEB Press has an initialization sequence that is not part of the operation loop.


 * Load Soil. Safely dump soil into the CEB Press hopper. You may want to view the CEB Press operation from the top of the hopper to check whether the soil is loading into the soil drawer; observe safely.


 * Check Compression Pressure. Observe the reading on the hydraulic pressure gauge during the compression. The value should be at least 2000 psi.


 * Check Compressed Earth Brick. Check the physical characteristics of the brick. Ensure that the brick is not warped (ex. curved).

=Testing (Use a computer interface to control the solenoid valves independently)=


 * Download the Testing Code File. This file contains the code that you will upload to the Arduino microcontroller. (Right-click the link and choose Save Link As. After downloading, ensure that the file extension is .ino. If not, rename the file)

http://opensourceecology.org/wiki/File:CEBTesting.ino


 * Upload the Testing Code to the Arduino Microcontroller. The steps are explained in the following link.

http://opensourceecology.org/wiki/CEB_Press/Manufacturing_Instructions/Code_Upload


 * Download the Testing Interface Code File. This file contains the code that you will run in a Python interpreter. (Go to the openpario link, click on the file, then click download. After downloading, ensure that the file extension is .py. If not, rename the file)

If you are using Arduino Uno, go to the following webpage and download the CEBTestingV2Uno.py file:

http://openpario.net/documents/1261

If you are using Arduino Duemilanove, go to the following webpage and download the CEBTestingV2.py file:

http://openpario.net/documents/1260


 * Open the Testing Interface. This consists of running the Testing Code in a python interpreter.

For Linux users, open terminal and navigate in terminal to the folder containing the Testing Interface Code File. Then type python CEBTestingV2.py (Uno) or python CEBTestingV2.py (Duemilanove). The graphical user interface should pop up in a new window.

For Windows users,

For Mac users,


 * Power On the CEB Press Electronics. Connect the battery to the CEB Press Electronics. The microcontroller's LEDs should light up to show that the code is running.


 * Connect to the Microcontroller. In the Interface Window, click Open Connection. Click other buttons to test the CEB Press.

Mosfet C11: starts the shaker

Mosfet C10: moves the drawer right

Mosfet C9: moves the drawer left

Mosfet C6: moves the pressfoot up

Mosfet C3 moves the pressfoot down

Sensors: lights the sensor LEDs on the solenoid driver board when you move a magnet around the sensors

LED Blink: lights the sensor LEDs on the solenoid driver board intermittently

Note: see the annotations within the code using a text editor for more details on the testing procedure

Note: look for the LEDs of the solenoid driver board and of the solenoid valves lighting up as you click on the relevant buttons within the GUI.


 * Perform CEB Press Area Safety Check. Ensure that no unintended objects are in or around the CEB Press area.


 * Turn On Hydraulic Flow. Because the hydraulic solenoid valves are not activated, they will be in their neutral, open position, which allows the hydraulic fluid to directly return to the pump. If you experience control problems, disconnect the CEB Press electronics from the battery or shut off hydraulic flow.


 * Check Proper CEB Press Operation. Look at the motion of the CEB Press and ensure that Interface commands cause the correct CEB Press movements.