2018. május 31., csütörtök

Titan Struggling

I'm just quietly asking. It is allowed to look like this after a few month light usage, or after a stacked print? E3D Titan Extruder - original UK version ordered from E3D-Online.


2018. május 12., szombat

Leather instrumentation microscope

This project came from my wife.
A special microscope exists on the market, what has heated bed. It can be used to examine samples from old artifacts before restoration. It specifically used for leather objects in our case, but it can be used for other things also.
The goal is to determine the exact temperature when certain change happen in the material.
This is a time consuming task, the currently used equipment is fairly old, and limited in functionality.
I decided to design and build a new one.
"If the only tool you have is a hammer, you tend to see every problem as a nail."
So, build a 3D Printer!!!
The plan is the following:
Hardware (mostly):
  • Build a heated platform, controlled from an Arduino Mega, Marlin firmware and use PID control for the bed, using an external MOSFET. Measured with the usual 100K NTC (actually disassembled one from the "anettka" original MK8 head).
  • Variable intensity lighting from the bottom (Case lighting from the Marlin)
  • Z axis leadscrew with a Nema 17 stepper DRV8825, and endstop(s). A microscope camera mounted on it. The axis controls the focus of the camera
  • The camera and the Arduino is hooked onto a PC via usb
Software:
I plan to write the following in C#:
  • Control the heating through gcode to achieve the required heating curve (PID tuning also involved)
  • Record the camera image with timestamp and temperature
  • Overlay the parameters (time, temperature) into the recording
  • Manually control the Z axis from the PC
Later:
Autofocus based on the camera picture, convolution matrix and similar computer vision voodoo

For the video and camera handling I plan to use aforge.net framework, what I already used before.

2018. május 6., vasárnap

Home Automation - building docker

I started to build the Docker infrastructure on my Hyper-V servers for my home automation (and other) workloads.
My comfort zone if we are talking about linux is mainly Ubuntu and Debian. I heard from various places that I should use Alpine for Docker. Actually I run already into some prebuilt Docker images what based on Alpine during my daily work. So I decided to build this new system on Alpine thinking it is a good opportunity to learn it.
First:
Downloaded the image optimized for virtualization as guest, configured a Gen2 Hyper-V guest and started it.
Yes, it is optimized for virtualization, but not for Hyper-V. Not even started
Second:
Downloaded the standard image. This was able to start in the Hyper-V so, I installed into the vhdx.
As I'm usually copying the image to create a new virtual machine, the Alpine gets here a plus point from me, as it doesn't need boot process tweaking like the Ubuntu for the disk image copying.
Installed nano, as I'll need to edit some config files in the actual machines, and started to replicate the disk images, create additional virtual machines
Third:
I've set the IP address, machine name, DNS, gateway, etc. Just the usuals things.
After reboot it won't start anymore. The reason is the chronyd. As it wasn't able to aquire the time from the internet, waited indefinitely in the boot process. No console, no SSH.
Ok. machine killed, recreated from my base image. Looked around, find nothing. Finally checked the contents of the alpine chronyd package and find out, that I can add the timeout option into the /etc/conf.d/chronyd file. In the ARGS add -t 60
Fourth:
Configured SSH for my needs, added the additional repo for some extra packages needed by the Docker engine.
Installed Docker on all of the x64 machines, setup startup of the Docker
Fifth:
Starting Docker on the machines give this error:


After several attempts I failed to resolve this issue, but find some articles discussing why the Alpine doesn't fit to the task:
http://janhapke.com/blog/alpine-linux-sucks-for-hosting-docker-containers/
http://www.nathanbak.com/?p=37

So I decided. Forget this and go back to Ubuntu. My next try will be on the shiny new Ubuntu 18.04 LTS

Home Automation center

In 2016 I started to work on a home automation project what I finally abandoned.
Since then, I feel more and more, that I need something for the task. As I finished the repairing of my Robo3D printer, I had no current running project, so I started a poll on my (Hungarian) blog asking for my next project.
The home automation center was the clear winner of the poll. I started to think, what to do, and how.
The things I decided:

  • I want to build the system incrementally beginning with the center
  • I'll use OpenHAB as the center (this supports my FHT/FS20 Conrad thermostats)
  • I want to build it as a High Availability solution
  • I want to be able to use it even the internet connection is broken
  • I want to run it on some kind of SBC
  • I want to use 64bit system - to be as future proof as it can
  • I want to use things I already have


About my current IT infrastructure - It has big impact to my decision:
I've two VPN connected sites, one is my home and the other is my office. I've currently 4 MS Hyper-V servers. 3 in the office, one at home. The system will be based mainly on Docker.
I plan to build a 1U rack box, containing two Pine64 boards, two 5V PSU and maybe two disks.
I'll build two Docker Swarm clusters:

  1. An x64 Cluster: Two Manager/Worker combined nodes placed on two Hyper-V guests in the office and an additional Manager node on my home Hyper-V.
  2. An ARM Cluster: Two Manager nodes placed on two Hyper-V guests in the office and an additional on my home Hyper-V, the two Pine64 will act as worker nodes.

I want to place the OpenHAB containers on the Pine64s, plus GlusterFS, plus HAProxy as HA solution.
To the x64 Cluster goes the supporting components:

  • Private docker registry
  • Zabbix or Nagios monitoring
  • Additional containers needed for my work (not Home Automation related)

The location/implementation of data collection, MQTT based control is not decided yet.
When the system above is up and running, I'll go further with the integration of sensors and actuators.

And yes, before you ask: - I'm a complette idiot. :-D

2018. május 1., kedd

Robo3D reconstruction

Its been a while I didn't write anything.
In the last month I had not too much time to work on my projects. I just focused on one thing.
It was almost five years ago that I started my long struggling journey in the 3D printing. At that time my intention was to use the printed parts in my electronics projects and not to involve myself in the technology. This changed since, learned a lot. The main reason is that the printer I bought the Robo3D is a heap of crap. It took me two years to get some acceptable results. Then it broke once more, and I put it to the side until now.
I wanted to have a 3D printer in the office, so I repaired the Robo.

  • Printed a new improved Greg's wade extruder
  • Designed a new object heater
  • Replaced the Z endstop with capacitive sensor (actually works quite well with the glass only bed)
  • Replaced the electronics with a completely new Arduino Mega + Ramps + DRV8825 set
  • Added a graphic LCD
  • Added cooling for the electronics (a computer HDD cooler)
  • Built a customized current Marlin for it
  • Added a case light (two LED strips to the top)
  • Replaced the E3D v6 to a new one (with the cartridge type heather block)
  • Replaced most of the cabling

Here is the result, with the first print on the bed:


Just some gluing and cable tightening left for today until I can bring it to the office.

2018. február 20., kedd

Micro:bit - self hosting

If you want to use the Microsoft MakeCode for programming your micro:bit you can use the online editor hosted by microbit.org:
https://makecode.microbit.org/#
Actually it has some drawbacks:
The site has no login. So you don't have your own environment online.
It store your projects on your computer (but actually I don't know where - I didn't find documentation on i). I'm working on my projects on three different computers. This makes virtually impossible to transfer or put into secure place (git server) my projects.
There are situations when you want to work on your things when disconnected from the internet.
Anyhow. It is possible to run the environment on your own computer:

  1. Install NodeJS. You can download it from here: https://nodejs.org/en/
    The current LTS version is sufficient
  2. Create a folder on your computer to store your projects, for example c:\microbit
  3. Open a command prompt and execute the following commands:
    npm install -g pxt
    npm install

    Close the command prompt (necessary for the environment variables just created)
  4. Open a command prompt and navigate to your folder:
    c:
    cd microbit
  5. Execute the  following command:
    pxt target microbit
Now your environment is ready. You can start it with tho following command:
pxt serve
Next time when you want to run it, this is the only command needed.
When it starts you can realize two things:

  • The command prompt you'll see a continuously rolling error message:
    "Error: ENOENT: no such file or directory, open 'C:\microbit\node_modules\pxt-microbit\targetconfig.json'"
  • There are no installable package in the "add packages" list just the integrated ones:

This means, you can't add any add-on.
The missing file is the descriptor of the add-on packages. You can download a template from here:
https://github.com/Microsoft/pxt-microbit/blob/master/targetconfig.json
So, if you stop the server (Ctrl-C), download this file into the folder mentioned in the error message, than restart the server (pxt serve). The error message will disappear and you can see the add-ons:


This file also can be used to add our own add-ons if we find something on the internet and want to add to our environment.