A place to put your YouTube video that is ESP8266 related.

User avatar
By HermannSW
#78250 This is first video of work-in-progress lightweight servo bom drop mechanism. The ESP-01s running MicroPython, SG37 servo, 150mAh 25C lipo and 3.3V step-down converter as shown (14.6g sofar) will be attached to Eachine E52 drone (86.5g). The enabled WebREPL will be accessed from mobile Raspberry Pi ZeroW via webrepl_client.py providing remote Micropython shell on ground. "payload" module will have two functions, lock() and drop():
https://forum.micropython.org/viewtopic ... 180#p29865

I had to connect servo VCC to lipo VCC. While the 3.8V-4.2V from lipo are still outside of servo operating range 4.8V-6.0V, this setup works reliably. Because servo connector is connected to ESP-01s GND and GPIO-0 pins, GPIO-0 is low on power on. I had to solder small switch connecting GPIO-0 and VCC to avoid running ESP-01s into flash mode. For details see attached 8MP photo of the scene.

You do not have the required permissions to view the files attached to this post.
Last edited by HermannSW on Thu Oct 04, 2018 9:18 am, edited 4 times in total.
User avatar
By HermannSW
#78320 Instead of Fritzing I used my own tool GraphvizFiddle based on Graphviz for creating the schematic. Graphviz does the layout automatically, I only specified the components (clusters), pins (nodes) and connections (edges). You can edit the schematic via this (1926 bytes long) URL that was created using GraphvizFiddle's Share button.

This is the Graphviz .dot file encoded in the URL:
Code: Select all// ESP-01s servo payload drop mechanism
graph {
  graph [ranksep=1.5]
  edge [ penwidth=3]
  node [shape=box]
  subgraph cluster_vr {
    label = "3.3V step-down"
    node [shape=none]
    GNDv [label="GND"]
  subgraph cluster_servo {
    label = "SG37 servo"
    node [shape=none]
    GNDs [label="GND"]
    VCCs [label="VCC"]
  subgraph cluster_jst {
    label = "JST connector"
    node [shape=point label=""]
  subgraph cluster_lipo {
    label = "1S lipo"
    node [shape=none]
    GNDl [label="GND"]
    VCCl [label="VCC"]
  subgraph cluster_esp01s {
    label = "ESP-01s"
    node [shape=none]
    GNDe [label="GND"]
    VCCe [label=VCC]
    button [shape=ellipse]
    edge [color="#ff0000"]
    VCCe -- RESET -- CH_PD
    edge [color="#ff0000"]
    Vo -- VCCe -- button
    VCCl -- VCCj -- Vi -- VCCs
  button -- GPIO0 [color="#0000ff"]
  GNDv -- GNDe -- GNDs
  GNDe -- GNDj -- GNDl
  PWM -- GPIO0 [color="#ffff00"]
Last edited by HermannSW on Thu Oct 04, 2018 9:14 am, edited 2 times in total.
User avatar
By HermannSW
#78398 This 2549 byte long URL makes use of Graphviz record structures to represent the location of the pins on the different objects. The initial automatic layout was fine, but I made some are edges end at a specific node port (n,ne,e,se,s,sw,w,nw) to make it nicer. Advantage of using records is that now node names can all be VCC for the different objects, since the prefixed record name makes them distinct (edge "esp01:GND:sw -- servo:GND:w" connects GND of esp01 and servo, starting at esp01 southwest port and ending on servo west port):
Last edited by HermannSW on Thu Oct 04, 2018 9:10 am, edited 1 time in total.
User avatar
By HermannSW
#78405 Before completing the hardware side with the wire that will trigger the payload drop, here the Micropython payload module software side. The servo has superglued tiny plastic cubes D, R and P. The O cube will be superglued to drop payload. I had to remove the original wooden cubes with holes with the plastic cubes in order to reduce friction of the moving wire:

I did play with payload module while I developed it. Before last change I left webrepl_client.py wireless session to the ESP-01s for copying the modified module (I had to turn off PWM for the following file copy to succeed, by "payload.pwm0.duty(0)" command before leaving).

This is the last version of the module:
Code: Select all$ cat payload.py
import machine

pwm0 =  machine.PWM(machine.Pin(0), freq=50)

def lock():

def drop():


Now copy new version to ESP-01s module:
Code: Select all$ ./webrepl_cli.py payload.py
op:put, host:, port:8266, passwd:abcd.
payload.py -> /payload.py
Remote WebREPL version: (1, 9, 4)
Sent 134 of 134 bytes

Since the "payload" module was imported already in previous session, it had to reloaded. Reloading a module is no standard MicroPython functionality for now. I had added reload() to ESP module boot.py, used the function from this posting:

Finally I tried the new module:
Code: Select all$ ./webrepl_client.py

WebREPL connected
>>> reload(payload)
<module 'payload'>

The final payload.drop() got executed, and now te O cube can be inserted between R and P cube, followed by payload.lock().
Last edited by HermannSW on Thu Oct 04, 2018 9:16 am, edited 2 times in total.