Device construction

A project log for WorkoutAid

A Trinket powered wireless user interface for multimedia and workout tracking.

mikeneiderhausermikeneiderhauser 01/03/2015 at 01:120 Comments

I just wanted to detail the construction of the portable device.

For all point to point connections, see the schematic. For the most part.. Just build the schematic. Note. The button wiring may be different in the finished device, but this can easily be changed in the firmware.

Please see this Imgur Album for pictures of the construction process and the finished device.

  1. Dry-fit enclosure and determine part placement.
    1. Make sure everything will fit inside
  2. Layout front panel
    1. I masked the front with Blue tape to aid in layout and cutting
  3. Cut front panel
    1. Dremel anyone?
  4. Create button board
    1. Place / Solder / Wire 6 buttons with a common pin (ground) and then solder 6 lengths of wire with one connected to each button
    2. Solder the power switch in place
    3. Solder 2 lengths of wire to the power switch
      1. Add a pin header socket to the 2 wire leads (after cutting to length)
  5. Mount button board
    1. I used hot glue. Make sure the buttons do not short on the tin
  6. Wire / Mount OLED Screen
    1. Solder 7 lengths of wire to the OLED Screen (SPI mode).
    2. Make hot glue 'risers' for the OLED Screen
      1. should allow me to easily remove the screen if / when needed
    3. Mount the screen to the risers
  7. Connect button panel to MC14490P
    1. I make a PCB with a socket to add connection points, but this can be avoided by directly soldering to the chip.
  8. Make connection board for Trinket Pro
    1. The connection board had the LDO Regulator mounted near the USB jack. This prevented me from having to wire it elsewhere. Having the connection board allowed me to easily connect the various lengths of wire from various components to the Trinket Pro. It also makes the Trinket Pro reusable / removable.
  9. Power Bar
    1. I added a common power bar to make routing power easier. The power bar connects to the output of the LDO Regulator and then connects to the various componets. The Trinket Pro has its own 3.3V regluator so this LDO was only powering the MC4490P, OLED, RN42XV, and the MAX17043.
  10. Add the MAX17043.
    1. I removed the JST connector to make the board smaller.
    2. I then cut the power trace to the IC from the battery and powered the IC via the power bar.
    3. Connect the battery connection points on the Trinket Pro connection board to the IC
    4. Connect VCC and GND of the IC to the power bar (3.3v)
    5. Connect the SDA and SCL lines to the Trinket Pro
    6. Pictures
  11. Connect the MCP14490P and OLED to Trinket Pro connection board
  12. Draw 4 wires (TX,RX,VCC,GND) to an Xbee header to easily connect the RN42XV
    1. Connect TX and RX to RX and TX of the Trinket Pro
  13. Connect the Power Switch
  14. Connect the Battery
  15. Fit all parts into case
    1. Make sure nothing shorts. If you are unsure, use electrical or other insulating tape.
  16. Power on
  17. Connect via USB
  18. Compile and upload firmware to the Trinket Pro
    1. Follow Adafruit's Tutorial for more Trinket Pro related Getting Started Items
    2. Download required libraries and install them to the Arduino IDE
      1. See GitHub for links to libs
  19. Enable Spotify Broadcasts in the Android Spotify app
    1. Navigate to the Spotify App settings and enable the 'Device Broadcast Status'
  20. Loading the App
    1. Put your Android device into Developer Mode (Google search.. may be different per device) and enable USB Debugging (You will need drivers). This option is found in Settings->Developer options
    2. In Setting->Security check the Allow install of apps from unknown sources
    3. Load the project from GitHub into Android Studio and upload to the device
      1. Don't for get to change the Bluetooth MAC Address (Background Service?)
  21. Device auto connects and you should be good to go.