Design Like a Physicist
Physics 398DLP, Fall 2018
Loomis 276, Friday afternoons, 1 pm - 5 pm
3 credit hours
Code and design resource repository
Physics 398DLP data logger and GG's sample Arduino code for various devices
- ✯ GG's data logger schematic, latest version
- ✯ 16 x 2 LCD code
- ✯ 4 x 3 keypad code
- ✯ MCP4725 DAC code
- ✯ ADXL326 accelerometer calibration code
- ✯ microSD card read/write (plain text) code
- ✯ 32 kHz audio recording to binary file code, now corrected for output buffer overwrite-related problem (needs keypad and LCD
- ✯ 32 kHz audio recording to binary file AND read/report the temperature read from a BME680 (Arduino code that needs keypad and LCD)
- ✯ 32 kHz audio recording to binary file AND read/report BME680 readings, with VOC gas measurement disabled. (Runs faster this way!)
- ✯ Read temperature, pressure, and humidity from a BME680, but disable the volatile organic compounds gas measurement. This runs considerably faster than a version in which the gas measurements are performed.
- ✯ Python code to read an Arduino binary audio file and (optionally) write a WAV format version. I include a short snippet of the Rolling Stones recorded by my Arduino for you to practice with. Note: if your laptop complains of memory errors, try reducing the value of max_buffers from its current (very large!) value of 50,000,000.
- ✯ Arduino code to read from the GPS breakout board and set the real time clock from the GPS clock. You may want to change the program's insistence on having you enter year, month, day information from the serial monitor.
- ✯ Much better Arduino code to set the real time clock from the GPS clock. Use this program instead of the older version, above. I think it'll synchronize your DS3231 RTC so that it is within about two milliseconds of the GPS system's clock. You will need to have connected the GPS board's PPS pin to the Arduino's D43. (That requires a wire that's about a half-inch long to be soldered onto your PCB. It's a very simple patch.) The program will wait until your GPS device sees satellites, though, so do this outdoors, or someplace where there's a decent GPS signal.
- ✯ EAGLE circuit design files
- ✯ GG's Arduino code to read various sensors, taking keypad input from the user. Available functions are these:
- ⚛noop (no operation) = ✳NOO# = ✳666#
- ⚛display Real Time Clock value = ✳RTC# = ✳782#
- ⚛display ax, ay, az = ✳ACC# = ✳222#
- ⚛display battery voltage and current = ✳BAT# = ✳228#
- ⚛measure audio power, 1 second duration = ✳AUD# = ✳283#
- ⚛display GPS information = ✳GPS# = ✳477#
- ⚛display temperature = ✳T# = ✳8#
- ⚛display pressure = ✳P# = ✳7#
- ⚛display (relative) humidity = ✳H# = ✳4#
- ⚛display VOC reading = ✳VOC# = ✳862#
- ⚛display infrared sensor temperature = ✳IR# = ✳47#
- ⚛calibrate ax, ay, az = ✳CAL# = ✳225#
- ⚛play audio tones based on keypad selection = ✳MUS# = ✳687#
- ⚛send help information to LCD = ✳000# = ✳000#
- ⚛altitude above sea level = ✳A# = ✳2#
- ⚛laser range finder distance (mm) = ✳D# = *3#
- ⚛repeat last command = ✳# = *#
- ✯ Arduino website
- ✯ Arduino programming language reference
- ✯ Arduino programming language libraries
- ✯ Arduino Mega 2560 schematic
- ✯ Atmel 2560 manual
- ✯ p398DLP_UM2plus_set_nozzle.curaprofile: Cura 3.5.1 settings profile. Download and use this for a Cura slicing with a UM2+ target machine.
- ✯ Cura 3.5.1 settings I use for an Ultimaker 2+ 3D printer (a PDF file of screen shots). I find that poor adhesion of the PLA (poly lactic acid) plastic to the printer's glass build plate is the principal difficulty to be overcome. Here's what works for me: (1) Keep the glass build plate scrupulously clean, and wipe it down with 70% isopropyl alcohol (ordinary rubbing alcohol, which is a 70-30 mix of alcohol and water) before each print job. The water content is important, since there'll probably be a 100 nm thick layer of water that adsorbs to the glass surface when you wipe it down. Pure isopropanol will strip this away, and you won't have all those helpful hydrogen bonds from the water to hold the plastic to the glass. (2) Don't apply glue, masking tape, or any of the other suggested toppings you might read about (chocolate sprinkles?) to the glass. (3) Do a quick adhesion test, using this STL file, which you'll need to turn into gcode. It runs in a little less than 9 minutes on an Ultimaker 2+ with a 0.6 mm nozzle if you load the Cura 3.5.1 profile p398DLP_UM2plus_test_no_brim.curaprofile first. (4) Adjust the nozzle and build plate temperature. I find that dark colors of PLA require higher temperatures than light colors. Black, for example, works nicely with a 235°C nozzle and 65°C build plate.
- ✯ Cura 3.5.1 profile for Ultimaker 2 (not 2+)
- ✯ Cura 3.5.1 profile for adhesion tests with Ultimaker 2 (not 2+)
- ✯ Cura 3.5.1 profile for Ultimaker 2+
- ✯ Cura 3.5.1 profile for adhesion tests with Ultimaker 2+
- ✯ Breadboarding guide
- ✯ Adafruit Industries website
- ✯ CrystalFontz LCD
- ✯ Adafruit tutorial for their microSD breakout board
- ✯ DS3231 real time clock
- ✯ Bosch BME680 temperature, pressure, humidity, volatile organic compounds sensor
- ✯ GPS module data sheet
- ✯ GPS NMEA command description
- ✯ More GPS information
- ✯ Texas Instruments HDC1000 humidity and temperature sensor
- ✯ Melexis MLX 90614 IR thermometer
- ✯ Maxim microphone preamplifiers
- ✯ Microchip MCP4725 12-bit digital-to-analog converter