PakaHuszar
All about my DIY electronics projects
2022. május 14., szombat
New Arrivals 6. - (special edition)
2022. május 7., szombat
Octoprint in docker
This is just a short title of this article. I would rather call it: "Octoprint in those chip shortage times"
Today it is not so easy or cheap to acquire a good platform for Octoprint. Raspberry Pi almost seized to exists. If you can buy it somewhere it cost a lot.
I'm a DevOps guy nowadays for profession. I fell in love with the containerized (and orchestrated, cloud based iaC) infrastructures. The Octoprint is a good candidate for this, as itself is unable to handle more than one 3D printer.
Actually I've several tasks in the lab, what need server side background computing. So, I just picked up an old (not too old) PC from my ceiling (the most important requirement to have a 64bit CPU already).
Installed a shiny new Ubuntu 22.04 LTE Server on it. There is only thing I installed during the setup process: OpenSSH. I don't install Docker from snap, what suggested by the install process. It caused problems to me, so I leave it out for now.
At the first login I switch to root console (sudo su). I do this for comfort. I asked for password once during this process.
Docker
Install docker from docker's repository (instead of Ubuntu)
curl -s https://download.docker.com/linux/ubuntu/gpg | gpg --no-default-keyring --keyring gnupg-ring:/etc/apt/trusted.gpg.d/docker.gpg --import
chmod 644 /etc/apt/trusted.gpg.d/docker.gpg
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
apt update
apt install docker-ce docker-ce-cli containerd.io
apt upgrade -y
Static IP
I suggest to fix the IP address of the machine some way. Right now I'm using a pathetically shitty router from the provider, but at least it is able to add static lease to the DHCP service, so I choose this. On the other side I'm not so fortunate with it's DNS service. So with the naming I'll relay on the host file and not a DNS.
Proxy
I'd like to be able to access the services with name, instead of IP address and port. To be able to achieve this, the first thing I install is the jwilder/nginx-proxy, what I use frequently for this task
docker run -d -p 80:80 --restart=always --name=proxy -v /var/run/docker.sock:/tmp/docker.sock:ro jwilder/nginx-proxy
Portainer
As I'm using mostly command line to manage docker, it is a good idea to have a kind of dashboard to see, what is happening. I'm using Portainer for this for a long time now. Here is the first time when it advisable to have a folder, or a named volume on the host to map as data into the container. Here I choose a folder for this. It will allow me later to mount some external storage (NFS in a NAS device in my case) to hold and backup this data.
So just add some folder for it (we will need one for Octoprint also, so I create it here also):
mkdir -p /data/portainer
mkdir -p /data/octoprint-geeetech
chmod -R 777 /data
Install the Portainer:
docker run -d -e VIRTUAL_HOST=portainer.it-pro.local -e VIRTUAL_PORT=9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v /data/portainer:/data portainer/portainer-ce
Now try out if our Portainer is working. You need to add the Portainer in the name resolution in some way. Either as a CNAME record to the DNS or the host file in your client machine. In my case it is the later one on my Windows machine (c:\windows\system32\drivers\etc\hosts)
This case I add the following:
192.168.0.10 portainer.it-pro.local
From your browser you can connect to the Portainer and setup your user:
Device file
lsusb -v
This will give back all of the parameters your device have. You can collect the VID, PID and the serial number from it.
My printer report this:
Based on this, you can add the creation of your device alias to the udev rules:
echo 'SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", ATTRS{serial}=="A903RZMJ", SYMLINK+="ttyGeeetech"' >> /etc/udev/rules.d/99-usb-serial.rules
Reload the rules:
udevadm control --reload-rules
You can check with ls -la /dev/tty* if the device file is in it's place
The udevadm command wasn't work for me (probably disconnecting and reconnecting the printer does the trick), so rebooted the machine, what resolved it:
Octoprint
Last piece of the puzzle is the Octoprint itself:
docker run -d --restart=always -v /data/octoprint-geeetech:/octoprint --device /dev/ttyGeeetech:/dev/ttyACM0 -e VIRTUAL_HOST=geeetech.it-pro.local -e VIRTUAL_PORT=80 --name octoprint_geeetech octoprint/octoprint
One additional line added to the hosts file:
192.168.0.10 geeetech.it-pro.local
Now you can connect to the Octoprint from your browser:
2022. április 13., szerda
CNC Router Reborn 2.
Its been a while I write about the CNC project. It is in the state, I eventually work on it, so it advance really slowly.
It is time to write about the current state.
What happened since last time:
- Mounted the controller hardware (GRBL controller, stepper drivers, except the spindle controller into the PC box)
- Cut the back panel to fit into the place of the original PC card back panels
- Rewire the entire frame with longer cables (needed to be able to put the new controller case to the ground next to the CNC routers table)
The controller from inside:
The back panel (hole for the connectors still need to drill):
The new dymo heathshrink labels in action:
After I finished the cabling realized that one of the connectors miss the screw lock ring. Am I so idiot that it fall from the connector before assembly and I didn't realize it?
Nope. I just found on the floor:
What a shitty material those guys use. I fall from a meter to the floor and broke into pieces.
What's next:
- Drill the connector holes to the back panel and assemble the whole motion control
- Create mounting hardware for the spindle controller (probably 3D printed)
- Create a front panel with vent holes for the 600W PSU
- Put everything together and test is
2022. április 6., szerda
New Arrivals 5.
Old UPS
I bought an old UPS without batteries mainly for getting it's enclosure for later projects. It cost me $10 delivered
It is Hungarian made from the "good old days". Disassembled it. The build quality was a real surprise to me. No welds, pop rivets, just machine screws everywhere. No soldering at the connectors, just proper terminals. No junk parts, just well known manufacturers one.1x DELTA 04BEEG3SA mains inlet with filter Current cost: $10.53
2x RICH BAY RG-02 mains outlet Current cost: $15.65 (for the two)
Together: $38.75
I also have a big power transformer and the enclosure itself.
I think it was a good deal.
Finally my 110 Tool arrived
No idea yet, when will I work on the lab's network, where I need this.
Triax connectors
It took a long time to get the triax connectors into my hands for the Keithley 236, but finally got it. On the Aliexpress I found one seller, who sell 5 pcs connectors on the price of one at Farnell.
Triax cable
Neither widely available nor cheep is the required triax cable. Not the wire core - insulation - shield - foil - insulation type (what on many places called triaxial), but the wire core - insulation - shield - insulation - shield - insulation type where the two shielding electrically insulated from each other.
Usually it is sold in large quantity (you need to buy the whole roll). Fortunately I found an 8m piece on the FB marketplace locally, for a few bucks.
It was horribly stinky (felt like a complete ashtray), but I was able to clean it up. When my Keithley 236 find its place in the lab, I'll build proper cables for it.
Dymo heath shrink
I wasn't aware that this thing even exists. I'm still in the rebuilding of my CNC router. It has markings on the stepper axis cables. I wasn't able to imagine, how those markings are made. Now I know. Somebody on an FB group shown it. As I have a USB Dymo printer, I immediately ordered a few packs in different sizes. When I get there to finish those cables, I'll use this as a marker.
47pcs unknown small transformer
(bought for $0.4 each)
As I have similar transformers, my assumption was, that I just need to measure while connecting to the 230V mains and I can use them. As I'm cautious guy, first I measured the coil DC resistance, just to have some idea. It come out 380 mOhm / 50 mOhm (primary/secondary). It is way too low for such transformer.
I have a same mechanical size 230V/230V transformer with 5,5 kOhm / 6,3kOhm coil resistance.
So the question is: what a hell this transformers are good for?
SMPS? Kind of filter? Something else?
No idea yet. There is two direction to figure out:
1. Disassemble one and see, what is in there (type of core, number of windings, wire diameter)
2. Measure.
I definitely choose the second option. I intend to measure inductivity, how it works on various frequencies, what is the ratio between the two coils, what is the highest achievable efficiency, where the core saturates, etc.
This is just a rough idea right now, how to measure. I intend to collect the following instrument park for this: A proper LCR meter, four DMMs, a power amplifier, and an oscilloscope, DC Load (I don"t have an AC Load, so a DC load with schottky diodes and filter capacitor would be good enough)
Here is some basic idea, what I intend to do (bit more, but this is good for starting):
https://www.youtube.com/watch?v=LWbHJoUrJWc
2022. április 4., hétfő
Pan & Tilt gimbal project?
In the last two weeks I didn't have too much time to work on my hobby projects or even to continue to build my lab.
To be honest I even didn't feel like working on any of my currently running projects. (There is the time to start a new unfinished project 😄)
There is something itching in my mind. I need an MCU controlled pan and tilt head for a mobile phone (camera). I would like to have it to generate a 360 view for a room, what I need for undisclosed reasons.
The original idea to build the pan and tilt head from 3D printed parts and Nema stepper motors. Control it from an ESP32 based 3D printer controller, like this:
https://www.aliexpress.com/item/1005001704413148.html
Also add some Wi-Fi based web interface to the ESP32 and control the phone mounted on the pan and tilt head via blutooth.
This idea was forming in the last two weeks. Fortunately I didn't order the things I collected for this. Those are just sitting in my Aliexpress basket.
Yesterday I was thinking to start the ESP programming and the 3D design of the components.
Eventually I found something interesting
This is a Zifon YT-1000 pan & tilt head.2022. március 13., vasárnap
New workshop 3.
In almost all of my free time on the last week, I worked on the lab benches. Sanded, drilled, oiled, built.
Here is the result:
Unfortunately, it is far form the end. But at least some progress.
At the long weekend I plan to move some things down, and also start to work on my big rack cabinets I have already.
New Arrivals 4.
I couldn't resist. I bought two additional VXI Mainframes.
Since I got the first, wanted one with the keypad and the display in the front. The one without it just looks ugly.
Unfortunately my 3D printer has some issues, So I can't print the mounting hardware right now. Update is coming on this.
As I building my new lab, I know that I'll have some twisted pair cabling work. I not yet know which kind of crimping system will I use. So ordered a Krone tool and a 110 tool.