Skip to content

Commit

Permalink
Merge branch 'release/v2.0-beta'
Browse files Browse the repository at this point in the history
  • Loading branch information
laurb9 committed Oct 24, 2016
2 parents 8b32f61 + 086f590 commit 5f73568
Show file tree
Hide file tree
Showing 45 changed files with 1,783 additions and 237 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,7 @@
*.exe
*.out
*.app

# Eclipse
.*project

59 changes: 39 additions & 20 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,52 @@
#
#

ARDUINO := arduino --verbose --preserve-temp-files
ARDUINO := arduino --preserve-temp-files

ifndef board
$(error Usage: make <executor|navigator|panocontroller> board=<teensy31|teensyLC|feather>)
endif

ifeq ($(board),teensy31)
# Teensy 3.1/3.2 target
# Teensy options hardware/teensy/avr/boards.txt
BOARD = teensy:avr:teensy31:usb=serial,keys=en-us,speed=72
PORT = /dev/ttyACM0
endif
ifeq ($(board),teensyLC)
# Teensy LC target
# Teensy options hardware/teensy/avr/boards.txt
BOARD = teensy:avr:teensyLC:usb=serial,keys=en-us,speed=48
PORT = /dev/ttyACM0
endif
ifeq ($(board),feather)
# Adafruit Feather M0
# must be installed with arduino --install-boards "adafruit:samd"
# ~/.arduino15/packages/adafruit/hardware/samd/1.0.13/boards.txt
BOARD = adafruit:samd:adafruit_feather_m0
PORT = /dev/ttyACM0
endif
ifeq ($(board),uno)
# Arduino UNO target
# arduino options hardware/arduino/avr/boards.txt
BOARD = arduino:avr:uno
PORT = /dev/ttyUSB0
endif

# Mac
#ARDUINO := Arduino.app/Contents/MacOS/Arduino --verbose --preserve-temp-files
TMPDIR := /tmp/pano-controller-build

SOURCES := pano-controller.ino *.cpp *.h

#
# Specify which of the below targets to build (default teensyLC)
#
all: teensyLC
LIB_SOURCES = src/*.cpp src/*.h

# Arduino UNO target
# arduino options hardware/arduino/avr/boards.txt
uno: BOARD = arduino:avr:uno
panocontroller: examples/PanoController/PanoController.ino $(LIB_SOURCES) $(TMPDIR)
$(ARDUINO) --upload $< --board $(BOARD) --port $(PORT) --pref build.path=$(TMPDIR)

# Teensy LC target
# Teensy options hardware/teensy/avr/boards.txt
teensyLC: BOARD = teensy:avr:teensyLC

#
# Common rule for building and uploading the project
#
# See https://github.com/arduino/Arduino/blob/ide-1.5.x/build/shared/manpage.adoc
uno teensyLC: $(SOURCES) $(TMPDIR)
$(ARDUINO) --upload $< --board $(BOARD) --pref build.path=$(TMPDIR)
navigator: examples/Navigator/Navigator.ino $(LIB_SOURCES) $(TMPDIR)
$(ARDUINO) --upload $< --board $(BOARD) --port $(PORT) --pref build.path=$(TMPDIR)

executor: examples/Executor/Executor.ino $(LIB_SOURCES) $(TMPDIR)
$(ARDUINO) --upload $< --board $(BOARD) --port $(PORT) --pref build.path=$(TMPDIR)

$(TMPDIR):
mkdir -p $(TMPDIR)
226 changes: 164 additions & 62 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,19 @@ flexible and support home-brew panoramic platforms.

See the <a href="https://www.facebook.com/panocontroller">Official Facebook page</a> for demo videos and more progress photos.

Current state: fully functional prototype board, field-tested, frequently upgraded.
Current state: fully functional two-module prototype boards, field-tested, frequently upgraded. One module (Executor) is installed on the Gigapan platform. The other module
is the radio controller with OLED display (Navigator).

<img src="images/prototype.jpg" width="400" alt="Pano Controller Executor Boards installed in Gigapan EPIC 100">
<img src="images/navigator.jpg" width="400" alt="Pano Controller Remote Navigator Unit">
<img src="images/pano-info.jpg" width="200" alt="Pano Controller Pano Information Screen">

<img src="images/prototype.jpg" width="400" alt="Pano Controller Prototype Board installed in Gigapan EPIC 100">
<img src="images/pano-info.jpg" width="400" alt="Pano Controller Pano Information Screen">

## Features:
### Software
- **<a href="https://www.facebook.com/panocontroller/videos/1009260305834819/">Zero-motion shutter delay!</a>**
When gyro is connected, waits for platform to stabilize before triggering. Useful to compensate for tripod stability, platform's own movement or wind gusts.
- **<a href="https://www.facebook.com/panocontroller/videos/1143955072365341/">Remote Control Demo</a>**
- Focal length presets from 12 to 600mm. Precise sub-degree movement control.
- Seamless 360 pano option
- Display:
Expand All @@ -24,97 +28,191 @@ Current state: fully functional prototype board, field-tested, frequently upgrad
- Precision movement control
- Multiple delay options: pre-shutter and post-shutter, short or long shutter pulse (for bracketing).
- Bluetooth joystick control via phone
- Radio Remote Menu Navigation unit

### Hardware
- 32-bit ARM controller board
- 32-bit ARM controllers (Gigapan had 8-bit AVR)
- OLED 128x64 display
- Joystick menu navigation, optional IR remote
- Radio-controlled joystick menu navigation
- Can operate with battery voltage from 10V down to 6V
- Lower power usage and later voltage cutoff than original Gigapan

## Wiring map

### Teensy LC / 3.x
- A0 - Battery Voltage via divider: Vin---[47K]---A0---[10K]---GND
- A1 - Joystick SW
- A2 - Joystick Vy
- A3 - Joystick Vx
- A4 - SDA - Display and MPU-6050 board
- A5 - SCL - Display and MPU-6050 board
- A6
- A7
- D0/RX - camera focus (active LOW)
- D1/TX - camera shutter (active LOW)
The new modular layout I'm working on needs two controller boards: an Executor unit
installed on the platform, and a radio remote Navigator unit with all the menus and
controls. Both units are needed.

For the previous single-board setup, see release v1.4 (https://github.com/laurb9/pano-controller/tree/v1.4)

Future plans involve replacing the remote Navigator unit with a phone or other
high-level interface device.

### Executor Unit

The execution unit is installed on the rotating platform. Since there are no
buttons here, the display is only used for status info and may eventually go away.

#### Teensy LC / 3.x

Status: Tested with NRF24L01+ radio.
BLE/BLUEFRUIT is not part of the current Executor code.

- A0 - BATTERY - Battery Voltage via divider: Vin---[47K]---A0---[10K]---GND
- A1
- A2
- A3
- A4 - SDA - MPU-6050 board and SSD-1306 Display
- A5 - SCL - MPU-6050 board and SSD-1306 Display
- A6 - NRF24_CE
- A7 - NRF24_CSN
- D0/RX - CAMERA_FOCUS active LOW
- D1/TX - CAMERA_SHUTTER active LOW
- D2 - MPU-6050 INT
- D3(int) - IR Remote In (AX-1838HS)
- D4 - BLE RST
- D5 - DIR (both)
- D6 - StepperV STEP
- D7 - BLE INT
- D8 - BLE CS
- D9 - StepperH STEP
- D10 - ~ENABLE (both)
- D11 - SPI MOSI[BLE]
- D12 - SPI MISO[BLE]
- D13[LED] - SPI SCK[BLE]

### Feather M0 / Bluefruit
- D3
- D4 - (BLUEFRUIT_SPI_RST)
- D5 - DIR
- D6 - VERT_STEP
- D7 - (BLUEFRUIT_SPI_IRQ)
- D8 - (BLUEFRUIT_SPI_CS)
- D9 - HORIZ_STEP
- D10 - nENABLE
- D11 - SPI_MOSI - NRF24 or (BLUEFRUIT)
- D12 - SPI_MISO - NRF24 or (BLUEFRUIT)
- D13 - SPI_SCK - NRF24 or (BLUEFRUIT)

#### Feather M0 / Bluefruit

Status: Not tested. See release v1.4 for functional onboard Feather/BLE.
NRF24 library not working with Feather M0 yet so that's a dead end at the moment.

- A0
- A1 - Joystick SW
- A2 - Joystick Vy
- A3 - Joystick Vx
- A1
- A2
- A3
- A4 - Battery Voltage via divider: Vin---[47K]---A0---[10K]---GND
- A5
- SCK[BLE]
- MOSI[BLE]
- MISO[BLE]
- RX/0 - camera focus (active LOW)
- TX/1 - camera shutter (active LOW)

- A5 - (NRF24_CE)
- SCK - BLE(internal) and NRF24
- MOSI - BLE(internal) and NRF24
- MISO - BLE(internal) and NRF24
- RX/0 - CAMERA_FOCUS active LOW
- TX/1 - CAMERA_SHUTTER active LOW
- 4[BLE] CS (internally connected)
- 7[BLE] IRQ (internally connected)
- 8[BLE] RST (internally connected)

- SDA/20 - Display and MPU-6050 board
- SCL/21 - Display and MPU-6050 board
- 5 - DIR (both)
- 6 - StepperV STEP
- 9[A7] - StepperH STEP
- 10 - ~ENABLE (both)
- 11
- SDA/20 - MPU-6050 board and SSD-1306 Display
- SCL/21 - MPU-6050 board and SSD-1306 Display
- 5 - DIR
- 6 - VERT_STEP
- 9[A7] - HORIZ_STEP
- 10 - nENABLE
- 11 - (NRF24_CSN)
- 12 - MPU-6050 INT
- 13[LED]

### Other
#### All

- Vin is 6-10V
- 3.3V step-down adapter from Vin to Vcc for logic power
- All ~SLEEP tied to Vcc
- All VMOT tied to Vin
- All M1 tied to Vcc (1:32 mode)
- All M0 left unconnected (1:32 mode)
- 3.3V step-down adapter from Vin to Vcc
- All ~ENABLE tied together
- All DIR tied together
- 100uF capacitor at Vin
- 10uF capacitor at Vcc
- 10K pull-up resistor from Vcc to ~ENABLE
- Voltage divider Vin---[47K]---A0---[10K]---GND

### Navigator Remote Control Unit

This is where all the configuration happens. This can sit in your hand while the
platform is perched up on a pole and not physically reachable.

Settings and commands are sent to the Executor unit for execution.

#### Teensy LC / 3.x

Status: Tested with NRF24L01+ radio.
BLE/BLUEFRUIT is not part of the current Navigator code.

- A0
- A1 - Joystick SW
- A2 - Joystick Vy
- A3 - Joystick Vx
- A4 - SDA - SSD-1306 Display
- A5 - SCL - SSD-1306 Display
- A6 - NRF24_CE
- A7 - NRF24_CSN
- D0/RX
- D1/TX
- D2
- D3
- D4 - (BLUEFRUIT_SPI_RST)
- D5
- D6
- D7 - (BLUEFRUIT_SPI_IRQ)
- D8 - (BLUEFRUIT_SPI_CS)
- D9
- D10
- D11 - SPI_MOSI - NRF24 or (BLUEFRUIT)
- D12 - SPI_MISO - NRF24 or (BLUEFRUIT)
- D13 - SPI_SCK - NRF24 or (BLUEFRUIT)

#### Feather M0 / Bluefruit

Status: untested (NRF24 library not working with Feather yet).

- A0
- A1 - Joystick SW
- A2 - Joystick Vy
- A3 - Joystick Vx
- A4
- A5 - NRF24_CE
- SCK - BLE(internal) and NRF24
- MOSI - BLE(internal) and NRF24
- MISO - BLE(internal) and NRF24
- RX/0
- TX/1
- 4[BLE] CS (internally connected)
- 7[BLE] IRQ (internally connected)
- 8[BLE] RST (internally connected)
- SDA/20 - SSD-1306 Display
- SCL/21 - SSD-1306 Display
- 5
- 6
- 9[A7]
- 10
- 11 - NRF24_CSN
- 12
- 13[LED]

#### All

- Vin power from USB or 3.3-5V external battery using Teensy converter
- 10uF capacitor at Vcc

## Notes

- *Atmega328-based boards are not supported*, see issue #57
- IR remote not supported on Adafruit Feather M0, see issue #59
- TWO controllers are needed for the current design. The last single-controller design is release v1.4.
- Settings memory on Feather M0 only works with Bluefruit (M0 has no EEPROM itself)
- Future rewiring plan
- if we ever want to use ESP-12, need to reduce pins. ESP-12 only has 11:
(0,2,4,5,12,13,14,15,16,RXD,TXD,ADC)
- Adafruit Feather M0 BLE uses 4, 7, 8 as Bluefruit RESET, IRQ and CS.
Should use same pinout for connecting to external BLE board (SPI).
- nrf24 library hardcodes pin 13 so if we plan to use it, we'll have to rewire.

<img src="images/breadboard.jpg" width="500" alt="Breadboard setup with Teensy LC">
<img src="images/breadboard.jpg" width="500" alt="Breadboard playing with Feather M0">

## Setting DRV8834 reference
## Setting stepper motor current limit for DRV8834

- Vref0 = 2V +- 0.1V
- Pololu schematic shows Risense = 0.1 ohm
- Itrip = Vref/(5*Risense)
- So set Vref = Itrip/2

### Gigapan EPIC 100

Gigapan motor spec is 1A, so 0.5V. At full step the current limit is 0.7*Itrip, so
we have to set Itrip to 1.4 and Vref to 0.7V as upper bound.

Expand All @@ -131,12 +229,8 @@ lower current even, if we reduce the speed.
- Microcontroller, one of below
- PJRC <a href="http://www.pjrc.com/store/teensylc.html">Teensy LC</a>
- PJRC <a href="http://www.pjrc.com/store/teensy32.html">Teensy 3.1+</a>
- Adafruit <a href="https://learn.adafruit.com/adafruit-feather-m0-basic-proto/">Feather M0</a> (no IR remote)
- Adafruit <a href="https://learn.adafruit.com/adafruit-feather-m0-bluefruit-le/overview">Feather M0 Bluefruit</a> (no IR remote)
- (untested but same Cortex M0 as above) <a href="https://www.adafruit.com/products/2843">Arduino Zero</a>
- 2 x <a href="https://www.pololu.com/product/2134">DRV8834 Low-Voltage Stepper Motor Driver</a> from Pololu
- <a href="http://www.amazon.com/Yellow-Serial-128X64-Display-Arduino/dp/B00O2LLT30">128x64 OLED display, SSD1306 I2C</a> from anywhere
- Adafruit <a href="https://learn.adafruit.com/introducing-the-adafruit-bluefruit-spi-breakout">Bluefruit SPI Breakout</a> (if not onboard) - provides Bluetooth LE 4.1 joystick control - optional
- 2 x <a href="http://www.amazon.com/Yellow-Serial-128X64-Display-Arduino/dp/B00O2LLT30">128x64 OLED display, SSD1306 I2C</a> from anywhere
- 2-axis + switch analog joystick
- 1834HS IR receiver with some remote - optional but recommended
- Remote codes are hardcoded in remote.cpp if you have a different remote
Expand All @@ -150,11 +244,20 @@ lower current even, if we reduce the speed.
- 2-pin power connector/DC power jack
- 6AA battery holder or a 6V-10V power source.

#### Future support planned for

- lack of support for NRF24
- Adafruit <a href="https://learn.adafruit.com/adafruit-feather-m0-basic-proto/">Feather M0</a>
- Adafruit <a href="https://learn.adafruit.com/adafruit-feather-m0-bluefruit-le/overview">Feather M0 Bluefruit</a>
- (untested but same Cortex M0 as above) <a href="https://www.adafruit.com/products/2843">Arduino Zero</a>
- Adafruit <a href="https://learn.adafruit.com/introducing-the-adafruit-bluefruit-spi-breakout">Bluefruit SPI Breakout</a> (if not onboard) - provides Bluetooth LE 4.1 joystick control

### Libraries
- Adafruit_SSD1306
- Adafruit_GFX
- Adafruit Bluefruit nRF51
- IRremote
- RF24
- (Adafruit_BluefruitLE_SPI)
- Wire
- <a href="https://github.com/laurb9/StepperDriver/releases">StepperDriver</a>

Expand All @@ -172,4 +275,3 @@ The only thing required of the platform is the two horiz/vert stepper motors.
- Notes:
- the DRV8834 current limit must be set according to motor spec
- reduction gear settings are hardcoded in pano.h

Loading

0 comments on commit 5f73568

Please sign in to comment.