Contents
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
We will call the folder to which you extract this as the “Code” folder.
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.
- Obtain the Arduino IDE for your OS (Windows/Linux2) from [[2]]. Don’t worry, it’s not scary like some other IDEs.
- Install it. (Mostly involves hitting next)
- In your Code folder, open the GCODe_Mini_Setup.ino file in the folder of the same name.
- Double-click it to open it in the Arduino IDE.
- Connect the Arduino Uno to your PC using the USB cable.
- Ensure that the device is selected under Tools->Port. If it hasn’t, just click on it to select it.
- Hit the upload button image13.png.
- When it’s done uploading, you can disconnect your Arduino.
Assembly
- 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)
- Lay your parts out
- Attach the LED and photodiode PCBs here
(don’t attach the wires yet - we will attach them at a later step)
- Attach 10 cm of wire to each terminal: red to + and black to -
- 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.
- Attach the PCB to the Uno
- Assemble the optical chamber
- 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 -
- 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.
- Attach the remaining faceplates
- Put the lid on, and your GCode Mini is complete!
Gain Adjustment
- Make sure your GCODe is connected to your PC.
- Open up the Arduino IDE
- Open the serial plotter (Ctrl+Shift+L). You may have to set the port again (under Tools->Port)
- 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.
- When you’re done with the calibration above, open the GCODe_Mini_User_0.3.ino file in the folder of the same name
- Hit the upload button image13.png
Software
Get your Pushbullet access token
We use Pushbullet to send notifications to your device.
- Sign up for an account at [[3]].
- We need a Pushbullet access token; so log in and go to [[4]], and scroll down until you see:
- Hit “Create Access Token” and then copy the text in the black box somewhere.
Installation on Ubuntu
- 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)
- Run:
chmod u+x ./install_gcode_mini_ubuntu.sh
sudo -H ./install_gcode_mini_ubuntu.sh
- Connect the mini to the PC
- Double-click the “GCODe Mini GUI Ubuntu” file
- Paste the access token you obtained in the previous section and hit next:
- Click on the device name in the device selection screen and hit next. It might take a while in the first run.
- 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.
- We haven’t tested our software on Mac yet. No reason why the hardware shouldn’t work though.