Octopi – Timelapse – Camera Setting

I recently covered how to remove the octopus from your time lapse in my article here.  Another setting that I had to change was the camera resolution.  I’m only using a $5 Raspberry Pi camera from Ebay but it is much better than the defaults used by Octopi.

You will need to SSH into your Raspberry Pi.

You will need to install Putty or WinSCP to SSH into your Raspberry Pi.  I will not cover that in this tutorial.  If you are not sure how to SSH into your Raspberry Pi, go learn how to do that and come back here.  There are thousands of tutorials on the internet but basically you will enter the IP address and SSH port number (typically 22) and your username and password to get to the terminal.

Once at the terminal, you will need to type the following command to get to the correct directory.

cd /boot/

Next, type the command to open the octopi.txt file to change the resolution and fps settings.

sudo nano octopi.txt

Edit the octopi.txt file by pressing down on the keyboard until you get to the #camera_raspi_options=”-fps 10″ setting.  Create a line under this comment using the code below.

camera_raspi_options="-fps 10 -x 1280 -y 720"

Press Control+X to exit.  Save the file and reboot your Raspberry Pi.

You are done.  Enjoy the updated resolution settings.

 

Octopi – Timelapse – Watermark Removal

The timelapse feature in Octopi is awesome.  It is even better with the pesky little octopus in the bottom left corner.  I will walk you the steps to remove the watermark from your videos.

You will need to SSH into your Raspberry Pi.

You will need to install Putty or WinSCP to SSH into your Raspberry Pi.  I will not cover that in this tutorial.  If you are not sure how to SSH into your Raspberry Pi, go learn how to do that and come back here.  There are thousands of tutorials on the internet but basically you will enter the IP address and SSH port number (typically 22) and your username and password to get to the terminal.

Once at the terminal, you will need to type the following command to get to the correct directory.

cd ~/.octoprint/

Next, type the command to open the config.yaml file to change the watermark setting.

sudo nano config.yaml

Edit the config.yaml file by pressing down on the keyboard until you get to the webcam settings.  You will need to either create the watermark line in this file or change the setting from true to “false” by typing over the current configuration.

webcam:
ffmpeg:  /usr/bin/avconf
watermark:  false

Below is an example of my configuration with the watermark removed.

Press Control+X to exit.  Save the file and reboot your Raspberry Pi.

You are done.  Enjoy a watermark free image.

 

OctoPi Control – MonoPrice Mini Select V2

Octopi is a Linux distribution that gives you the ability to control and view most 3D printers from a webpage.  There are options to create a video time lapse, temp control, temp monitoring, bed temp control, print storage, view Gcode as the print is happening and a terminal to view and send commands.  The printer also has Cura 15.01 baked in so you can slice your files on the Raspbery Pi.  Although that option is available, It is slow and an outdated version of Cura so I typically upload the Gcode files that I’ve already sliced from my computer.There are install instructions for Mac and Windows, however this distribution was designed to operate on a Raspberry Pi.

Installation

For a typical install you will need hardware below:

  • Raspberry Pi (I use model 3)  $35
  • A camera (I use a Pi camera from eBay $5)
  • 32GB micro SD card $10

Download the latest OctoPi image from https://octopi.octoprint.org/

Insert your micro SD card into your computer and note the Drive letter.  ***If you choose the wrong drive letter when using Win32DiskImager you overwrite and unintended disk.  You’ve been warned. ***

Use Win32DiskImager to load the image onto your SD card.  Select your image in the Image File drop down menu.  Select your SD card drive letter from the Device drop down menu.  Click Write to begin writing.

Once the write process has been completed, you will want to edit the network configuration file on the SD card so that your Raspberry Pi will know which network to connect to.

Open octopi-network.txt with Notepad++.

You will type your router’s SSID and password in the text file and remove the # symbol to allow the commands to execute.

Example of lines edited:

Before

##WPA/WPA2 secure
#iface wlan0 inet manual
#wpa-ssid "put SSID here"
#wpa-psk "put password here"

After

##WPA/WPA2 secure
iface wlan0 inet manual
wpa-ssid "MyHomeWifiName"
wpa-psk "MyHomeWifiPassword"

Save the text file.

Eject the SD card and insert it into the Raspberry Pi.

Power the RaspberryPi on.

Next you will access the Octopi webpage that is being hosted from the Raspberry Pi by typing in the ip address of the Raspberry Pi in your browser.  If you do not know the ip address of your Raspberry Pi, you can check your homes router to view any newly connected devices or use a network scanning tool.  You can also use the link http://octopi.local/ to access the page as well.

 

When you first access the Octopi, you will be prompted with questions about security.  It is your option to use a user/password to access your printer.  I recommend securing this if you plan on accessing your printer outside of your network through the use of port forwarding.

Printer Profile Setup – Monoprice Mini Select V2

Note: These instructions only work for the MonoPrice Mini select V2 (MPMS V2).

Use the printer settings below for reach of the option menus and then click “confirm” at the bottom.

Once your printer has been setup and your Raspberry Pi has been restarted, go to the main page and select your printer from the connections tab.  Select 115200 for the Baudrate.  Click the connect button to connect your printer.

You can view that your printer has successfully connected by looking at the state of you printer on the left side of the main webpage window.

Troubleshooting

-Everything is working but the printer will not connect from the octopi webpage

Verify your printer settings are correct.  There is a wrench (settings) button in the top right corner.  The printer profiles can be edited here.

I sometimes have problems connected to the printer that was previously working and the connection will timeout.  Click connect then immediately disconnect and connect again.  I do not know why this works but it resolved my issue.

 

 

 

Arduino – What is it?

Arduino is a company that produces open source hardware and software used to control micro controllers.  Most of the Arduino, or Arduino-like, hardware you find will use one of the various Amtel Atmega and Attiny microchips.  These chips vary in size, shape, number of pins, flash memory, cost, PWM  (pulse width modulation) channels, timers and more.  The software is a mixture of C and C++ programming languages.

Arduino boards are typically used for simple, repetitive tasks.  Keep in mind these are not full blown computers.  Typically, you would select the hardware you would like to use (lights, servos, led displays, temperature sensor, valves, etc) and program how you want the micro controller to handle the input and output.

Arduino has reduced the learning curve and added error correction with programming microchips for prototyping your projects.

 

Raspberry Pi vs Arduino

I’ve heard the argument that a Raspberry Pi is better than Arduino because it is basically a small ARM based Linux computer with input and output pins.  I disagree with this completely.  The Pi has it’s purpose but it can be outdone by the Arduino in many cases because you can purchase and use ONLY the components you need.  A great example is that you would like to build a solar platform to follow the sun.  All that would be needed is a cheap Arduino board, some servos and a photo-resistor.  It will use less power, provide better reliability and be more cost effective.

The Raspberry Pi is a small computer that comes with video, audio and USB input/output.  Arduino is only use one main component, the micro-controller.   The Raspberry Pi uses 200-700 mA under different uses while the Arduino only uses a few millamperes.  I’ve found projects on the internet that use only the Atmega chipped programmed using Arduino software that can run for years on a single battery.

Device Types

There are many different types of devices that can be programmed by Arduino.  The list of devices that can be programmed with Arduino is longer than the Wiki found here.

Arduino Uno

The most popular board is the official Arduino Uno and it is currenlty listed for $22 at the Arduino store.  I recommend starting with this board as it is the most capable to test and learn with.   As you learn, I recommend keeping this board available so you can test and purchase a specific board that will meet your project’s needs.  There are a ton of pins that can be used for both input and output.  The ~ beside the pin number indicates that it is PWM capable (typically used for servos).

https://store.arduino.cc/usa/arduino-uno-rev3

NodeMCU

The next board is a Chinese variant know as the NodeMCU.  This board can be purchased for as little as $3 and is half the size of an Uno and is Wi-Fi capable out of the box. I was able to host a webpage from this device and connect an LED that could be controlled remotely.  You could connect a relay and use it to power devices on and off.

Digispark

The Digispark is uses the ATtiny microchip and is roughly the size of a quarter.  The Digispark pro actually has built in Wi-Fi.  Chinese variants can be found for as little as $2 online.  You will have limited inputs/outputs and the programs that you upload will be limited in size but the advantage is clear.  These are a no-brainier for small compact projects that only require a few pins.

ATtiny85

It is possible to build your own board and program the ATtiny85 in a stand alone project using an Arduino Uno.  I actually programmed one of these chips to control a MAX7219 Led display kit that I bought on eBay for $1.50 shipped.  See the video below if you’re interested.