CEB Press/Manufacturing Instructions/Code Upload
Jump to navigation
Jump to search
Tools
- Computer
- USB Cable
- CEB Press
Software
- Arduino Integrated Development Environment
http://www.arduino.cc/en/Main/software
Code
- CEB Control Code V5 Annotated
http://opensourceecology.org/wiki/File:CEBControl.ino
Steps
- Using the computer, open the Arduino Integrated Development Environment
- Within the Arduino IDE, click File > Open (a search box should pop up)
- Within the Arduino IDE Search Box, navigate to and click on the .ino file in which the desired code exists, then click Open
- Within the Arduino IDE, click Compile (if compiling failed, fix the code)
- Connect the computer to the Arduino microcontroller via the USB cable
- Within the Arduino IDE, click Tools then check Serial Port for a connection and check Board for the correct microcontroller type selection.
- Within the Arduino IDE, click Upload and wait for upload completion
- Disconnect the USB cable from the Arduino microcontroller
OLD 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 CEB_Testing_Program.pde
- 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 Arduino Testing Program
- Open the Python-based Arduino Testing Program
- 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 Arduino for Windows, 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.