Archive / Arduino

RSS feed for this section

How To Use MewPro Bastet

In this post we explain how to connect wires to MewPro Bastet.

MewPro Bastet Pinout

The following picture shows the pinout of Bastet.

There are pins for master, slave(s), and programming (FTDI Breakout Board) denoted by color brown or red, green, and blue, respectively.

Software For Master MewPro 2 board

The MewPro 2 board (MewPro #0 in this diagram) attached to the master camera (GoPro #0) must have MewPro 4 master firmware installed.

To install the master firmware please follow the ordinary steps described in this post with changing the follwing two lines in the MewPro4 source code MewPro.h at lines 6 and 9 from:

boolean debug = true;
#undef  BASTET_MASTER

to

boolean debug = false;
#define BASTET_MASTER

respectively, before compiling and uploading to the board.

Note: Slave MewPro 2’s should have the default firmware without any modification to the MewPro4 source code.

Connect To Master

Firstly, serial line, GND, and sync signals must be connected as follows:

GND and sync signals
signal name MewPro 2 (master) Bastet
Serial TXO RXI
VSYNC VSYNC VSYNC
HSYNC HSYNC HSYNC
GND GND GND

Next, there are two cases to feed power to the master camera:

  1. Camera is powered by internal battery.
  2. Camera is without internal battery and powered by external 5V

[Case 1: Camera is powered by internal battery]

The pins for master are aligned with those of MewPro 2 board. So you can put Bastet on top of MewPro 2 using lead frames or tin plated wires as in the following photos. (If you purchase Bastet from our shop then these lead frames are included.)

Bastet and lead frames

Lead frames soldered

The above is our recommended way of connecting to the master. However, there might be cases that there are no room for Bastet board on top of MewPro 2 in your rig or cases of using MewPro Cable as a master. If your situation dosn’t allow placing Bastet on top of MewPro 2 board then please refer the following table and image.

Camera is powered by the internal battery
voltage rail MewPro 2 (master) Bastet
powered by internal battery internal battery
unregulated 3V8 PWRSTBY PWR STBY
3V3 not connected not connected (*)
5V not connected not connected

Note *: Bastet outputs regulated 3V3 for slave MewPros.

Camera is powered by the internal battery

.

[Case 2: Camera is without internal battery and powered by external 5V]

If you like to power the camera by external 5V source please refer the following table and image.

Camera is without internal battery and powered by external 5V source
voltage rail MewPro 2 (master) Bastet
powered by Bastet external 5V
unregulated 3V8 not connected DON’T CONNECT TWO PWRSTBY PINS! not connected
3V3 VCC 3V3
5V VBUS PWR STBY (**)

Note **: Never connect 5V to MewPro 2’s PWRSTBY. To do so will instantly ruin your camera.

Connect To Slaves

Connections between Bastet and slave MewPro 2’s are the same to those between Iliad and MewPro 2’s (Note: In Iliad system all MewPro 2’s are slaves). You can use our Stackable Hub with Buffer or simply connect thru holes by wire or make something like a DIY octopus cable to connect Bastet and slaves.

Moreover, Bastet’s thru holes for 6-core cable to slaves are aligned as the same to Iliad.

Thus, please refer the Connection section of our blog post How To Use MewPro Iliad about wiring for slaves.

Tips For Reliable Use

a) It is necessary to push buttons of master camera SLOWLY. If there is not enough period between two button presses then the master camera fails to notify some events to Bastet through master MewPro 2 board. This is GoPro’s firmware limitation so don’t blame MewPro and Bastet. The failure can be resulted in video/photo mode inconsistency among cameras and, moreover, incompatible sync signals can make cameras freeze. And also, please WAIT 8 SECONDS AFTER POWER ON because camera booting up takes this long.

b) Camera’s “low light” option is not usable with external sync. Thus, it is set to off by MewPro 2’s default, however, you can also accidentally enable the option. So always take care camera’s LCD is not showing you the “low light” icon.

c) After assembling/connecting Bastet, MewPros, and cameras it is normal that the system becomes unstable. In order to overcome this situation Bastet resets all the MewPro 2 boards every time when it receives power off command from the master.

This behavior enables us to reset the whole system by following the steps below:

Reset Procedure of Bastet System

  • [Step 1: Slave OFF] By long pressing the camera’s mode button, power off each slave camera if it is on. (Even when some cameras are frozen, pressing its mode button for six seconds makes it power off.)
  • [Step 2: Master OFF] Master camera’s power must be off at last.
  • [Step 3: Master ON] After all the cameras are power off, power on the master camera by using its mode button or wifi RC. To do this also power on all the other cameras.
  • [Step 4] If something strange happens then go to Step 1.
.

How To Update MewPro Bastet Software

Our next blog post will show you how to update MewPro Bastet software. (coming soon. please wait.)

List of GoPro Hero 4 I2C Commands

Hero 4 has a new I2C command set incompatible with old Hero 3+ Black. This post gives a demonstration of controlling a standalone Hero 4 camera from Arduino Monitor.

Here is the list of the commands for Hero 4. You can send these commands from your PC’s terminal or Arduino Monitor to MewPro 2 (or MewPro Cable) board or MewPro Iliad through the default UART lines.


Prerequisites

In order to use MewPro 2 as a GoPro Hero 4 controller you need the following hardwares:

GoPro Hero 4 Black/Silver
NOTE: Hero 3+ Black is supported by a different software: Please refer this post.
MewPro 2
MewPro 2 is ready to use without soldering.
Arduino Pro Mini Temporary FTDI Header
If you buy a MewPro 2 from our shop the header is included in the package.
Sparkfun FTDI Basic Breakout – 3.3V and USB cable
Use 3.3V version of the breakout board. Any compatible board should work.

Softwares:

MewPro 2 is shipped with optiboot as well as MewPro4 software for genlock installed. If you like to modify/update the software you will need to prepare the following IDE and core. To install each software please refer their documentations.

Arduino IDE 1.6.12 or newer
Older versions of Arduino IDE might work but we don’t confirm that.
ATTiny Core
1634, x313, x4, x41, x5, x61, x7, x8 and 828 for Arduino 1.6.x

Lastly grab the MewPro4 application:

MewPro4 application
This is an open source software (MIT license). You can modify and distribute it as you like.

Connection

On your PC launch Arduino IDE that was installed as described in the above. In Arduino IDE [File]→[Open...]→ then open MewPro4.ino.

Connect MewPro 2
connection2

to your PC w/ FTDI board and the temporary header.
conne2

Connecting FTDI please refer the pinout image below:
MewPro2

Then connect them to GoPro Hero 4 Black/Silver (The photo below is stolen from our old blog post and connecting to Hero 3+ Black, but I think you will understand where you should connect to. 🙂 ).
conne1

In Arduino IDE application, select [Tools]→[Board]→[ATTiny1634 (optiboot)] and [Tools]→[Port]→[(the port where you connected the FTDI cable)]. (B.O.D. and Clock settings are “don’t care” as these values are only effective when you burn a bootloader to the microcontroller by using an ISP programmer.)

The MewPro4 source code is originally targeted to users with multiple cameras, so for standalone usage please edit/change the following line in MewPro.h at line 8

...
// undef if MewPro 2 board is used as standalone
#define USE_GENLOCK
...

to

...
// undef if MewPro 2 board is used as standalone
#undef USE_GENLOCK
...

Now you are ready to compile/upload the source code. Click on “check mark” icon at the top left of Arduino IDE window compiles the code. And “Right arrow” icon at the right next uploads the compiled binary to MewPro 2 board.

If you like to use a time alarm function MewPro4 source code has such an example included. In this case you must download Time and TimeAlarms libraries from PJRC site, modify the line #undef USE_TIME_ALARMS in MewPro.h to #define USE_TIME_ALARMS, and also remove two comment-outs ‘//’ located at these two lines:

#include <TimeLib.h> // *** please comment out this line if USE_TIME_ALARMS is not defined ***
#include <TimeAlarms.h> // *** please comment out this line if USE_TIME_ALARMS is not defined ***

Then edit d_TimeAlarms.ino to set your alarms.


Controlling Standalone Hero 4 from Arduino Monitor

Open “Serial Monitor” in Arduino IDE window (click the the top right “magnifier” icon). Set [57600 baud] using the bottom right pulldown, [Newline] the middle pulldown, [Autoscroll] the left box checked.

screen-shot-2017-02-25-at-18-09-17
Type ‘@‘ (one letter representing at sign) in the input area of Serial Monitor, and hit return key.

screen-shot-2017-02-25-at-18-09-37
The message “camera power on” is shown and your GoPro Hero 4 turned its power on.

The messages on “Serial Monitor” shows communication details between Arduino and GoPro. And now you can type in any of I2C commands found in “List of GoPro Hero 4 I2C Commands“.

screen-shot-2017-02-25-at-18-11-59
Try typing “YY000101000100” (change camera mode to video) and hit return key unless your camera is in video mode. Then type “YY00021B0000” (and hit return) and “YY00021C0000” (and hit return). (Start recording! Stop recording!!)

If you finished type “ZZ00030101” (and hit return). (This should power off your GoPro Hero 4.)

Enjoy!


Resources

Overexposure Bug Fixed

MewPro Iliad’s overexposure problem in many video modes is fixed.

The Iliad source code at our GitHub repo has already been updated to the latest 1.2.15. Compiling and installation guide is here. Since this bug only affected sync signal parameters there is no need to update the firmware on your MewPro 2 boards.

All the video modes that the camera, GoPro Hero 4 Black or Silver can shoot are supported.

Enjoy!