Commit a6a0392b authored by Thomas Jensen's avatar Thomas Jensen

change figure and video shortcode to use inner as caption

parent 1f5268a2
......@@ -21,35 +21,36 @@ $ xclip -o -sel clipboard > index.md
## Video
```
resources:
- src: "videos/smoke_test_ventilation_ceiling.webm"
title: "Ventilation smoke test"
params:
- caption: "Testing exchaust ventilation using a smoke match."
date: 2018-09-01
{{< video "VID_20171210_225837" >}}
LEDs mounted in the elf house.
{{< /video >}}
```
## Figure
```
resources:
- src: "images/20160726_103126.*"
params:
- caption: "Image of thing."
{{< figure "20160726_103126" Fill "450x350 center" />}}
Image of thing.
{{< /figure >}}
{{< figure "20160726_103126" Fill "450x350 center" >}}
{{< figure "vogna-1" Fill 250x250 >}}
{{< figure "vogna-1" Fill 250x250 />}}
```
## Notice
```
{{< notice >}}
{{< notice [type] >}}
Also have a look at any posts with the [electronics lab tag](/tags/electronics-lab/).
{{< /notice >}}
```
Valid types; `info`, `warning`, `success`, `danger`
## Unsplash
```
{{< unsplash url="https://unsplash.com/@andrewtneel" name="Andrew Neel" >}}
```
## Katex
Not implemented.
```
css:
- {src: "katex.min"}
......@@ -62,6 +63,7 @@ $$
```
## Asciinema
Not implemented.
```
TBD
```
......
......@@ -56,6 +56,7 @@ div.highlight {
code {
color: #d0d0d0;
background-color: #202020;
border-radius: 0;
}
pre code {
......
......@@ -11,53 +11,14 @@ aliases:
- /@thomas/
- /@hebron/
- /author/thomas/
resources:
- src: "images/20160726_103126.*"
params: {caption: "Me, at work, with computer glasses and headphones."}
- src: "images/vogna-1.*"
params: {caption: "Dad and I, building the undercarriage of the cycle trolley."}
- src: "images/vogna-3.*"
params: {caption: "Me, with the cycle trolley, in the basement."}
- src: "images/vogna-4.*"
params: {caption: "Me, with the cycle trolley, hooked to my bike."}
- src: "images/first-computer-1993.*"
params: {caption: "Me, in front of the family computer in 1993."}
- src: "images/desk090111-2.*"
params: {caption: "Desk and workbench in my old apartment."}
- src: "images/cabinet-with-parts-and-my-rack-box-project-eqmzz4.*"
params: {caption: "Entryway closet in my old apartment, filled with tools, parts, and the rack box."}
- src: "images/the-rack-box-project-3gze1g.*"
params: {caption: "Inside the rack box project."}
- src: "images/20110414_085301.*"
params: {caption: "Workshop in my previous house."}
- src: "images/20110904_095648.*"
params: {caption: "Part storage shelves in my previous house."}
- src: "images/20110418_110757.*"
params: {caption: "Server room, with rack, in my previous house."}
- src: "images/IMG_20181001_210232.*"
params: {caption: "My current man-cave, home office, workshop, and server room."}
- src: "images/IMG_20180914_235155.*"
params: {caption: "My current computer desk and electronics lab."}
- src: "images/IMG_20190102_165623.*"
params: {caption: "Homelab, server rack, in my man-cave."}
- src: "images/toddler-twins-on-computer.*"
params: {caption: "My twin boys, visiting me at work in 2015."}
- src: "images/boys-drawing-with-blue-strobe-on-table.*"
params: {caption: "My twin boys, at the dining table with blue LED strobe in 2017."}
- src: "images/20180330_183910.*"
params: {caption: "My twin boys, playing with computer parts and motherboard in 2018."}
- src: "images/alexander-looking-in-fireman-alarm-49lkw4.*"
params: {caption: "Alexander, looking at the Fireman Sam alarm project build."}
- src: "images/niklas-looking-in-fireman-alarm-gr5164.*"
params: {caption: "Niklas, looking at the Fireman Sam alarm project build."}
- src: "images/IMG_20181023_182953.*"
params: {caption: "Adrian, playing with toy cars in 2018."}
---
## Me
Hello, hi and welcome. I am Thomas, and this is my website.
{{< figure "20160726_103126" Fill "450x350 center" >}}
Me, at work, with computer glasses and headphones.
{{< /figure >}}
I'm a father of three sons, the oldest two being twins. I live with my kids and girlfriend in [Norway](https://en.wikipedia.org/wiki/Norway), officially; the Kingdom of Norway, which sounds much cooler. I'm in my mid-30s and find computers with Linux, electronics and home automation things pretty fascinating. I'm also a big fan of red wine, Whisky, and cigars.
......@@ -66,24 +27,44 @@ My parents will tell you that my interest in computers and electronics started p
When I was 9, I started building a cycle trolley with a car battery, lights, and switches. Which I dragged around and improved for years until it eventually became "uncool."
{{< figure "vogna-1" Resize 800x >}}
Dad and I, building the undercarriage of the cycle trolley.
{{< /figure >}}
{{< figure "vogna-3" Resize 800x >}}
Me, with the cycle trolley, in the basement.
{{< /figure >}}
{{< figure "vogna-4" Resize 800x >}}
Me, with the cycle trolley, hooked to my bike.
{{< /figure >}}
The year after, in 1993, the family got an [x86 PC](https://en.wikipedia.org/wiki/X86), with a color monitor and [dot matrix](https://en.wikipedia.org/wiki/Dot_matrix) printer. It was awesome; I stopped playing outside after that...
{{< figure "first-computer-1993" Fill "750x300 center" >}}
Me, in front of the family computer in 1993.
{{< /figure >}}
I moved into my own apartment and started to build [AVR](/tags/avr/) microcontroller modules in my early 20's, and it quickly became an obsession. I put them all into a control cabinet that controlled the apartment, and monitored itself; every voltage level, fuse, and module had some kind of monitoring and alert system. After a few years, it had gotten pretty big.
{{< figure "desk090111-2" Resize 800x >}}
Desk and workbench in my old apartment.
{{< /figure >}}
{{< figure "cabinet-with-parts-and-my-rack-box-project-eqmzz4" Resize 800x >}}
Entryway closet in my old apartment, filled with tools, parts, and the rack box.
{{< /figure >}}
{{< figure "the-rack-box-project-3gze1g" Resize 800x >}}
Inside the rack box project.
{{< /figure >}}
I went to school for two years and improved my electronics skills. After I graduated, I sold the apartment and bought a house.
{{< figure "20110414_085301" Resize 800x >}}
Workshop in my previous house.
{{< /figure >}}
{{< figure "20110904_095648" Resize 800x >}}
Part storage shelves in my previous house.
{{< /figure >}}
{{< figure "20110418_110757" Resize 800x >}}
Server room, with rack, in my previous house.
{{< /figure >}}
### Family man
After living on my own in the house for about two years, I met my girlfriend. We dated for a short while, then we rented an apartment and moved in together in her hometown. Almost a year later the twins were born — hectic times and not a lot of time for projects. In 2014, when the twins were about a year old, we bought the house where we still live.
......@@ -91,17 +72,35 @@ After living on my own in the house for about two years, I met my girlfriend. We
I called dibs on a room in the basement, where I am sitting now; typing this. It's my combined home office, man-cave, workshop, electronics lab, and server room. 10.5 m2 (113 ft2) of pure awesomeness!
{{< figure "IMG_20181001_210232" Resize 800x >}}
My current man-cave, home office, workshop, and server room.
{{< /figure >}}
{{< figure "IMG_20180914_235155" Resize 800x >}}
My current computer desk and electronics lab.
{{< /figure >}}
{{< figure "IMG_20190102_165623" Resize 800x >}}
Homelab, server rack, in my man-cave.
{{< /figure >}}
In 2018 our youngest son was born, and the family was complete. I try ever so gently to push the kids towards the right interests of course; it seems to be working.
{{< figure "toddler-twins-on-computer" Resize 800x >}}
My twin boys, visiting me at work in 2015.
{{< /figure >}}
{{< figure "boys-drawing-with-blue-strobe-on-table" Resize 800x >}}
My twin boys, at the dining table with blue LED strobe in 2017.
{{< /figure >}}
{{< figure "20180330_183910" Resize 800x >}}
My twin boys, playing with computer parts and motherboard in 2018.
{{< /figure >}}
{{< figure "alexander-looking-in-fireman-alarm-49lkw4" Resize 800x >}}
Alexander, looking at the Fireman Sam alarm project build.
{{< /figure >}}
{{< figure "niklas-looking-in-fireman-alarm-gr5164" Resize 800x >}}
Niklas, looking at the Fireman Sam alarm project build.
{{< /figure >}}
{{< figure "IMG_20181023_182953" Resize 800x >}}
Adrian, playing with toy cars in 2018.
{{< /figure >}}
Between work and family I don't have a whole lot of time available, but the time I do have I mostly spend in my office doing computer and electronics stuff. I try to write about it on this website.
......
......@@ -13,51 +13,6 @@ aliases:
- /work-area/
- /bench-power-supply-another-shelf/
- /workbench-shelves-lights-soldering-station/
resources:
- src: "images/IMG_20190103_233909.*"
params: {caption: "Electronics lab, with instruments, power supplies, storage, and more."}
- src: "images/IMG_20190103_233850.*"
params: {caption: "Electronics lab, with part storage, tools, drill press, and more."}
- src: "images/IMG_20190103_233839.*"
params: {caption: "Shelves with an oscilloscope, lab power supplies, multimeter, and a soldering station."}
- src: "images/IMG_20190103_233830.*"
params: {caption: "Peg-board with tools, test leads, and rolls of wire."}
- src: "images/IMG_20190103_233815.*"
params: {caption: "Workbench with shelves, drill press, part storage, and a bit of mess."}
- src: "images/IMG_20180926_221649.*"
params: {caption: "Conductive fume extraction arm, from Omniflex."}
- src: "images/IMG_20190105_222005.*"
params: {caption: "Ductwork in the ceiling for fume extraction system."}
- src: "images/IMG_20190105_224325.*"
params: {caption: "Flexible duct connected to fume extraction arm."}
- src: "images/IMG_20190105_221941.*"
params: {caption: "Exhaust ventilation system, with valve, noise trap, and ceiling intake."}
- src: "images/IMG_20190105_221952.*"
params: {caption: "Exhaust ventilation system, with valve, noise trap, and ceiling intake."}
- src: "images/IMG_20190103_234335.*"
params: {caption: "Electronics lab, lit by IKEA Tertial and Philips Hue lamps."}
- src: "images/IMG_20180919_172414.*"
params: {caption: "Luminometer, on electronics lab desk reading 2380 LUX."}
- src: "images/IMG_20181001_210232.*"
params: {caption: "Man cave/home office, with homelab, desk, and LED lights in the ceiling."}
- src: "images/IMG_20190104_001831.*"
params: {caption: "Computer desk and electronics lab, lit by Philips Hue lamps."}
- src: "images/IMG_20190105_222106.*"
params: {caption: "ESD wrist strap connected to a ground point."}
- src: "images/IMG_20190105_222130.*"
params: {caption: "ESD mat and fume extraction arm connected to ground."}
- src: "images/IMG_20190105_221816.*"
params: {caption: "Two shelf units with clear plastic boxes and drawer cabinets for parts storage."}
- src: "images/2019-01-05-232324_1149x855_scrot.*"
params: {caption: "Logistics system; parts inventory list."}
- src: "images/2019-01-05-232402_1143x850_scrot.*"
params: {caption: "Logistics system; projects list."}
- src: "images/2019-01-05-232459_1125x823_scrot.*"
params: {caption: "Logistics system; project parts list."}
- src: "images/IMG_20190105_221835.*"
params: {caption: "Clear plastic boxes for part storage on shelves."}
- src: "images/IMG_20190105_221825.*"
params: {caption: "Clear plastic boxes for part storage on shelves."}
---
My electronics lab is more like an electronics corner; it's the right half of the computer desk in my home office. The computer desk is 2 meters (6.5 ft) wide and 0.6 meters (2 ft) deep; so half that width is not a lot.
......@@ -71,34 +26,58 @@ On the wall to the right is a peg-board for tools that I need readily available.
For all my shelves I use a rail system; they distribute the load evenly over a large surface. That is great because some of my instruments and equipment is pretty heavy. The shelf height can also easily be adjusted, and the brackets replaced if I need to.
{{< figure "IMG_20190103_233909" Resize 800x >}}
Electronics lab, with instruments, power supplies, storage, and more.
{{< /figure >}}
{{< figure "IMG_20190103_233850" Resize 800x >}}
Electronics lab, with part storage, tools, drill press, and more.
{{< /figure >}}
{{< figure "IMG_20190103_233839" Resize 800x >}}
Shelves with an oscilloscope, lab power supplies, multimeter, and a soldering station.
{{< /figure >}}
{{< figure "IMG_20190103_233830" Resize 800x >}}
Peg-board with tools, test leads, and rolls of wire.
{{< /figure >}}
{{< figure "IMG_20190103_233815" Resize 800x >}}
Workbench with shelves, drill press, part storage, and a bit of mess.
{{< /figure >}}
## Fume extraction
{{< figure "IMG_20180926_221649" Fill "750x400 center" >}}
Conductive fume extraction arm, from Omniflex.
{{< /figure >}}
Soldering gives off some nasty fumes, and since I am in a relatively small environment with no windows or natural movement of air, I got myself a fume extraction arm. The arm is flexible and stays in position, it is made from conductive material and grounded. That is important since moving air can cause a static charge build-up.
A 63mm (2.5") flexible hose runs from the extraction arm up to the 125mm (5") ventilation system. After a couple of 90º turns it connect to the ceiling intake and the fan in a T-piece.
{{< figure "IMG_20190105_222005" Fill "750x400 center" >}}
Ductwork in the ceiling for fume extraction system.
{{< /figure >}}
The fan is a backward centrifugal extractor (RK 125L), capable of moving 168 m3/hour (99 ft3/min). This room is about 20 m3 (706 ft3), so at full speed, the air is replaced 8.5 times per hour, theoretically.
Since there is quite a lot of resistance in the 63mm flexible hose and extraction arm, I need to close the valve on the ceiling intake for the fume extraction to function correctly. Otherwise, the pressure is not low enough to achieve any suction at the extraction arm end. Both the valve and the duct joints have gaskets and make airtight seals.
{{< figure "IMG_20190105_224325" Resize 800x >}}
Flexible duct connected to fume extraction arm.
{{< /figure >}}
{{< figure "IMG_20190105_221941" Resize 800x >}}
Exhaust ventilation system, with valve, noise trap, and ceiling intake.
{{< /figure >}}
{{< figure "IMG_20190105_221952" Resize 800x >}}
Exhaust ventilation system, with valve, noise trap, and ceiling intake.
{{< /figure >}}
## Work light
{{< figure "IMG_20190103_234335" Fill "750x400 center" >}}
Electronics lab, lit by IKEA Tertial and Philips Hue lamps.
{{< /figure >}}
Good lighting is essential when doing small detailed work, and it seems to get more important as I get older. I have two IKEA Tertial lamps, one on each work surface, both with LED bulbs. The lamp on the electronics desk has an 11 W bulb, outputting 1500 lm. The other has an 8 W bulb, outputting 1000 lm. Both have a color temperature of 4000 K, which is my favorite.
{{< figure "IMG_20180919_172414" Fill "750x300 center" >}}
Luminometer, on electronics lab desk — reading 2380 LUX.
{{< /figure >}}
I've measured the light output on the electronics lab bench to 2380 lx, `1 lx = 1 lm/m2`. That's quite a lot and falls within the _"Performance of visual tasks of low contrast and very small size for prolonged periods of time"_ category, ranging from 2000 to 5000 lx.
......@@ -107,7 +86,11 @@ In the ceiling, I have two LED lamps, a big one in the center with 4000 lm outpu
I have a total of 14 Philips Hue lights in the home office; six of which are used for lighting the desk. Two Bloom lamps behind the monitor as bias lighting, three GU10 spots in the ceiling above the work area and a LED strip behind the desk facing the wall.
{{< figure "IMG_20181001_210232" Resize 800x >}}
Man cave/home office, with homelab, desk, and LED lights in the ceiling.
{{< /figure >}}
{{< figure "IMG_20190104_001831" Resize 800x >}}
Computer desk and electronics lab, lit by Philips Hue lamps.
{{< /figure >}}
## ESD protection
ESD protection is important when working with electronic components, build-up and sudden discharge of static electricity can destroy sensitive electronics.
......@@ -115,25 +98,41 @@ ESD protection is important when working with electronic components, build-up an
I've covered the entire desk with an ESD mat, both it and the extraction arm are conductive and connected to mains ground through a 1M ohm resistor. That allows for a slow and controlled dissipation of any static electricity build-up. I also have an ESD wrist strap readily available.
{{< figure "IMG_20190105_222106" Resize 800x >}}
ESD wrist strap connected to a ground point.
{{< /figure >}}
{{< figure "IMG_20190105_222130" Resize 800x >}}
ESD mat and fume extraction arm connected to ground.
{{< /figure >}}
## Parts storage and logistics
I order most of my parts from China, and since shipping takes forever, I like to keep quite a lot of parts on hand.
{{< figure "IMG_20190105_221816" Fill "750x400 center" >}}
Two shelf units with clear plastic boxes and drawer cabinets for parts storage.
{{< /figure >}}
I have three drawer cabinets for small components and use different sizes of clear plastic boxes for bigger things. To keep track of [my projects](/electronics/), parts and stock levels; I'm using a self-made logistics system.
{{< figure "2019-01-05-232324_1149x855_scrot" Resize 800x >}}
Logistics system; parts inventory list.
{{< /figure >}}
{{< figure "2019-01-05-232402_1143x850_scrot" Resize 800x >}}
Logistics system; projects list.
{{< /figure >}}
{{< figure "2019-01-05-232459_1125x823_scrot" Resize 800x >}}
Logistics system; project parts list.
{{< /figure >}}
With this, I can create a project, add parts and get a parts lists which shows me if I have enough in stock to build it — and where all the pieces are located. All drawers, boxes, and assortments are labeled with a location ID, which the logistics system keeps track of.
By setting reorder points, the system can also notify me when it's time to refill the stock. The logistics system is pretty useful, but also a lot of fun to make and maintain. I'm one of those people that find logistics enjoyable.
{{< figure "IMG_20190105_221835" Resize 800x >}}
Clear plastic boxes for part storage on shelves.
{{< /figure >}}
{{< figure "IMG_20190105_221825" Resize 800x >}}
Clear plastic boxes for part storage on shelves.
{{< /figure >}}
## Instruments
......
......@@ -13,48 +13,6 @@ weight: 10
#- Power management
aliases:
- /@thomas/my-homelab-zgvwq7/
resources:
- src: "videos/smoke_test_ventilation_ceiling.webm"
title: "Ventilation smoke test"
params:
caption: "Testing exchaust ventilation using a smoke match."
date: 2019-01-03
- src: "images/IMG_20190102_165623.*"
params: {caption: "Homelab rack, with UPS, servers, ATS, PDU, and more."}
- src: "images/Homelab_rack.*"
params: {caption: "Layout drawing of the homelab rack."}
- src: "images/Homelab_network.*"
params: {caption: "Homelab network diagram."}
- src: "images/IMG_20181203_233149.*"
params: {caption: "Ubiquiti UniFi 16XG 10 Gbit and 16 POE-150W switches, with fibers and ethernet connected."}
- src: "images/IMG_20181203_233140.*"
params: {caption: "Two servers with 10 Gbit multi-mode fiber connected."}
- src: "images/20171231_224828.*"
params: {caption: "Power and network cables to and from the homelab rack."}
- src: "images/Homelab_power.*"
params: {caption: "Homelab power diagram; ATS, MBS, UPS, and PDU."}
- src: "images/DSC_1413_554965.*"
params: {caption: "UPS maintenance bypass switch (MBS) in the homelab rack."}
- src: "images/IMG_20180919_000253.*"
params: {caption: "Power distribution unit (PDU) in the homelab rack."}
- src: "images/DSC_1421_e7e4fb.*"
params: {caption: "Automatic transfer switch (ATS) and power distribution unit (PDU) in the homelab rack."}
- src: "images/2019-01-03-003721_1457x944_scrot.*"
params: {caption: "Home Assistant screenshot; temperatures, power, load and status of the homelab."}
- src: "images/2019-01-03-004044_1618x566_scrot.*"
params: {caption: "Grafana graphs, showing homelab power measurements."}
- src: "images/2019-01-03-004127_1611x706_scrot.*"
params: {caption: "Grafana graphs, showing homelab power and UPS information."}
- src: "images/IMG_20190102_222348.*"
params: {caption: "Ductwork in the ceiling for the ventilation exhaust system."}
- src: "images/IMG_20190102_222305.*"
params: {caption: "Insulated ducts suspended from the ceiling and fresh air intake."}
- src: "images/20180110_170853.*"
params: {caption: "Air intake from the adjacent room."}
- src: "images/IMG_20190102_222247.*"
params: {caption: "Portable AC connected to an insulated duct. Fresh air intake under the ceiling."}
- src: "images/2019-01-03-010045_1619x476_scrot.*"
params: {caption: "Grafana graphs, showing homelab and outside temperatures."}
---
The homelab rack sits in my home office, just left of me as I type this text. Because it's so close I've paid attention to keeping the noise as low as possible; I've tried buying second-hand servers, but they are just too loud. So I built the computers myself instead, focusing on keeping them quiet.
......@@ -66,12 +24,16 @@ Also have a look at any posts with the [homelab tag](/tags/homelab/).
{{< /notice >}}
{{< figure "IMG_20190102_165623" Fill "750x800 center" >}}
Homelab rack, with UPS, servers, ATS, PDU, and more.
{{< /figure >}}
## Introduction
I like Linux, so all my computers run Linux; servers are [Ubuntu](https://www.ubuntu.com/), desktop and laptops are [Arch](https://www.archlinux.org/). I run all my services virtualized with either [KVM](https://www.linux-kvm.org) or [LXC](https://linuxcontainers.org/), and back up the images and configurations to my file server and the cloud every night. So if anything breaks or I have to take a server down for maintenance, it's easy to move the guest OS or container to another machine. For that reason, I try to keep network settings the same on the servers; bridges and such.
## Top to bottom
{{< figure "Homelab_rack" Resize x800 >}}
Layout drawing of the homelab rack.
{{< /figure >}}
* Two Dell Optiplex 9010 SFF computers (top of rack)
* [Test/backup server](#epsilon)
......@@ -168,12 +130,20 @@ File server; Ubuntu 18.04, mdadm RAID 6
## Network
{{< figure "Homelab_network" Resize 750x >}}
Homelab network diagram.
{{< /figure >}}
I've got a 500/500 fiber internet that comes into the home office and goes through a media converter on the wall above the rack. From there, an Ethernet cable goes to the OPNsense firewall and a 10 Gbit fiber to the Unifi 16XG switch, which is the backbone of my home network. All computers in the rack are connected to the network with 10 Gbit multi-mode fiber.
{{< figure "IMG_20181203_233149" Resize 800x >}}
Ubiquiti UniFi 16XG 10 Gbit and 16 POE-150W switches, with fibers and ethernet connected.
{{< /figure >}}
{{< figure "IMG_20181203_233140" Resize 800x >}}
Two servers with 10 Gbit multi-mode fiber connected.
{{< /figure >}}
{{< figure "20171231_224828" Resize 800x >}}
Power and network cables to and from the homelab rack.
{{< /figure >}}
In addition to the UniFi 16XG, I also have a Unifi 16 POE-150W switch, used for Gbit and PoE devices, such as Raspberry Pies and WiFi access points. Between the two switches in the rack are two Gbit aggregated fiber connections. On the wall behind the rack is a 12 port patch panel that connects the rest of the house to the network.
......@@ -245,6 +215,8 @@ As you can see the `br_dmz` bridge is traffic tagged with VLAN ID 10, and `br_cc
## Power
{{< figure "Homelab_power" Keep >}}
Homelab power diagram; ATS, MBS, UPS, and PDU.
{{< /figure >}}
The homelab rack connects to two different branch circuits of the house, through an automatic transfer switch. The primary power source is a dedicated circuit for the home office; the secondary is the basement circuit. The automatic transfer switch, or ATS for short, provides the ability to switch input source if one should fail. This switch typically takes 9 to 12 ms and is transparent to the load.
......@@ -255,41 +227,63 @@ The ATS powers the UPS through a maintenance bypass switch (MBS); this allows me
At the end of the power distribution chain, is the power distribution unit, or PDU for short. The PDU has eight C14 sockets that can be individually controlled and measured.
{{< figure "DSC_1413_554965" Resize 800x >}}
UPS maintenance bypass switch (MBS) in the homelab rack.
{{< /figure >}}
{{< figure "IMG_20180919_000253" Resize 800x >}}
Power distribution unit (PDU) in the homelab rack.
{{< /figure >}}
{{< figure "DSC_1421_e7e4fb" Resize 800x >}}
Automatic transfer switch (ATS) and power distribution unit (PDU) in the homelab rack.
{{< /figure >}}
The ATS, UPS, and PDU are all communicating with a Raspberry Pi — that is acting as a power controller and monitor. The UPS has a network management card (NMC) that allows [nut](https://networkupstools.org/) to communicate with it over Ethernet. The ATS and PDU are connected via serial port and uses a [Python library](https://github.com/thomasjsn/powerwalker-python-lib), that I have written, to communicate.
Collected metrics like load, running time, voltage, current, power, and temperatures are read and published as MQTT topics; which [Home Assistant](https://www.home-assistant.io/) subscribes to. The values are also stored in [InfluxDB](https://www.influxdata.com/), where they can be read by [Grafana](https://grafana.com/) to create graphs and cool looking dashboards.
{{< figure "2019-01-03-003721_1457x944_scrot" Resize 800x >}}
Home Assistant screenshot; temperatures, power, load and status of the homelab.
{{< /figure >}}
{{< figure "2019-01-03-004044_1618x566_scrot" Resize 800x >}}
Grafana graphs, showing homelab power measurements.
{{< /figure >}}
{{< figure "2019-01-03-004127_1611x706_scrot" Resize 800x >}}
Grafana graphs, showing homelab power and UPS information.
{{< /figure >}}
## Ventilation
My home office is 10.5 m2 (113 ft2), in the basement and pretty well insulated. With the heat output from the homelab and nowhere for that heat to go, it could potentially get pretty hot. But with my [ventilation system]({{< ref "/post/homelab-ventilation-project" >}}), that heat is either vented outside or cooled with a portable AC.
{{< figure "IMG_20190102_222348" Fill "750x300 center" >}}
Ductwork in the ceiling for the ventilation exhaust system.
{{< /figure >}}
### Exhaust
Pulls in air from two places — the ceiling above the rack, and through a fume extraction arm on the electronics lab bench. Both inlets have valves to regulate the flow of air or shut them off completely. The fume extraction on the desk is only open when I solder or do other things that make nasty fumes.
{{< video "smoke_test_ventilation_ceiling" >}}
Testing exchaust ventilation using a smoke match.
{{< /video >}}
### Fresh air inlet
An insulated duct transports fresh air from outside into the center of the room; this is done passively when the exhaust fan is running. It has a valve that can be closed if it's freezing outside.
{{< figure "IMG_20190102_222305" Fill "750x300 top" >}}
Insulated ducts suspended from the ceiling and fresh air intake.
{{< /figure >}}
### Internal inlet
I have two 100mm (4") inlets coming from the adjacent room, with valves that can be adjusted. I normally keep them closed and pull in outside air. However, in the hot summer months, they can be opened if the basement air is cooler than the outside.
{{< figure "20180110_170853" Fill "750x300 center" >}}
Air intake from the adjacent room.
{{< /figure >}}
### AC
I have a portable AC unit with a dedicated and insulated exhaust duct to outside. When running, it exhausts quite a lot of air. That creates a negative pressure in the room, which pulls fresh air through the inlets.
{{< figure "IMG_20190102_222247" Fill "750x300 bottom" >}}
Portable AC connected to an insulated duct. Fresh air intake under the ceiling.
{{< /figure >}}
---
......@@ -302,5 +296,7 @@ I use a Raspberry Pi, some DS18B20 temperature sensor probes, and a [Python scri
A Home Assistant automation script starts the exhaust fan when the temperature reaches 25'C (77'F). The fan keeps running until the temperature has dropped to 23'C (73.4'C).
{{< figure "2019-01-03-010045_1619x476_scrot" Resize 750x >}}
Grafana graphs, showing homelab and outside temperatures.
{{< /figure >}}
{{< related tag="Homelab" />}}
......@@ -14,32 +14,32 @@ I've gotten myself one of those ultrawide curved monitors. I've wanted one for a
I've been using a dual monitor setup for as long as I can remember, both at home and at work. I find myself pretty much always having a browser open on the right monitor, and using the left for everything else. I've always loved the additional desktop space. But there are a few things I don't like about it, like; right in front of me is the monitor bezels. So I have to look either right or left. And I typically find that I work within one monitor, not much across. The experience with the 34" ultrawide is very different; the windows float more easily around on the monitor. Not bound to either the left or right. I like it!
{{< figure "20160719_19181460" "Resize" 750x >}}
{{< figure "20160719_19181460" "Resize" 750x />}}
So this is my previous setup; with two 24" monitors placed on the desk. The desk is 2 meters wide, and the monitors took about half of that. Having them angled towards each other gave a better viewing experience, but it also left a bit of dead space behind them even more with the speakers placed on each side. And there wasn't a whole lot of space in front either.
So; time for some changes!
{{< figure "DSC_0001_329a4b" "Resize" 750x >}}
{{< figure "DSC_0001_329a4b" "Resize" 750x />}}
First I needed to put up a shelf to hold the new monitor. The wall behind the desk is drywall, so I located two studs and mounted a shelf rail. I got pretty lucky with the studs; their location was perfect for where I wanted the monitor. These rails have a couple of functions; first, they allow the shelf height to be adjusted and second, and most importantly, they distribute the load over a large area. The ultrawide monitor is pretty heavy, around 10 kg (22 lbs) so the shelf needed to be stable.
{{< figure "IMG_20170422_214227" "Resize" 750x >}}
{{< figure "IMG_20170422_214227" "Resize" 750x />}}
Next, I got a shelf from Ikea and cut it to size; 28 cm deep and 90 cm wide. It sits about 6 cm over the desk; this leaves enough room that the keyboard can be tucked away when I need the work surface for something else. I also put the speakers on the shelf to get them off the desk, but they got partially covered by the monitor, so it wasn't a great solution.
{{< figure "IMG_20170425_201956" "Resize" 750x >}}
{{< figure "IMG_20170425_201956" "Resize" 750x />}}
Now; the shelf did have one side effect that I didn't like. Previously the light from the Hue Light Strip would light up the wall behind the monitors, and give a kind of bias lighting effect. But the new shelf is blocking that light, leaving the area behind the monitor darker than I would like. So to remedy that I put two Hue Bloom lights on the monitor shelf, lighting up the wall behind it. That turned out really cool :) But it left no room for the speakers, so I moved them back onto the desk.
{{< figure "IMG_20170427_213634" "Resize" 750x >}}
{{< figure "IMG_20170427_213634" "Resize" 750x />}}
Next, I got myself a DxRacer Iron chair, and a laptop stand. I got the "Rain Design mStand for MacBook" from Apple Store, it looks cool and works just as well for other laptops.
{{< figure "IMG_20170428_224040" "Resize" 750x >}}
{{< figure "IMG_20170428_224040" "Resize" 750x />}}
I wasn't happy about the speakers placed on the desk. I already had a shelf I could put the right speaker on, so I mounted a new shelf for the left. Success! Finally, I got the speakers off the desk again. And having them pointed at me, in the correct height made the sound a lot better!
{{< figure "IMG_20170503_224532" "Resize" 750x >}}
{{< figure "IMG_20170503_224532" "Resize" 750x />}}
So; this is how it turned out in the end. I've kept the monitor on the computer rack as a second display; only really using it for things like logs, music, and such. Things I look at but don't work with. I'm using the laptop stand for my Chromebook for the moment. But I am thinking of getting myself a laptop with Linux in the future.
......@@ -15,38 +15,38 @@ I used to smoke cigars in my home office, and the ventilation was pretty much se
Anyway; after I got the homelab properly set up, smoking cigars in the office just didn't feel right... All that smoke drawn into the servers, heat-sinks, filters and so on. Never mind the lungs, think of the servers! So it was time to rebuild the exhaust ventilation system to better suit my new needs.
{{< figure "DSC_0564_e779ff" "Resize" 800x >}}
{{< figure "DSC_0564_e779ff" "Resize" 800x />}}
So this is how it used to look, that needed to come down.
{{< figure "DSC_0567_3fdaea" "Resize" 800x >}}
{{< figure "DSC_0567_3fdaea" "Resize" 800x />}}
I removed the active carbon filter and the noise trap. I initially installed the noise trap because the distance between the intake and the fan was very short, and there were no bends. That allowed high-pitch noise from the fan itself to be quite audible. I figured I wouldn't need it anymore with the longer duct runs.
{{< figure "DSC_0568_8b4604" "Resize" 800x >}}
{{< figure "DSC_0568_8b4604" "Resize" 800x />}}
I wanted the new exhaust system to be dual purpose; remove hot air from the homelab and solder fumes from the electronics lab. So I got a T-branch and spiral tubes which I cut into suitable lengths.
{{< figure "DSC_0569_d9a3b5" "Resize" 800x >}}
{{< figure "DSC_0569_d9a3b5" "Resize" 800x />}}
Next, I cut and pre-bent suspension bands.
{{< figure "DSC_0570_24bb65" "Resize" 800x >}}
{{< figure "DSC_0570_24bb65" "Resize" 800x />}}
And the first section is up! I used two suspension bands on each side of the T-branch and connected it to the fan with a flexible duct. That allowed me to mount the spiral tubes a bit closer to the ceiling as the flexible duct could be bent upwards.
{{< figure "DSC_0575_60a487" "Fill" "800x800 center" >}}
{{< figure "DSC_0575_60a487" "Fill" "800x800 center" />}}
I mounted a 90-degree bend and intake above my electronics lab, pretty much right over where I usually solder.
{{< figure "DSC_0586_b83dc0" "Resize" 800x >}}
{{< figure "DSC_0586_b83dc0" "Resize" 800x />}}
On the homelab side I first mounted a 90 degree bent towards the wall, then another to go down, and finished it with an intake there as well.
{{< figure "DSC_0605_caa518" "Fill" "800x750 center" >}}
{{< figure "DSC_0605_caa518" "Fill" "800x750 center" />}}
The idea here was the hot air from the servers could rise behind the rack and into the exhaust.
{{< figure "DSC_0607_c80242" "Resize" 800x >}}
{{< figure "DSC_0607_c80242" "Resize" 800x />}}
So this is how it turned out. I'm not sure how efficient the intake over the homelab is... It might be that the hot air pushed towards the wall behind the rack will spread in all direction and not really "rise" up like I imagined it would. Furthermore, I don't have any convenient way of adjusting the airflow on the two intakes. I can rotate the disk on the intake, but it's a bit annoying, might have to work out something better eventually.
......@@ -13,7 +13,7 @@ AVR is a series of microcontrollers from [Atmel](http://www.atmel.com). Fitted w
Speeds up to 20 Mhz, [USART](http://en.wikipedia.org/wiki/UART) (e.g., RS-232, RS-485) and low power consumption are some other benefits. A starting kit such as the [STK500](https://www.microchip.com/webdoc/stk500/index.html) is a good basis, with this you can test and program a variety of devices.
{{< figure "DSC_018_ad2241" "Resize" 750x >}}
{{< figure "DSC_018_ad2241" "Resize" 750x />}}
## Getting started
### Programming
......@@ -33,10 +33,10 @@ These are some of the devices I most commonly use, for the complete list see [At
* ATtiny2313
* ATtiny26
{{< figure "DSC_007_42c275" "Resize" 750x >}}
{{< figure "DSC_007_42c275" "Resize" 750x />}}
## Basic circuit
{{< figure "basic-avr-attiny2313-circuit" "Resize" 750x >}}
{{< figure "basic-avr-attiny2313-circuit" "Resize" 750x />}}
This basic circuit has 7 inputs and 8 outputs and uses an ATtiny2313 with internal oscillator. That is the maximum capacity for this device if you don't count PA.0, PA.1, and PA.2, which is typically used for a crystal oscillator and a reset switch.
......@@ -45,22 +45,22 @@ Try placing C1 and C2 as close to the device as you can; this might improve the
{{< /notice >}}
## Power
{{< figure "l78s05cv-voltage-regulator-curcuit" "Keep" >}}
{{< figure "l78s05cv-voltage-regulator-curcuit" "Keep" />}}
Most AVR microcontrollers run on 5 volts, which you can easily get by using a voltage regulator and a couple of capacitors. I usually use 47 µF for C1 and C2. A voltage regulator like the L78S05CV can deliver 2 amps and have a maximum input voltage of 35 volts. Remember to mount a heat-sink, especially with high input voltage or high load.
## External crystal
{{< figure "avr-basic" "Keep" >}}
{{< figure "avr-basic" "Keep" />}}
If you are going to use an external crystal oscillator, it must be connected between XTAL1 and XTAL2 with a 22pF capacitor to GND on both sides. Remember to set the fuse bits according to your oscillator, and if you are going to use serial communication; pick a frequency that [works with your baud rate](http://wormfood.net/avrbaudcalc.php).
## I/O
### Digital inputs
{{< figure "avr-input-n" "Keep" >}}
{{< figure "avr-input-n" "Keep" />}}
If your input has a pull-up resistor, it is pulled high when not active. So you need to pull it down (low) to trigger it, meaning that it is triggered by ground. Note that this also inverts your inputs, so you need to handle that in your programming.
{{< figure "avr-input-p" "Keep" >}}
{{< figure "avr-input-p" "Keep" />}}
When your input has a pull-down resistor, it is pulled low when not active and you activate it by pulling it up (high).
......@@ -70,11 +70,11 @@ Analog inputs don't require pull-ups or pull-downs, they measure the input volta
To measure higher voltages than the input can handle; you can use a [voltage divider](http://en.wikipedia.org/wiki/Voltage_divider), this divides the voltage down by using two resistors. And for restive sensors, you can use a [Wheatstone bridge](http://en.wikipedia.org/wiki/Wheatstone_bridge).
### Digital outputs
{{< figure "avr-output-1" "Keep" >}}
{{< figure "avr-output-1" "Keep" />}}
You can power an LED (20 mA) of the AVR output without any additional components, but any more than that and it's going to need some help. For this we use transistors, a bipolar NPN transistor is a good choice. You need a resistor on the base pin; otherwise too much current passes through the transistor, and it will break.
{{< figure "avr-output-2" "Keep" >}}
{{< figure "avr-output-2" "Keep" />}}
If you are going to drive some heavy stuff, a small bipolar transistor is not going to be enough. You need a power transistor, but these do not have the same amount of amplification, so it's a good idea to place it after your small bipolar transistor.
......@@ -84,7 +84,7 @@ PWM outputs can be connected the same way.
## Components
### LEDs
{{< figure "Led-anode" "Keep" >}}
{{< figure "Led-anode" "Keep" />}}
You will pretty much always need a resistor when powering LEDs. Here is a useful tool for calculating the value of that resistor: [LED Resistor Calculator](http://www.ohmslawcalculator.com/led-resistor-calculator).
......@@ -92,18 +92,18 @@ You will pretty much always need a resistor when powering LEDs. Here is a useful
* [SparkFun tutorial: Light-Emitting Diodes (LEDs)](https://learn.sparkfun.com/tutorials/light-emitting-diodes-leds)
### Transistors
{{< figure "transistor-to92" "Keep" >}}
{{< figure "transistor-to92" "Keep" />}}
#### Useful reading
* [SparkFun tutorial: Transistors](https://learn.sparkfun.com/tutorials/transistors)