0%

Welcome to my blog.

This is where I document my stuff.

Best place to start looking is here…

Stuff

  • IOT Projects
    • ESP32
    • ESP8266
    • Arduino
    • Raspberry PI
    • more…
  • 3D Printing
  • Freecad
  • Cameras
  • you know. Stuff…

This blog is a set of artifacts (posts, tutorials, notes and application notes) organized in Series.

A series is a collection of two or more artifacts.

The artifacts are listed below in chronological order.

You can see the Series organized in categories…

This blog is perpetually under construction…

Objectives

  • use ESP32-CAM to monitor sump pump.
  • to that end
    • connect an ACS712 current sensor to the ESP32
    • measure sump pump current draw programmatically
    • modify the ESP32 camera webserver software to display pump statistics

      Description

  • monitor sump pump visually (using the ESP32 CAM as a webcam) and electrically (measure the pumps duty cycle [how often it comes on] and its current draw [measure current with the ESP32 connected to an ACS712 current sensor])
  • display all of the pump stats as well as stream video of the sump over a wifi connection.

Platform

  • CentOS Stream release 8
  • PlatformIO IDE

References

  1. Reference 1 : Kee Yees ESP32-CAM on Amazon…
  2. Reference 2 : Amazon Order…
  3. Reference 3 : KeeYees ESP32-CAM product web page…
  4. Reference 4 : KeeYees ESP32-CAM Tutorial (my gdrive copy of ESP32-CAM.zip downloaded from Reference 2)…
  5. Reference 5 : ESP32-CAM-KIT-English.pdf extracted from Reference 3…
  6. Reference 6 : Espressifs github repo for camera web app software…
  7. Reference 7 : Comprehensive ESP32 Reference……
  8. Reference 8 : Camera web server and home assistant…
  9. Reference 9 : Howto use the built in LED…
  10. Reference 10 : ESP32 Cam + node-red + home assistant…
  11. $10 DIY Wireless IP Security Camera for 3D Printers & Home…

Procedures

Step 1

sub

Screenshots

back to Series…

Objectives

  • create a Raspberry PI Server based on video #295 on Andreas Spies youtube channel
  • document my experience.

Descripion

  • build a Raspberry IOT server based on Docker containers
  • this note does not describe all the steps in video #295, its a trial run. If successful, follow up notes will complete the installs

Platform

  • Raspberry PI 3 Model B

    video #295 installs to a Raspebrry PI 4, but I had a Pi 3 on hand so I installed to it. The plan is to evaluate on a Pi 3 and switch to Pi 4 if I keep on the long term.

    1
    uname -a

    Linux raspberrypi 5.4.79-v7+ #1373 SMP Mon Nov 23 13:22:33 GMT 2020 armv7l GNU/Linux

=============================================================================

References

  1. Andreas Spiess’s Video #295 - Raspberry Pi Server based on Docker,…
  2. github – SensorsIot IOTstack…
  3. gist - “Run Raspberry Pi 4 from SSD”
  4. updated firmware lets you boot Pi4 from USB

    Procedures

    NOTEthis project is relatively new and evolving fast. In short, theres bugs, but they’re getting fixed. Some of these instructions will get obsoleted by the bug fixes, so be aware of that. For example the “docker group” issue will get fixed soon I’m sure: see issue #204. I also generated a couple issues: see #213 and #212
    NOTE
    use the discord channel, its a primary source of info

Step 1

Download the project software

Install support tools

1
2
# install these support tools first:
sudo apt install -y git curl

Download software

1
2
3
git clone https://github.com/SensorsIot/IOTstack.git
cd IOTstack
bash ./menu.sh
  1. Install docker with the menu, restart your system.
  2. Run menu again to select your build options,
1
2
3
4
5
6
7
8
9
10
# Fix permission denied
sudo groupadd docker
#Add your user to the docker group.
sudo usermod -aG docker $USER
# Run the following command or Logout and login again and run (that doesn't work you may need to reboot your machine first)
newgrp docker
# Check if docker can be run without root
docker run hello-world
## reboot to ensure fresh system
reboot
  1. From the menu, choose “Build Stack” and pick images
    1
    2
    3
    4
    5
    cd IOTstack
    bash ./menu.sh
    # choose "Build Stack" and pick these images
    # grafana, influxdb, mosquitto, nodered for now.
    # For nodered: highlight nodered, "right click / select & build addons list" then hit enter
    NOTE** you’re gonna get “nodered addons_list.yml errors”
  • while in menu.sh, hilight “nodered” and click the right arrow button. You can build the .yml file in there.
  • then start the stack from docker commands menu.
  1. Go into docker commands and “Start Stack”
    Pulls all images and starts everything up

Seems to work!!

  • connect to nodered
    open url
    localhost:1880
    or

192.168.2.21:1880

NOTE**

  • to monitor logs
    1
    2
    cd ~/IOTstack
    docker-compose logs -f
  1. Post install
  • disable swap and enable log2ram
    • from the main menu, choose misc commands
      • choose “Set swapiness to 0 (Disables swap until restart)”
      • choose “Install log2ram”

back to Series…

Objectives

  • install Freecad using four methods
  1. Install on Arch linux using AUR…
  2. Download and Install the precompiled Freecad Appimage (recommended- easier)
  3. Download and build the latest Freecad image (docker image- you compile latest version from github)
  4. Linkstage 3/Assembly 3 - realthunders fork for bleeding edge Freecad with lotsa fixes…

Description

  • download and install Freecad

Platform

  • arch
    1
    uname -a

    Linux archy 5.9.13-arch1-1 #1 SMP PREEMPT Tue, 08 Dec 2020 12:09:55 +0000 x86_64 GNU/Linux

=============================================================================

References

  1. Freecad Appimage on freecadweb.org…
  2. Install docker on arch…
  3. Compile on docker
  4. Freecad releases on github…
  5. Realthunders github repo: Assembly3/Linkstage 3…
  6. Realthunders fork: Download releases…
  7. Install on Arch: “installing and running the aur git package works. Thanks…”

Procedures

Method 0 (installing on arch linux)

NOTES**
Method 1 works on arch linux but sometimes it breaks after a “pacman -Syu”. For example you’l get an error like this

1
libGL error: MESA-LOADER: failed to open iris: /tmp/.mount_FreeCAgkhRtt/usr/bin/../lib/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /usr/lib/dri/iris_dri.so) (search paths /usr/lib/dri)

So, on arch linux its recommended to use the steps outlines in Reference 7.
In short, “install the aur git package”. This builds and installs the most recent version of Freecad

1
yay -Syu freecad-git
  • in then appears in your gnome menus (Activities\Search"Freecad”)

Method 1 (Recommended)

Download and Install a prebuilt Appimage

Step 1

download it

NOTES**
freecadweb.org… describes various methods of installing freecad
DOWNLOAD LATEST……!! from all Freecad releases on github…

1
2
3
# make it executable
cd ~/Downloads
chmod +x FreeCAD_0.19-24276-Linux-Conda_glibc2.12-x86_64.AppImage

Step 2

Create a desktop entry

NOTE**
Instructions to create a gnome desktop entry in Arch Linux…

Assume home folder == /home/fcarella

  1. First download a Freecad ICON (from here for example) to /home/fcarella/.local/share/freecad/

  2. Then create a desktop entry (make sure the paths are correct)
    Create the file ~/.local/share/applications/freecad19.desktop

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    cat >> /home/fcarella/.local/share/applications/freecad19.desktop << EOF
    [Desktop Entry]
    Type=Application
    Name=Freecad.19
    Comment=3d cad
    Exec=/home/fcarella/Downloads/FreeCAD_0.19-24276-Linux-Conda_glibc2.12-x86_64.AppImage %f
    Icon=/home/fcarella/.local/share/freecad/freecad-icon.png
    Terminal=false
    StartupNotify=true
    Categories=Engineering;Graphics;3DGraphics;
    StartupWMClass=Freecad
    X-Desktop-File-Install-Version=0.26
    EOF

    The desktop entry should now appear in your gnome menus

Method 2

Download and Build docker image

Step 1

Install docker on arch See…

1
2
3
4
5
6
# install docker
sudo pacman -Syu docker
# start docker
sudo systemctl restart docker
# verify that you can run containers, should echo "hello world"
sudo docker run -it --rm archlinux bash -c "echo hello world"

Step 2

clone and build latest freecad

  • Clone it
    1
    git clone https://github.com/FreeCAD/FreeCAD.git ~/freecad_source
  • Create build directory
    1
    mkdir ~/freecad_build
  • Pull Docker image
    1
    2
    3
    sudo docker pull registry.gitlab.com/daviddaish/freecad_docker_env:latest
    sudo docker info
    # ...
  • Allow access to your window manager
    1
    xhost +
  • Configure environment variables
    • the source code folder and build folders are stored outside of the docker image. This gives you control/access to that data without going into the container. It allows you to run the newly compiled freecad in your local system.
    • the folder locations are passed to the docker image through the following environment variables.
      1
      2
      3
      fc_source=~/freecad_source
      fc_build=~/freecad_build
      other_files=~/
  • Launch the docker image
    • NOTE ** you will be presented with a bash terminal logged in to the docker image
      1
      2
      3
      4
      5
      6
      sudo docker run -it --rm \
      -v $fc_source:/mnt/source \
      -v $fc_build:/mnt/build \
      -v $other_files:/mnt/files \
      -e "DISPLAY" -e "QT_X11_NO_MITSHM=1" -v /tmp/.X11-unix:/tmp/.X11-unix:ro \
      registry.gitlab.com/daviddaish/freecad_docker_env:latest
  • Build FreeCAD
    • NOTE** this command is run in the docker image bash terminal
      1
      /root/build_script.sh
  • Run freecad
    • NOTE** this command is run in the docker image bash terminal
    • you have access to your local file system through these docker image folders

      /mnt/source
      /mnt/build
      /mnt/files (store the files you create in Freecad somehwere in here…)

    • Run it
      1
      /mnt/build/bin/FreeCAD

Method 3

Linkstage 3/Assembly 3 - realthunders fork for bleeding edge Freecad with lotsa fixes…

Step 1

Download current release of Realthunder fork…

For example, assuming URL of the latest release is:
https://github.com/realthunder/FreeCAD_assembly3/releases/download/0.11/FreeCAD-asm3-Daily-Conda-Py3-Qt5-20210307-glibc2.12-x86_64.AppImage

then use your favourite download technique to get it…

1
2
3
wget https://github.com/realthunder/FreeCAD_assembly3/releases/download/0.11/FreeCAD-asm3-Daily-Conda-Py3-Qt5-20210307-glibc2.12-x86_64.AppImage
# rename it to FreeCAD_assembly3-current-glibc2.12-x86_64.AppImage
mv FreeCAD-asm3-Daily-Conda-Py3-Qt5-20210307-glibc2.12-x86_64.AppImage FreeCAD_assembly3-current-glibc2.12-x86_64.AppImage

Step 2

make it executable

1
chmod +x FreeCAD_assembly3-current-glibc2.12-x86_64.AppImage

Step 3

execute it

1
./FreeCAD_assembly3-current-glibc2.12-x86_64.AppImage

Step 4

Create a desktop entry

NOTE**
Instructions to create a gnome desktop entry in Arch Linux…

Assume home folder == /home/fcarella

  1. First download a Freecad ICON (from here for example) to /home/fcarella/.local/share/freecad/

  2. Then create a desktop entry (make sure the paths are correct)
    Create the file ~/.local/share/applications/FreeCAD_assembly3-current.desktop

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    cat > /home/fcarella/.local/share/applications/FreeCAD_assembly3-current.desktop << EOF
    [Desktop Entry]
    Type=Application
    Name=FreeCAD.19_assembly3-current
    Comment=3d cad
    Exec=/home/fcarella/Downloads/FreeCAD_assembly3-current-glibc2.12-x86_64.AppImage %f
    Icon=/home/fcarella/.local/share/freecad/freecad-icon.png
    Terminal=false
    StartupNotify=true
    Categories=Engineering;Graphics;3DGraphics;
    StartupWMClass=Freecad
    X-Desktop-File-Install-Version=0.26
    EOF

    The desktop entry should now appear in your gnome menus

    back to Series…

Objectives

  • purchase Arduino CNC board
  • implement the setup procedures outlined in the board documentation (reference 4)
  • initial setup and test of the Arduino CNC board
  • drive a stepper motor with each axis driver (x, y, z, 4th axis)

Description

  • initial setup and test of the Arduino CNC board

Platform

  • CentOS Stream release 8
  • Arduino IDE

=============================================================================

References

  1. cnc-shield v3.0 - Amazon order…
  2. cnc-shield v3.0 - Amazon page…
  3. cnc-shield v3.0 - keeyees cnc-shield product web page (links to documentation)…
  4. cnc-shield v3.0 - local copy of keeyees cnc-shield documentation…
  5. cnc-shield v3.0 - Polulu data sheet on DRV8825…
  6. stepper - Amazon order…
  7. stepper - Amazon page…
  8. cnc-shield v3.0 - This is an excellent setup article…
  9. cnc-shield vX- protoneer…
  10. cnc-shield - arduino cnc instructions…
  11. grbl 1.1h - NOTE apparently this version supports v3 boards (see step/dir pins)
  • NOTE** see this Amazon review… She talks about the v3 board problem. I recommend recompiling the firmware instead of cutting traces. Try it.

Procedures

Step 1

Find and Purchase an Arduino CNC board

  • found a protoneer v3 compatible chinese knockoff with arduino at Amazon
  • note I ordered 2, one Ordered on October 19, 2020, the other Ordered on April 12, 2020. One is for the cnc machine, the other as a generic stepper motor driver as it was more cost effective than buying individual DRV8825 stepper drivers.

Step 2

Configure the cnc board

  • Following the instructions in reference 4

    Fig 1.0 - The locations of the settings on the board (note, the board I purchased is a protoneer v3.0 board)

SETTING 1: DRV8825 Modes

  • remove all jumpers from M0, M1, M2 for full step mode on the steppers which is 1.9 degrees per step for our stepper (see reference 7)

    NOTE ** according to reference 8, an installed jumper corresponds to 1, uninstalled is 0, so remove all jumpers for full step
    From reference 5:

    MODE0MODE1MODE2Microstep Resolution
    LowLowLowFull step

SETTING 2 : Install DRV8825

  • NOTE** lineup the pin labelled “EN” on the DRV8825 to the socket pin labelled “EN”

SETTING 3 : connect +12v observe polarity

SETTING 4: Wiring of Motors

  • Wiring ZYLtech Nema 17 stepper motors is simple.
    • Plug in the connectors to the headers for each axis.
    • If a motor turns the incorrect direction, simply rotate the plug 180 degrees.

Step 3

Write a Program to Test it

  • The test code is available as a PlatformIO Project and is in this git repo… (note theres an old version using ArduinoIDE here repo…) The code came from reference 4.

  • The code can be found on the laptop here…

    • /home/fcarella/iotprojects/PlatformIOProjects/ArduinoUno/ArduinoCNC-shield-setup-Test/
    • /home/fcarella/iotprojects/ArduinoIde/CNC/ArduinoCNC-shield-setup-Test/ArduinoCNC-shield-setup-Test.ino

ArduinoCNC-shield-setup-Test.ino

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#define EN        8       
#define X_DIR 5
#define Y_DIR 6
#define Z_DIR 7
#define X_STP 2
#define Y_STP 3
#define Z_STP 4
char num;
void step(boolean dir, byte dirPin, byte stepperPin, int steps)
{
digitalWrite(dirPin, dir);
delay(50);
for (int i = 0; i < steps; i++)
{
digitalWrite(stepperPin, HIGH);
delayMicroseconds(800);
digitalWrite(stepperPin, LOW);
delayMicroseconds(800);
}
}
void setup(){
Serial.begin(9600);
pinMode(X_DIR, OUTPUT); pinMode(X_STP, OUTPUT);
pinMode(Y_DIR, OUTPUT); pinMode(Y_STP, OUTPUT);
pinMode(Z_DIR, OUTPUT); pinMode(Z_STP, OUTPUT);
pinMode(EN, OUTPUT);
digitalWrite(EN, LOW);
}
void loop(){
digitalWrite(EN, HIGH);
while(Serial.available()>0)
{
num=Serial.read();
switch(num)
{
case '1':
Serial.println(num);
digitalWrite(EN, LOW);
step(false, X_DIR, X_STP, 1600);
delay(1000);
step(true, X_DIR, X_STP, 1600);
break;
case '2':
digitalWrite(EN, LOW);
Serial.println(num);
step(false, Y_DIR, Y_STP, 1600);
delay(1000);
step(true, Y_DIR, Y_STP, 1600);
break;
case '3':
Serial.println(num);
digitalWrite(EN, LOW);
step(false, Z_DIR, Z_STP, 1600);
delay(1000);
step(true, Z_DIR, Z_STP, 1600);
break;
}
Serial.println(num);
delay(1000);
}
}

back to Series…

INCOMPLETE…

Objectives

  • connect and program an ESP32-CAM as a streaming video server using the platformIO IDE using these instructions : Reference 0: instructions for using esp32 cam with platformIO
  • to that end
    • choose and purchase an ESP32-CAM dev board
    • download documentation
    • connect the FTDI programmer
    • program the ESP32-CAM with the web server as described in the Kee Yees documentation (tutorial)

Description

  • create an ESP32-CAM based video streaming server
  • this duplicates Application Note 9 except it uses platformIO not the arduino IDE

    Platform

  • CentOS Stream release 8
  • Platformio IDE

=============================================================================

References

  1. Reference 0: ESP32-CAM with PlatformIO: Video streaming and face recognition
  2. Reference 1 : Kee Yees ESP32-CAM on Amazon…
  3. Reference 2 : Amazon Order…
  4. Reference 3 : KeeYees ESP32-CAM product web page…
  5. Reference 4 : KeeYees ESP32-CAM Tutorial (my gdrive copy of ESP32-CAM.zip downloaded from Reference 2)…
  6. Reference 5 : ESP32-CAM-KIT-English.pdf extracted from Reference 3…
  7. Reference 6 : Espressifs github repo for camera web app software…
  8. Reference 7 : Comprehensive ESP32 Reference……
  9. Reference 8 : Camera web server and home assistant…
  10. Reference 9 : Howto use the built in LED…
  11. Reference 10 : ESP32 Cam + node-red + home assistant…
  12. $10 DIY Wireless IP Security Camera for 3D Printers & Home…

Procedures

Step 1

Choose an ESP32-CAM dev board

  • I chose the Kee Yees ESP32-CAM dev board shown in Reference 1… because it was an Amazon Choice, good reviews, it was cheap and documentation was available on the web site (Reference 3… and Reference 4…).

Step 2

Purchase the device

  • (see Reference 2…). Ordered form Amazon.ca, May 24, 2020 for 22.99$

Step 3

Get documentation

Step 4

Install software

  • Install requisite software in CentOS
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    # Install python3 and python2 
    sudo dnf install python2
    # See : (https://linuxize.com/post/how-to-install-python-on-centos-8/)
    sudo dnf install python3
    # use python2
    sudo alternatives --set python /usr/bin/python2
    # install pyserial
    sudo pip2 install pyserial
    # set permissions on /dev/ttyUSB0
    # https://www.arduino.cc/en/guide/linux#toc6
    ls -l /dev/ttyUSB0
    sudo usermod -a -G dialout fcarella
    # logout/log back in
  • General Instructions to Install Platform IO

Step 5

Program the ESP32-CAM

Connect the ftdi (see Reference 5, Page 11…)

Setup PlatformIO IDE for ESP32 programming

  • following notes are based on Reference 0.

  • Download and install VSCode and then install the Platform IO extension if you dont have it already (Refernce 0 has details)

  • Clone the Github repository containing the source code for CameraWebServer.

    1
    2
    cd ~/
    git clone https://github.com/espressif/arduino-esp32.git
  • import the Arduino Project

  • open the folder we just downloaded in the previous step (~/arduino-esp32/libraries/ESP32/examples/Camera/CameraWebServer) and choose AI Thinker ESP32-CAM and check the “use libraries installed by Arduino IDE” checkbox. This will download all the necessary sdk’s and frameworks for working the ESP32 CAM in platformio

  • Open CameraWebServer.ino using PlatformIO and modify the code as shown below:
    Uncomment this line

    1
    #define CAMERA_MODEL_AI_THINKER // Has PSRAM

    and edit your credentials

    1
    2
    const char* ssid = "your_wifi_ssid";
    const char* password = "your_wifi_password";
  • build/compile the app

  • upload the app to the ESP32 CAM

    NOTE** make sure ESP32 is in programming mode () pins IO0 is shorted to GND and ESP32 is reset)

NOTE** did it work?

-Make sure the config file, platformio.ini has the right baud rate configured to the serial monitor
(monitor_speed=115200)

platformio.ini–>

1
2
3
4
5
6
[env:esp32cam]
platform = espressif32
board = esp32cam
framework = arduino
lib_extra_dirs = ~/Documents/Arduino/libraries
monitor_speed = 115200
  • take the ESP32 out of programming mode (disconnect pin IO0 from gnd and reset the ESP32)

  • open the serial monitor and reset the ESP32. Note the ESP32 output showing the URL of the video stream…

  • point your browser to the URL and confirm video streaming works…

back to Series…

Objectives

  • connect and program an ESP32-CAM as a streaming video server
  • to that end
    • choose and purchase an ESP32-CAM dev board
    • download documentation
    • connect the FTDI programmer
    • program the ESP32-CAM with the web server as described in the Kee Yees documentation (tutorial)

Description

  • create an ESP32-CAM based video streaming server

Platform

  • CentOS Stream release 8
  • Arduino IDE

=============================================================================

References

  1. Reference 1 : Kee Yees ESP32-CAM on Amazon…
  2. Reference 2 : Amazon Order…
  3. Reference 3 : KeeYees ESP32-CAM product web page…
  4. Reference 4 : KeeYees ESP32-CAM Tutorial (my gdrive copy of ESP32-CAM.zip downloaded from Reference 2)…
  5. Reference 5 : ESP32-CAM-KIT-English.pdf extracted from Reference 3…
  6. Reference 6 : Espressifs github repo for camera web app software…
  7. Reference 7 : Comprehensive ESP32 Reference……
  8. Reference 8 : Camera web server and home assistant…
  9. Reference 9 : Howto use the built in LED…
  10. Reference 10 : ESP32 Cam + node-red + home assistant…
  11. $10 DIY Wireless IP Security Camera for 3D Printers & Home…

Procedures

Step 1

Choose an ESP32-CAM dev board

  • I chose the Kee Yees ESP32-CAM dev board shown in Reference 1… because it was an Amazon Choice, good reviews, it was cheap and documentation was available on the web site (Reference 3… and Reference 4…).

Step 2

Purchase the device

  • (see Reference 2…). Ordered form Amazon.ca, May 24, 2020 for 22.99$

Step 3

Get documentation

Step 4

Install software

  • Install requisite software in CentOS

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    # Install python3 and python2 
    sudo dnf install python2
    # See : (https://linuxize.com/post/how-to-install-python-on-centos-8/)
    sudo dnf install python3
    # use python2
    sudo alternatives --set python /usr/bin/python2
    # install pyserial
    sudo pip2 install pyserial
    # set permissions on /dev/ttyUSB0
    # https://www.arduino.cc/en/guide/linux#toc6
    ls -l /dev/ttyUSB0
    sudo usermod -a -G dialout fcarella
    # logout/log back in
  • Install arduino ide in arch

    1
    2
    sudo pacman -S arduino
    sudo pacman -S arduino-avr-core

    Step 5

    Program the ESP32-CAM

    Connect the ftdi (see Reference 5, Page 11…)

  • use the ftdi USB to TTL Serial Converter to connect esp32 to the computer for programming

Setup ARDUINO IDE for ESP32 programming

  • Install the Arduino ESP32 Module addon in the Arduino IDE as described in the docs… starting from the bottom of page 7

    • In the IDE
      File/Preferences
      in
      Additional Boards Manager URLS
      add
      https://dl.espressif.com/dl/package_esp32_index.json

    • then, in the IDE menu, choose
      Tools/Boards/Board Manager/Choose ESP32-Wrover Module

  • Load CameraWebServer app as described in docs

  • In your Arduino IDE, go to
    File > Examples > ESP32 > Camera
    and open the CameraWebServer example.

  • then in the software change settings to

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    // Select camera model
    //#define CAMERA_MODEL_WROVER_KIT
    //#define CAMERA_MODEL_ESP_EYE
    //#define CAMERA_MODEL_M5STACK_PSRAM
    //#define CAMERA_MODEL_M5STACK_WIDE
    #define CAMERA_MODEL_AI_THINKER

    #include "camera_pins.h"

    const char* ssid = "********";
    const char* password = "********";

NOTES**

  • I was getting brownout errors but I just unplugged and plugged in usb and it works!!

Screenshots

back to Series…

Objectives

  • assemble a 5:1 gearbox to be used in an Astrophotography Camera Mount

Description

  • not sure how well the 3d printer will print this gearbox, so lets print 1, 5:1 gear box and program a stepper motor to turn it.

=============================================================================

References

  1. Reference 1 : hackaday article…
  2. Reference 2 : stl files on thingiverse…

Procedures

Step 1

download stl files

  • The stl files can be found here…
  • download Astrophotography_Camera_Mount.zip and unzip the files
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    unzip Astrophotography_Camera_Mount.zip 
    Archive: Astrophotography_Camera_Mount.zip
    inflating: LICENSE.txt
    inflating: README.txt
    inflating: attribution_card.html
    creating: files/
    inflating: files/carrier_5_to_1.stl
    inflating: files/sun_5-to-1_carriershaft.stl
    inflating: files/retainer_motor_mount.stl
    inflating: files/ring_5-to-1_wings.stl
    inflating: files/ring_4-to-1.stl
    inflating: files/carrier_4_to_1.stl
    inflating: files/carrier_4-to-1_cameramount.stl
    inflating: files/ring_5-to-1.stl
    inflating: files/sun_4-to-1_carriershaft.stl
    inflating: files/planets_5-to-1.stl
    inflating: files/sun_5-to-1_motorshaft.stl
    inflating: files/planets_4-to-1.stl
    inflating: files/tripod_mount.stl
    inflating: files/retainer.stl
    inflating: files/retainer_final.stl
    creating: images/
    inflating: images/4ec69ebcc85b1365947b105e4e7fb177_preview_featured.jpg
    inflating: images/55aa8037966a69bdd21ac5f952f5b6c2_preview_featured.jpg
    inflating: images/8f4c440199b031849e785e7faceda7a4_preview_featured.jpg
    inflating: images/bfce3c5db77057af05edcf6b26e8bca4_preview_featured.jpg
    inflating: images/55990088fbd577bdae9d0b5c7ab1779e_preview_featured.jpg
    inflating: images/631058225be582e263fa8db347bf3b4e_preview_featured.jpg
    inflating: images/91281c04fcd765eac196be8334d4a38e_preview_featured.jpg
    inflating: images/4fbf0bd26845d5a13db5c92396d54249_preview_featured.jpg
    inflating: images/fa47c78018cfc29f3c3cbe1a2dc55306_preview_featured.jpg
    inflating: images/5e67ecc429299c714849851f42c80319_preview_featured.jpg
    inflating: images/cc1f4abd9935b7f6da22696193bae907_preview_featured.jpg
    inflating: images/9308dddc66cb43d60585b5f01de7b50e_preview_featured.jpg
    inflating: images/e2acd7300622a14de5bd32527af97cb1_preview_featured.jpg
    inflating: images/7f213512cca5112a2529fbc5d3b7e82c_preview_featured.jpg
    inflating: images/2f5259df50115f88f4e8692fd7302885_preview_featured.jpg
    inflating: images/af733e4802036c5395d699d7fbf7dd24_preview_featured.jpg
    inflating: images/d4d37047022827100633519a302ba409_preview_featured.jpg

Step 2

  • print these files
    retainer_final.stl
    retainer_motor_mount.stl
    retainer.stl
    ring_5-to-1_wings.stl
    sun_5-to-1_carriershaft.stl
    sun_5-to-1_motorshaft.stl
    ring_5-to-1.stl
    planets_5-to-1.stl
    carrier_5_to_1.stl

back to Series…

Objectives

  • build an Astrophotography Camera Mount
  • this is an introduction to a series of application notes that describe the building of an Astrophotography Camera Mount based on Reference 1…

Description

To counter act the effects of sidereal motion, you need to rotate a camera at 000694 RPM

Since the Earth rotates once every 24 hours, it rotates at .000694 RPM (1÷(24×60))…

Reference 1 uses a 10,000:1 gearbox rotating at ~7 rpm to counteract sidereal motion but I liked this one better….

BUT it was too hard to print :(

So I decided to print the gearbox of the original project…

The gearbox consists of four 5 : 1 and two 4 : 1 sets planetary gear sets to achieve a gear reduction ratio of 10000 : 1.

The stl files can be found here…

=============================================================================

References

  1. Reference 1 : hackaday article…
  2. Reference 2 : stl files on thingiverse…

Procedures

  • the following series of application notes will document the

    Step 1

    download stl files

    print 5:1 gear box
  • not sure how well the 3d printer will print this gearbox, so lets print 1, 5:1 gear box and program a stepper motor to turn it.

back to Series…

Objectives

  • post install procedures

References

  1. https://theme-next.js.org/docs/theme-settings/custom-pages

Procedures

Step 1 : Update hexo

Instructions…

Step 2 : Add about page

Reference…

1
2
3
cd ~/static_web_sites/hexo/blog

hexo new page about # creates source/about/index.md

set front matter

  • edit the page /source/about/index.md
    1
    2
    3
    4
    ---
    title: About
    date: 2020-11-30 09:11:00
    ---

add to menu

  • in _config.next.yml
    1
    2
    3
    4
    menu:
    home: / || fa fa-home
    archives: /archives/ || fa fa-archive
    about: /about/ || fa fa-user

Step 3 : Add tags and categories pages

Reference…

1
2
hexo new page tags
hexo new page categories

add to menu

  • edit _config.next.yml
1
2
3
4
5
6
menu:
home: / || fa fa-home
archives: /archives/ || fa fa-archive
about: /about/ || fa fa-user
tags: /tags/ || fa fa-tags
categories: /categories/ || fa fa-th

edit front matter

  • edit tags/index.md
1
2
3
4
5
---
title: tags
date: 2020-11-30 09:22:40
type: tags
---

edit categories

  • edit categories/index.md
1
2
3
4
5
---
title: categories
date: 2020-11-30 09:22:35
type: categories
---

add to menu

  • edit _config.next.yml
1
2
3
4
menu:
home: / || fa fa-home
archives: /archives/ || fa fa-archive
about: /about/ || fa fa-user

back to Series…