• castors and racks

    Christoph12/19/2018 at 22:12 0 comments

    The individual IVAR shelves are held in place by four pins that go into holes spaced by about 32 mm. That's one IVAR height unit (HU). A few examples that fit quite nicely:

    The holes also make it easy to build hinges for temporary side-racks. I have some ideas for that. 

    I removed a lot of the stuff that was in there and rearranged the shelves a bit:

    From top to bottom:

    • 6 HU: Scope
    • 5 HU: undecided, might place SAMLA boxes there. Either one large box or two of the smaller ones fit nicely.
    • 5 HU: undecided
    • 4 HU: Power (ATX PSU)
    • 7 HU: Rework station. This doesn't have to be in a good height for working with it since I'll probably take it out and place it on a table for soldering.
    • the rest at the bottom: power tools and large hand tools. I'm not sure if I want them in this rack, but I don't know where to place them otherwise.

    The X-shaped thing in the background is supposed to make the rack stay upright, but it's also blocking access from the rear. However I think I'll want to be able to access the rack from two sides. It will have to go and be replaced with something else.

    At the bottom I Installed a base plate (MDF) and four castors. They don't turn freely though and sometimes get stuck on a mounting screw's head. I might change them for larger ones (will never happen I guess), but this will do for now:

  • Getting the scope into my wifi

    Christoph12/18/2018 at 22:02 0 comments

    I want to mount my Rigol DS1054Z scope to the rack. That alone won't be too hard, but there are two complications:

    • taking screenshots from the scope is necessary for many projects every now and then. I hate using a USB drive for that.
    • The scope has a LAN connector, but then the whole thing would either need to be plugged into different sockets every time I move it, or I'd have to connect it to my laptop. I hate my laptop's LAN connector.

    So I decided to add a Raspberry Pi (3B+) to the scope, to give it a wifi interface. That, however, wasn't the easiest thing for me because my networking experience ends at "install pre-configured router, get cat pictures". The devices involved are:

    • wifi router with DHCP
    • laptop in wifi
    • RPi in wifi, plus wired LAN interface)
    • scope with wired LAN interface

    Primary goal: get screenshots from the scope to my laptop over wifi.

    After some discussion about the right approach in the hack chat and on stack exchange (https://unix.stackexchange.com/questions/489232/connect-lan-device-to-wlan-using-a-raspberry-pi), I've finally found a working solution (thanks to @Ted Yapo ).

    Network setup

    Preparation of the RPi

    1. a fresh install of raspbian stretch lite 2018-11-13
    2. In the SD card's boot partition:
      • place a file called ssh to enable ssh
      • place a wpa_supplicant.conf, it will be copied to /etc/wpa_supplicant during configuration
    3. edit /etc/dhcpcd.conf to have a static IP for eth0, in a subnet different from the wifi router's. My dhcpcd.conf for eth0:
      interface eth0
      static ip_address=192.168.220.1/24
      static routers=192.168.178.1 
    4. enable IPv4 forwarding:
      • uncomment the following line in /etc/sysctl.conf
        #net.ipv4.ip_forward=1
      • apply change:
        sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward" 
    5. reboot 

    Preparation of the scope

    Configure static IP in the new subnet:

    Preparation of the router

    Add a routing rule to the new subnet via the RPi's wifi interface

    Preparation of the laptop:

    Nothing network specific, I just installed the ds1054z python package. See https://hackaday.io/project/7691-ds1054z-python-package and https://pypi.org/project/ds1054z/.

    Taking a screenshot

    Now iIt's easy: open a terminal on the laptop and execute

    ds1054z save-screen --overlay 0.6 192.168.220.2

    In my network this takes about 4 seconds. The result is placed in the current working directory and would look like this:

    The screenshot with my scope's IP configuration was taken with the same method, so you get menus as well - whatever you see on the real screen.

    Why an RPi?

    • I had one and didn't have to buy any other hardware for this
    • The RPi has SPI, I2C and other interfaces on the expansion header, which might be a good addition to the scope's surroundings during prototyping. It's also quite convenient to use since I can ssh to it with my laptop, which can now also talk to the scope. This opens quite a number of possibilities.

    So one more device to add to the rack.