CEB Press/Manufacturing Instructions/Code Upload: Difference between revisions

From Open Source Ecology
Jump to navigation Jump to search
 
(15 intermediate revisions by 2 users not shown)
Line 5: Line 5:
*USB Cable
*USB Cable


*CEB Press
*CEB Press Electronics


=Software=
=Software=
Line 13: Line 13:
http://www.arduino.cc/en/Main/software
http://www.arduino.cc/en/Main/software


==4 Compatibilizing Arduino IDE for Ubuntu 10.04 LTS==
*On Ubuntu 12.04, open terminal with '''ctrl + alt + T''' then '''cd FOLDERNAME''' until you reach the folder that contains the "arduino" file, then '''sudo ./arduino''' to open the arduino IDE as a super user (you need to be a super user else the Tools>Serial Port will be greyed out).
 
*[http://blog.markloiseau.com/2012/05/install-arduino-ubuntu/ How to Install Arduino IDE on Ubuntu 12.04]
 
= Compatibilizing Arduino IDE for Ubuntu 10.04 LTS=
 
To run Arduino IDE successfully, you need to make sure that certain software is installed on your computer. For newer versions of Ubuntu, there are guides within the Arduino website.


*The following steps are a summary of the information in this webpage:
*The following steps are a summary of the information in this webpage:
Line 39: Line 45:
*Restart your computer
*Restart your computer


=Code=
=Upload Steps=
 
*CEB Control Code V5 Annotated
 
http://opensourceecology.org/wiki/File:CEBControl.ino
 
(note: .ino is the new Arduino code extension; it used to be .pde)
 
*CEB Testing Code V1 Annotated
 
http://opensourceecology.org/wiki/File:CEBTesting.ino
 
[[Category:CEB_Press]]
=Feedback=
 
Please contact ykang404@gmail.com to report successes or failures.
 
=Steps=
 
Note that you may have to rotate the sensors about their position for the CEB Press to function properly. The hall effect sensors within the sensor units must have the correct orientation with respect to the magnets. Use the CEB Testing Code, python GUI, and Arduino serial monitor to ensure that the sensor is picking up the magnetic field from movement of the magnets.


*Using the computer, open the Arduino Integrated Development Environment
*Using the computer, open the Arduino Integrated Development Environment
Line 70: Line 57:
*Connect the computer to the Arduino microcontroller via the USB cable
*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 Tools > Board and select the Arduino board that you are using (ex. Arduin Uno)
 
*Within the Arduino IDE, click Tools > Serial Port and select the serial port


*Within the Arduino IDE, click Upload and wait for upload completion
*Within the Arduino IDE, click Upload and wait for upload completion


*Disconnect the USB cable from the Arduino microcontroller
*Disconnect the USB cable from the Arduino microcontroller OR if you want to see messages from the Arduino board, click Tools > Serial Monitor and do not disconnect the USB cable.
 
=Contact a Human=


=OLD Testing from Zero=
Yoonseo Kang - ykang404@gmail.com


*Arduino Testing - Preparation
[[Category:CEB_Press]]
*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.

Latest revision as of 04:34, 5 October 2012

Tools

  • Computer
  • USB Cable
  • CEB Press Electronics

Software

  • Arduino Integrated Development Environment

http://www.arduino.cc/en/Main/software

  • On Ubuntu 12.04, open terminal with ctrl + alt + T then cd FOLDERNAME until you reach the folder that contains the "arduino" file, then sudo ./arduino to open the arduino IDE as a super user (you need to be a super user else the Tools>Serial Port will be greyed out).

Compatibilizing Arduino IDE for Ubuntu 10.04 LTS

To run Arduino IDE successfully, you need to make sure that certain software is installed on your computer. For newer versions of Ubuntu, there are guides within the Arduino website.

  • The following steps are a summary of the information in this webpage:

http://www.pluggy.me.uk/arduino-ubuntu/

  • Open System>Administration>Synaptic Package Manager, then type your password
  • In Synaptic Package Manager, search for jre, then mark for installation the item with the following name:

Openjdk-6-jre

  • Note: marking these items will bring up other packages also to be marked. Click "mark" during these times.
  • In Synaptic Package Manager, search for gcc-avr, then mark for installation the item with the following name:

gcc-avr

  • In Synaptic Package Manager, search for avr-libc, then mark for installation the item with the following name:

avr-libc

  • In Synaptic Package Manager, click "Apply"
  • Restart your computer

Upload 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 > Board and select the Arduino board that you are using (ex. Arduin Uno)
  • Within the Arduino IDE, click Tools > Serial Port and select the serial port
  • Within the Arduino IDE, click Upload and wait for upload completion
  • Disconnect the USB cable from the Arduino microcontroller OR if you want to see messages from the Arduino board, click Tools > Serial Monitor and do not disconnect the USB cable.

Contact a Human

Yoonseo Kang - ykang404@gmail.com