Team:IISc-Bangalore/Hardware/Design

Assembly Instructions


GCODe Mini


Parts list

Part Quantity Cost
Black Acrylic (laser cut) 2x1 feet 5$
GCODe Mini PCB 1
1cm corner bends 8
5mmx2cm bolts, nuts 16
3mmx1cm bolts, nuts 12
3mm washers 10
Red, Black single-strand wire 20cm each
HUDZ 5V Buzzer 1
47E resistor 1
1k resistor 2
3.3k resistor 1
10k resistor 2
100k resistor 1
1 uF electrolytic capacitor 1
3/8" square staggered lead variable resistor: 10k 1

0.1” side-entry screw terminal block: 2-pin

4

5mm red LED

1

BPW34 photodiode

1

Male pin headers

32

Arduino Uno

1

1.5m USB B cable

1

You’ll also need two flat-tip screwdrivers (5mm and 2mm long tips), some pliers, a soldering iron, and some solder flux.


Steps

Get the code

Download and unzip this Google Drive folder: [[1]]


Protip: Hit “Download All” to get the whole folder at once


image19.png


We will call the folder to which you extract this as the “Code” folder.


image12.png


Arduino code upload

First, we’ll have to upload the code to the Arduino, because the PCB will damage the Arduino board1 if this is not done first.


  1. Obtain the Arduino IDE for your OS (Windows/Linux2) from [[2]]. Don’t worry, it’s not scary like some other IDEs.

image16.png


  1. Install it. (Mostly involves hitting next)
  2. In your Code folder, open the GCODe_Mini_Setup.ino file in the folder of the same name.
  3. Double-click it to open it in the Arduino IDE.
  4. Connect the Arduino Uno to your PC using the USB cable.
  5. Ensure that the device is selected under Tools->Port. If it hasn’t, just click on it to select it.

image2.png


  1. Hit the upload button image13.png.
  2. When it’s done uploading, you can disconnect your Arduino.

Assembly

  1. Break the PCB and solder the parts. Pay attention to the polarity of the LED and photodiode. It’s been marked out in the silk screen (white) and in copper (raised and kinda silvery)
  2. Lay your parts out

image3.jpg


  1. Attach the LED and photodiode PCBs here

image14.jpg


image1.jpg


image18.jpg


(don’t attach the wires yet - we will attach them at a later step)


  1. Attach 10 cm of wire to each terminal: red to + and black to -

image5.jpg


  1. Attach the Arduino Uno to this piece using the 3mm nuts and bolts. If it doesn’t seem to align, try flipping the black plate around.

image20.jpg


image9.jpg


  1. Attach the PCB to the Uno

image6.jpg


image17.jpg


  1. Assemble the optical chamber

image4.jpg


  1. Connect the wires from the LED and photodiode to the screw terminals on the PCB marked “LED” and “PD” respectively, and make sure to get the polarity right here too. Red is + and black is -

image10.jpg


  1. Attach the optical chamber to the faceplate with a hole (in this orientation). Then attach the test-tube holder plate to it. Finally attach one of the wider plates to the right, with L-bends.

image8.jpg


  1. Attach the remaining faceplates

image11.jpg


  1. Put the lid on, and your GCode Mini is complete!

image15.jpg


Gain Adjustment

  1. Make sure your GCODe is connected to your PC.
  2. Open up the Arduino IDE
  3. Open the serial plotter (Ctrl+Shift+L). You may have to set the port again (under Tools->Port)
  4. Rotate the variable resistor (the blue cuboid on the PCB) using a screwdriver until your graph looks like this (yellow line should saturate at about 700).
  • If the wiggly line only stays above 900, you probably flipped the polarity on the photodiode.
  • If the wiggly line basically stays at 0, you have probably misconnected the photodiode wires.
  • If it doesn’t oscillate with the straight line, you have probably either flipped the polarity on the LED, or haven’t connected the wires properly.
  1. When you’re done with the calibration above, open the GCODe_Mini_User_0.3.ino file in the folder of the same name
  2. Hit the upload button image13.png

image22.png


Software

Get your Pushbullet access token

We use Pushbullet to send notifications to your device.


  1. Sign up for an account at [[3]].
  2. We need a Pushbullet access token; so log in and go to [[4]], and scroll down until you see:

image7.png


  1. Hit “Create Access Token” and then copy the text in the black box somewhere.

Installation on Ubuntu

  1. Open the Code folder, right click in a blank corner, and hit “Open in terminal” (Or you could navigate to that location using the terminal)
  2. Run:

chmod u+x ./install_gcode_mini_ubuntu.sh


sudo -H ./install_gcode_mini_ubuntu.sh


  1. Connect the mini to the PC
  2. Double-click the “GCODe Mini GUI Ubuntu” file
  3. Paste the access token you obtained in the previous section and hit next:

image21.png


  1. Click on the device name in the device selection screen and hit next. It might take a while in the first run.
  1. The internal 3.3v is connected directly to the AREF pin on the PCB. This is to minimise the influence of voltage fluctuations on the USB port - USB isn’t supposed to give clean 5V to anyone. We elected not to connect it in a “safe” manner because that could cause variations on the AREF, which will make the readings bad.
  2. We haven’t tested our software on Mac yet. No reason why the hardware shouldn’t work though.