Directory of RSS feeds
Statistics

RSS feeds in the directory: 374

Added today: 0

Added yesterday: 0

Hi-Tech / Hardware

Control with external trigger for SONY cameras HDR on ESP8266

Samopal.pro 09.10.2019 at 13:22

SONY deciding to show itself in the market action cameras, produces a line of devices HDR. Beckoning customers attractive fillings — a good matrix, a fast processor, Zeiss optics and electronic image stabilizer with a small weight, the company is showing its "true face of capitalism."

To control the camera available with remote viewing videos over WiFi. The remote is quite expensive and scarce — now it is available only on various electronic flea markets.

But there is WiFi so you can control with your phone? Have you tried to ski or a wakeboard with a smartphone in hand? But this inconvenience is not enough.

SONY, not caring about their customers, removes from Google Play PlayMemories Mobile app to control your action camera via WiFi from any mobile phone, replacing it on the app for the smartwatch. Instead, it releases Edge Mobile Imaging — terribly uncomfortable and constantly otvalivayas from the camera. The same song and for applications on the iPhone.

As the deceived investor user camera HDR AS100 I decided to look for an alternative solution and came across an interesting archive — Sony Camera Remote API beta SDK

written SDK to develop apps control SONY cameras via WiFi with devices running Android and iOS.

Inside the archive two directories with examples for developing Java applications for Android and iOS. Most interesting is the PDF document API references for Camera Remote API beta. Solved — I will make do remote with your hands

What is interesting in API

first of all, there is a table of supported devices in February 2017.

on the Basis of the table API with different degree of functionality compatible with virtually all action cameras HDR AS15 from to AS300, FDR cameras, camera series DSC, ILCE and NEX with Wi-Fi interface.

Next, I will describe work with HDR AS100 with the latest firmware 2.0.0, implying that other devices should be compatible.

secondly, the control Protocol for the cameras. Every SONY device from the list is an HTTP server that executes queries, and gives you the individual frames in JPEG format and video streaming.

My goal to design a compact and extremely cheap remote control for SONY cameras

To start, you need to make sure the camera's menu included WiFi:

[SETUP] -> [CONFG] -> [Wi-Fi] -> [ON]

the ID and password should be on a separate sticker in the instruction manual to the camera. If this sticker lost, you can connect the camera MicoUSB to a computer running Microsoft Windows and enable it. The screen will display [USB], and on the computer two network drive — with the memory card inserted in the camera and the internal memory of the camera PMHOME. We are interested in the second disc

In file: \\INFO\WIFI_INF.TXT contains the ID and password to access the camera via WiFi, and at the \\INFO\WPS_PIN.TXT the key pin to connect via WPS. Access to information is possible only for reading, so change the ID, the password or pin is not possible.

Now it is possible with these data to connect to the camera. IP address of the camera after connection 192.168.122.1. To control the camera you need to send HTTP POST requests to the address http://192.168.122.1:10000/sony/camera.

For different camera models can be used the following addresses:

http://10.0.0.1:10000/camera http://10.0.0.1:10000/sony/camera http://192.168.122.1:8080/sony/camera http://192.168.122.1:10000/sony/camera

third, the structure of the request and response. Each request contains the command in JSON format and returns the answer in JSON format. A complete list of commands and examples of use are contained in the same PDF file.

as well via the HTTP Protocol back the finished file with snapshots and a video stream for viewing with the camera.

the Most complicated Protocol is for giving information. Depending on the request version (1.0 — 1.3) generates an array from 34 to 62 parameters in JSON format, which also in turn can be arrays, and has two modes of operation — with an immediate response full of information on the status of the camera and in any event on the camera (such as mode switching or start recording)

the First pancake ... Loot

the Heart — a flaming engine the cheapest MK WiFi — ESP8266 Chinese. However looking at the dull paint pictures on the graphic screen 240×320 in SPI I decided to postpone the manufacture of copies of native sonkovskim remote preview real-time video, and stopped on the functionality of a regular vklyuchali/vyklyuchili with the mode selection. As the display took 0.91" monochrome OLED with a resolution of 32×128, which is typically used in cheap fitness bracelets.

I diagram for the prototype

and the design of the Board with double-sided mounting under LUT technology

Well, the victim LUT

Firmware

the Firmware I developed in the Arduino IDE installed ESP8266 Core. For convenience, I have used additional libraries:

Graphics library Adafruit GFX Library working with OLED screens Adafruit SSD1306 Library for quick and easy configuration WiFiManager Library ArduinoJson — easy JSON parser messages

GUI libraries are all clear. They need to work with the OLED display. WiFiManager is a very convenient library to configure the WiFi connection of the controller. In case of entering the settings mode, the UPS on the ESP access point and your minimalistic WEB server that forwards the connection. You can run in automatic mode, but then the setting mode will be started each time when there is no connection the camera. I chose the entrance to the setting mode by long pressing the "BOOT/MODE" and exit on timeout in 120 sec.

Library WiFiManager convenient because you can add their fields to configure (in this project, I never have to use), and process events — entering the setup mode and save settings.

After the connection settings to the camera are set up, the program connects what he writes and the little screen. In the case of the connection program is every second the camera sends a request for the current status and displays on the screen changes. This is done in order to be able to track control the camera directly from the buttons on it.

the button "BOOT/MODE" are cyclically switched three basic modes of the camera — "VIDEO", "PHOTO" and "LOOPS" . Click "PLAY/STOP" enable/disable recording "VIDEO" or "LOOPS" and makes recording a single photo in the "PHOTO". When the mode recording the red led lights. When recording, blinks once.

there is Also an additional entrance to GPIO14, which essentially duplicates the button "PLAY/STOP". This input connects an external trigger that can be synchronized shooting photos for time lapse images with an external event. This entry I plan to connect to the 3D printer and shoot a timelapse video of printing parts.

additional features, the program periodically measures the input value of the ADC, where the divider is connected directly from the battery, and gives icon status of battery. The program is calibrated to the dividers R12=1.6 K and R11=10K and lithium battery.

unfortunately AS100 does not support the JSON results in the recording time and the number of pictures in timelapse mode. In the sketches of these parameters are written to variables, if someone will repeat, on other cameras can be shown on the display.

the First switch or reconfigure the camera is long (over 5 seconds) by holding down the BOOT/OPER. This action starts WiFiManager mode WiFi settings. He picks up the access point (no password!) and, once connected, allows you to select or specify the name and password of the connection to the SONY camera. After that the connection will always occur in the automatic mode after switching on the camera.

the"Industrial" sample

I couldn't resist. I ordered the scarves on JLCPCB and in the free space and put to do. A slightly modified scheme based on the "trial operation". Reduced the size and added a charger for lithium on the TP4056

the Design of the Board came to be

without OLED display

Specification of components Capacitors C1, C2, C3, C4 1206 10 UF 1206 Led D1 green Led D2 yellow 1206 Led red 1206 D3 Schottky Diode D3 1N5819 SOD-123 Connector J1 MicroUSB Resistor R1, R3 1206 1 Ohm Resistor R2 1206 4.7 Ohm — 1.2 kOhm (define tog battery charging) Resistors R4, R5, R5, R9, R11, R13 10K Ohm 1206 Resistors R7, R8, R14 1206 1 kOhm Resistor R10 1206 100 Ohm Resistor 1206 R12 to 1.6 kOhm Button clock S1, S2, S3 3x6x2.5 Switch side with a pitch of 2mm U1 battery charge Controller U2 TP4056 Controller ESP8266-12E U3 LowDrop 3.3 V stabilizer AP2112 Connectors XP1,XP2 PLS increments of 2.54 cm OLED Display 0.91" SSD1306 Lithium battery any 300-1500 man What happened

Now, a little use of

what was started, input the external trigger. I wanted to try to shoot TimeLaps print on a 3D printer with my camera SONY HDR AS100. For this, I in the controller and made an input for an external trigger. Give the signal on this input in several ways

to connect to the free pins of the controller and sewn into the firmware of the printer control of this input with the help of additional commands G-code.

Install OctoPrint plugin OptoLapse and connect the input of the remote controller to a free port Orange PI/Raspberry PI.

to Install additional limit switch connected to the controller and take to photograph each frame the printer head, so she pressed the switch.

I tried 3rd method:

on the knee, Quickly wrote a PHP-script, which after printing of each layer inserts code of branch head position limit switch.

Other feed items

The device MySensors battery-powered 23.07.2019 at 08:20

Create your device class to MajorDoMo 27.06.2019 at 05:24

Universal watchdog timer ATtiny13 04.04.2019 at 16:58

Connect soil moisture sensors to MajorDoMo 26.01.2019 at 07:01