2016-06-27

Getting started with the Raspberry Pi 3 OctoPrint Bundle




After upgrading to the low friction spool holder,
I just got myself the Raspberry Pi 3 OctoPrint Bundle from Watterott.
It shall be the center component of my Ultimate Filament sensor.

Since it doesn't come with any instructions, here is what you need to do:

Setup


Don't plug it in yet!
Insert the SD card into a regular computer and edit the file octopi-network.txt .


Then insert the 2 transparent elements into the 2 holes near the micro USB socket.
(Yes, there are 2 plugs for 4 holes and no instructions.)


Now insert the Raspberry Pi and then insert the SD card.
The contacts should face upwards.
(It is near impossible to the the cards out again.)

After switching it on, you can connect to it via http://octopi.local .

SSH

You can also access the raspberry via SSH
ssh pi@octopi.local
The default password is "raspberry.
The SD card is mounted as /boot
The OctoPrint config file is at "/home/pi/.octoprint/config.yaml"
You can restart the server via "sudo /etc/init.d/octoprint restart"

If your Wifi access point via
sudo sudo iwlist wlan0 scanning | grep ESSID
can't be seen by Linux, run
sudo raspi-config 
and select "5 internationalization options" -> "I4 select Wifi locale"
to enable the Raspberry to see all Wifi channels that are legal in your country.

The Raspian I got was very old. I had to provide Internet via Ethernet and do
sudo apt-get update
sudo apt-get dist-upgrade
then it was able to see Wifi networks on Channel 40 (5GHz) and 12+13 (2.4GHz).

GPIO fun 

While at the shell, you can have fun with the GPIO pins in Bash.
Sadly you can't set the pull-up resistors from the shell.
However my image came with WiringPi already installed.
It doesn't have a "--help" or a man page on the Pi itself, so here are the basics:
  • gpio readall
  • gpio mode (pin) in/out
  • gpio mode (pin) up/down/tri         (set pull up resistors)
  • gpio read (pin)
  • gpio write (pin) 0/1
  • gpio wfi (pin) rising/falling/both    (non-busy waiting for a state change)
  • (more)
  • (reading multiple gpios )
  • ...including timeout via read -t (seconds) || echo "timeout detected"  ...still in bash ;) 

Camera


Sorry, there is no hole for the Raspberry Pi camera. The best place to cut one is probably on the side (so you don't damage the cool logo), above the camera connector.

This longer cable (Reichelt) may be helpful.

Cura slicing

Luckily the Bundle comes with thje CuraEngine plugin preinstalled. So slicing it not much of a problem.You can imort your existing 15.x profiles (but not 2.1.1 profiles) in Settings->Plugins->CuraEngine->import profile.

BTW, there are "send to Octoprint" plugins for Cura on the desktop!

Ultimaker II setup

The Ultimaker series is not supported out of the box.

Settings->printer profile:

Profile  (UM2 extended)

  • Color: default
  • (X) Rectangular 
  • Origin: lower left
  • X: 223mm
  • Y: 223mm
  • Z: 315mm
  • (X) heated bed

Profile  (UM2 go)

  • Color: default
  • (X) Rectangular 
  • Origin: lower left
  • X: 120mm
  • Y: 120mm
  • Z: 115mm
  • (X) heated bed

Profile  (UM2)

  • Color: default
  • (X) Rectangular 
  • Origin: lower left
  • X: 223mm
  • Y: 223mm
  • Z: 205mm
  • (X) heated bed

 G-Code

After "after abort of a print job" enter:
;fans off
M107
;extruder heater off
M104 S0
;heated bed heater off (if you have it)
M140 S0
;metric values
G21
;absolute positioning
G90
;move Z and X/Y to min endstops
G28 Z0 X0 Y0
;relative positioning
G91
;retract the filament
G1 E-5 F300
;steppers off
M84
;absolute positioning
G90


Cura 15

in Cura set: GCode Type = RepRap (Marlin/Sprinter)
start.gcode (first line must be blank)

;Sliced at: {day} {date} {time}
;Basic settings: Layer height: {layer_height} Walls: {wall_thickness} Fill: {fill_density}
;Print time: {print_time}
;Filament used: {filament_amount}m {filament_weight}g
;Filament cost: {filament_cost}
;M190 S{print_bed_temperature} ;Uncomment to add your own bed temperature line
;M109 S{print_temperature} ;Uncomment to add your own temperature line
G21        ;metric values
G90        ;absolute positioning
M82        ;set extruder to absolute mode
M107       ;start with the fan off
G28 X0 Y0  ;move X/Y to min endstops
G28 Z0     ;move Z to min endstops
G0 X20 Y20 F{travel_speed} ;bring extruder to the front
G1 Z25.0 F{travel_speed} ;move the platform down 25mm
G92 E0                  ;zero the extruded length
G1 F200 E25              ;extrude 25mm of feed stock
G92 E0                  ;zero the extruded length again
G1 F{travel_speed}
;Put printing message on LCD screen
M117 Printing...
end.gcode (first line must be blank)
;End GCode
M107 ;fans off
M104 S0                     ;extruder heater off
M140 S0                     ;heated bed heater off (if you have it)
G21 ;metric values
G90 ;absolute positioning
G28 Z0 X0 Y0 ;move Z and  X/Y to min endstops
G91                                    ;relative positioning
G1 E-15 F300 ;retract the filament
M84                         ;steppers off
G90                         ;absolute positioning
;{profile_string}

Cura 2.1


The documentation SHOULD BE here However that's terribly incomplete.
There is a lengthy discussion here where I'm still trying to reverse engineer how to do this.
Currenly I'm creating a new UM2_octoprint.cfg file in /Users/USER/.cura/machine_instances (MacOS),
[general]
name = Ultimaker 2 Extended (Octoprint)
type = ultimaker2_extended
active_profile = Normal Quality
version = 1

[machine_settings]
machine_height = 315
uses_materials = true
machine_end_gcode = ;Gcode commands to be executed at the very end
    M104 S0
    M140 S0
    G92 E1
    G1 E-1 F300
    G28 X0 Y0
    M84
machine_start_gcode = ;Gcode commands to be executed at the very start
    G28 ; Home
    G1 Z15.0 F6000
    G92 E0
    G1 F200 E3
    G92 E0
machine_gcode_flavor = RepRap

However I can't make any of the temperature settings visible and I can't offer any kind of material-selection.

Ultimaker II attachment

mechanical

It looks like self adhesive Velcro is the best option to attach the box to the back of your Ultimaker II.

Electrical


Having a Raspberry Pi permanently connected to your printer, that has ample 5V and 12V, it is kind of silly to power it via a separate wall wart. So we should see about powering it from the Ultimaker.

Links:

2016-06-20

Ultimaker II upgrade with Low Friction Spool-Holder


I'm currently upgrading my Ultimaker II with a "Low friction UM2 spoolholder" the YouMagine user IRobertI.

As I print a lot, I use huge and heavy Colorfabb 2.2Kg spools.
So when a spool is fresh and heavy, there is a lot of friction involved that the extruder needs to overcome.
My hope is to reduce this friction a great deal with this simple upgrade.

Notes:   
  • Print "608 mount" ith lots of infill, a large nozzle and thick layers. It needs to be strong.
  • M8x140 is plenty of length. It should have a hex head, so you only need 2 M8 nuts
  • You can use counter nuts (4 in total), so the nuts stay in place even with lots of vibration over a long time period
  • Use a bolt that has threads all the way (no smooth shaf and only threads at the tip)
  • Clean up the inside of "608 Core2 90mm" and "core 1", so a 608 bearing can be inserted into the far end
  • check the order of assembly:
  1. insert M8x100 hex headed bolt into "608 mount
  2. add M8 nut and 608 (skateboard) bearing, so "core 1" has a small air-gap wi "608 mount"
  3. add "core 1"
  4. add spacer
  5. add another 608 bearing and M8 nut (don't overrighten)
  6. add "608 Core2 90mm"
  7. add final "608 nut"



2016-06-18

Panasonic YAGH for GH4 disassembly

Project

I received a broken Panasonic YAGH unit for a GH4/GH4R camera.
The description was that it simply failed at some point and was dead. The original owner has a second YAGH in operation, so I'm ruling out handling error.

Since the Audio part also did not work, I can rule out any ground loop or static electricity issue with the SDI ports as the cause.
If the SDI ports  are broken, I'm still left with a good XLR audio preamp for my GH4. ;)

My educated guess is a burned protection diode/0 Ohm resistor/fuse in the power supply due to a power spike or ground loop.

Disassembly

This unit is all nuts and bolts.
Don't start this disassembly unless you have
  • a LOT of table space to lay out the bolts
  • a means to print photos you made of each board/side/layer to put the bolts on
  • I learned the hard way that putting the unit onto a photocopier does NOT produce good results
You have to remove all visible screws on all sides to remove the outher plastic hull.
Use the photos I made to get a good understanding of how the different parts inside connect to disassemble them later.
You can have to disconnect the board with the 2 XLR audio connectors to physically separate "Main" and "Power" board.
You have to disconnect the front panel "SW-Audio" board from the "Main" board to to physically separate the elements
You have to remove the lower board "Main" with the SDI connectors to remove the plastic on top of the "Power" board. 

Aparently you can reconnect things in a way to run the YAGH without any case and easily reachable contacts. Just the upper side of "Main" and lower side of "POWER" are blocked because they mate to each other.

What surprised me was, that the unit actually contains an micro-HDMI to HDMI cable and a full sized HDMI socket inside!
My guess is that this is to easily replace a broken cable but then again...you need to completely disasembly EVERYTHING to reach that cable.

Power supply

 

The unit accepts XLR power with
  • 12V applied on Pin 4 and 
  • GND on pin 1. 
  • Pin 2+3 are not connected
  • Rated for 11-17V (1.4A at 12V) -> 16.8V D-Tap  power is fine but very near the top limit

Setup: I'm testing the unit with a DTap to XLR power adapter cable.
I could also use a lab power supply but attaching it would be difficult as the cables are very well insulated and leave no place where I could attach clamps.

Lessons learned: aparently you CAN insert a chinese D-Tap plug THE WRONG WAY without any resistance.

Found the problem? The Power board is not supplying power to any of the other board. The fuses are intact and there are no obviously burned capacitors or diodes that I could easily replace.

 SDI out

 

  • 1080p24/25/30 -> the same 1.5G SDI signal on all 4 outputs
  • 1080p50/60 -> the same 3G SDI signal on output 1 and 2
  • UHD at 24/2530fps or DCI 4K at 24fps ->4 FullHD segments as 1.5G SDI signals on each port
Conclusion: I can test the SDI ports using my Atomos Samurai Blade or shogun that both only have a single SDI input.

Audio board 


XLR inputs arrive in a small board "CJBB84417" with only passive componente.
They are then routed into the board "VJBB0F44" with 4 low noise amplifiers labeled "8202 304 JRC".
It also houses the Pogo pins to the large connector on the camera and a large connector to the main board.
Guesses:
My guess is, that this does all the audio pre-amp and hands these over to the camera.
It should also provide the volume level to the main board for display and get level information from the input board via the main board somehow.
All the other pins should just be routed through from the main board to the camera.
I fuether guess that if I supply this board with power and connect it to the GH4, it may work on it's own (with a fixed level value).
If the amplifiers are similar to the NJM8202, they should have a 15V power supply.

Links

2016-06-15

Ultimaker II filament sensor and remote control using Raspberry Pi


The Plan

This is still an idea, growing in my head. I don't know if or when I'll build it.

I want to attach a Raspberry Pi 3 to my Ultimaker II extended.
Obviously with Wifi and USB it will have
  • a camera, watching the print
  • a GPIO pin an Octoprint API call telling the Ultimaker to pause the print (via a tiny firmware modification)
I will replace the small, plastic filament idler pulley on the back of the maching (opposite to the extruder drive mechanism) and replace it with a ball bearing and 2 sensors
  • a trivial 2 bit rotary encoder to meassure the speed and amount of the filament and auto-pause if no filament is transported anymore
  • a load cell with a Hx711 module to tell how much pulling force is applied and auto-pause on no force = filament empty and too much force = something blocks the filament from moving
The too much force - part means it will also detect obstacles that would otherwise lead to underextrusion because filament is still being transported but way less then there should be.
  • a second load cell in the modified "Low friction UM2 spoolholder" will meassure the weight of the spool and thus tell me how much filament is left.
  • the modification is a 12-20cm arm with the load cell attached

Status

  1. DONE: Raspberry Pi with Octoprint installed
  2. DONE: Designed parts for first prototype (using only Encoder and Dummy-Load Cells)
  3. DONE: Rotary Encoder arrived
  4. DONE: Pinout specified
  5. Work In Progress: Waiting for load cells and Hx711 from China
  6. DONE: Test rotary encoder from Raspberry PI command line
  7. DONE: Test Octoprint API from Raspberry PI command line
  8. DONE:  Convert rotary encoder values to binary positions, movements, direction and speed
  9. DONE:  Wrote a simple filament monitor script that detects stalls and reverse movement and pauses the print via the Octoprint API
  10. Warning! The current "pause" in the Octoprint API is dangerous for scripts. It can resume if issued twice.
  11. TODO: design modified "608 mount" to weight the remaining filament 
  12. TODO: Write the final software including monitoring pulling force and spool-scale



MKI
MKII
Testing rotary encoder

The software

I'm planning on having a Raspberry Pi running Octoprint as the central controller.
The advantage is, that via the Octoprint API, I can detect if filament is supposed to move at the moment and issue a pause command without hacking the firmware and dual-using one of the homing switches as an E-Stop.

The parts

New method (using Octoprint API)
Old method (using GPIO signal to pause the printer):

2016-04-18

continuous Multicam recording

I know, I have too many cameras.
What do you say. It's a hobby of mine.
But every now and then I actually use all of them... at the same time.
Lectures and events have a tendency of ending up as multicam events that need more then 20 or 40 minutes per camera and should have their highest possible quality because they simply can't be repeated. 


Surprisingly I got my hands on a used Ninja 2 on eBay.
Now I have completed my setup!
(inserts manic laughter here) 

Center

One GH4R with no internal recording limit can be powered by an Atomos Power Station and record in 4:2:2 onto a Ninja Assassin in UHD for the wide shot that also gives crispy sharp, post-stabilized, post-panned FullHD medium shots as a crop. It doesn't move or refocus and thus needs little monitoring.(for Wifi monitoring I would have to switch from 10bit down to 8bit and I won't do that)
An internal MPEG backup recording is running.
Zoom H6 does the sound as 6 wav including - 4dB  backup against clipping channels ,if not all channels are uses and has its line out run into the Ninja Assassin too. Channel 1+2  are the Mid/Side microphone because that gives perfect Mono down mix and can not have any stereo cancellations like the shotguns 3+4. 5+6 is a Rode VideoLink digital wireless channel to a Lavalier. 

Remote Right

One Blackmagic Pocket Cinema Camera on the far right. Powered from a Lanparte V-mount plate. An Atomos H2S converts the HDMI to SDI.
An internal ProRes LT backup recording is running.
It provides FullHD Closeups from the right .
The SDI cable runs to left side. 

Left

There am I with an Atomos Samurai Blade, monitoring and recording it and giving instructions via PMR radio to match my own framing.
Myself I am with another Blackmagic Pocket Cinema Camera, another Lanparte battery plate and the Ninja 2 for matching Closeups from the left side. Monitor is not as good and I have no scopes but I have my eyes and the screen of the camera.
Now we have wide shots from dead centered with any crop we desire and Closeups for dialogues from left and right.
Wenever something important is obscured from one side, we have 2 different angles to choose from.

Advantages

  • Each recording has a backup. 
  • I can see what the opposite camera is doing including focus peaking and give instructions
  • HDD (Fullhd)  and SSD (UHD) drives last forever 
  • so do the batteries 
  • audio from 3 locations +lav in case a chair chair squeaks and for a wide applause with no single shouts standing out
  • all recordings are in 10bit (or raw)  -  no banding when I pull the midtones up of down in post or pull up the shadows 
  • all recordings are in ProRes (or raw) - fine noise floor for NeatVideo to work with and no MPEG artifacts 
  • Editing off the 3 SATA drives directly with no need to copy anything

2016-04-11

GH4 und Lumix Club - Wie kriegt man die 100GB?


Mit dem V2.5 Firmware Upgrade für die GH4/GH4R soll man 100GB freien Speichersplatz bei Google Drive bekommen.
Kommt aus dieser Presse-Meldung:

http://www.presseportal.de/pm/14151/3293032
und wird auch so fleißig überall abgedruckt.

...bis man mal versucht das so zu machen.

Zitat:
"*Nutzer müssen sich zunächst im LUMIX CLUB (http://lumixclub.panasonic.net/ger/c/) registrieren, um dort den Speicherplatz für Google Drive zu erhalten und bis 30. September 2016 den Account Service aktivieren.
Eine Kurzanleitung zur LUMIX Club Registrierung ist verfügbar unter ftp://ftp.panasonic.com/camera/howto/compact_cameras_how_to_create_a_lumix_club_account_howto.html"



  1. Im Lumix Club findet sich kein "Google Drive"

  2. Einen "Account Service" gibt es dort gar nicht

  3. Auch die angegebene Kurzanleitung schwiegt sich zum "Account Service" und zu Google Drive aus.

  4. dafür aber das schon vor Jahren in Google+ aufgelöste Google Picasa
-> Der Lumix Club zeigt auf der Startseite dem Nutzer 3 Wartungsmeldungen aus dem Jahre 2014 

  5. Wird die Englische Sprach-Variante benutzt, kann für Support-Anfragen "Deutschland" nicht als Land ausgewählt werden

  6. Support-Anfragen sind auf ein Feld von nur einer Zeile und 20 Zeichen Breite beschränkt.


Wie zum Henker soll  man das machen?

2016-04-09

Film making power box MK II

As many of you know, amateur film making is a hobby of mine.
One particular topic I started to adress was having all these different battery types and their chargers for all the cameras, hdmi recorders, monitors, lights, ...
A while ago, I made a charging box. A euro-sized box with a 19" power socket strip and 2 velcro strips to hold all my chargers in place.

charging box MK II


I upgraded my charging box to twice as many power sockets.
Also there are 4 rows of velcro, to hold twice as many chargers.

I'm still waiting for a universal charger with 2x2A and independently interchangeable plates for NP-F, GH4, AA/AAA and BMPCC batteries. That one will take up additional space and an additional power socket and I was already running out of both.

proper labeling



All NP-F batteries are now labeled with their size on side add front and all chargers with their maximum current and battery type.

There is enough confusion and chaos as it is.
Simple, ubiquitous tasks like Batteries and charging should not be a part of that.
1 standard, stackable Euro-sized box, 1 power cable, 1 switch and it even has sockets to spare.
All my chargers are attached with Velcro also can be removed to use them elsewhere and exchanged for different ones.

Each camera has its box and you can see the size of the batteries just by looking into the box (front) or when it is mounted in some device (side).

Lanparte VBP- 01





Why this emphasizis on NP-F? Because that's my ONE battery standard that can power everything now.

Two Lanparte V-mount plates arrived.
With 2xNP-F to V-mount adaptors I can now power everything(5V accessories, 7.4V cameras and recorders and 12V accessories and 12-15V cameras) , from one type of battery and from mains power while charging these batteries in the Lanparte without taking them off.
AND I have the option of renting huge, expensive V-mount batteries without even having to rent an expensive charger for very, very long sessions.
(The charging and mains power is the huge advantage of the more expensive Lanparte plates.)


Future project:
Add a step-up converter into the dual NP-F to V-mount adaptors, so they also work with only 1 battery. Meaning I can replace batteries on the go. Downside is: I will loose the ability to charge the NP-F.

WARNING
The ground level on left and right side of the Lanparte is different. Some people have burned their BMPCC and BMCC HDMI ports by powering an Hdmi recorder and the camera from the same plate while they are creating a ground loop via the HDMI cable.
I GUESS using the same side (you have 12V on both sides) SHOULD be safe. 

Also the HDMI splitter in the Lanparte is incompatible with the signal a BMPCC outputs. I already knew this. 

Links

  • HDMI port on my Pocket melted!!
    http://www.bmcuser.com/showthread.php?10743-HDMI-port-on-my-Pocket-melted!!

  • Issue analysis and recommendations by David Green
    • only fiddle with the HDMI/SDI cables when both devices are OFF (the SDI/HDMI standard specifies insufficient ESD-protection against static discharge)
    • Connect HDMI/SDI first, THEN connect power
    • Make sure you are discharged when handling HDMI/SDI/SATA
    • The TRS(German: Klinke) Audio connection is safe against any ground loops.
    • These steps are against static discharge as well as against a discharge caused by different, floating ground levels on the regulators that power monitor and camera
    • Note: using 2 regulators that have a different ground level that is not isolated from each other, is a receipt for desaster.
    • Powering all devices from the same (e.g. D-Tap) output is safe because they all share the same ground level.
  • another thread about this issue
  • thread with an opned BMCC. SDI GND is connected to Power-GND.
    • analysis: source should be floating GND-levels on the different regulators in the plate to drift and thus build up a voltage different (that the ESD-protection can't handle when connecting HDMI after both devices are already under power)

+