Archive for the ‘Projects’ Category.

Group based Homedir Quota Handling (Microsoft FSRM, Powershell, AD)

At work, we use Quotas on our User’s Homedrives. There is a default Quota on the Shared Homedir folder. There used to be multiple of these folders, and when a user got a larger Quota, the homedir had to be moved + the user’s account hat to be altered accordingly. Since it is a mapped drive, which is also offline synced on the Notebooks, this lead to quite some administrative work, if the user got a larger Quota.

So I’ve decided to set the quota using Active Directory groups + Powershell. This runs daily in a scheduled task.
Limitation: I do not remove non default quotas, if a user should get a larger Quota for a limited period, the Quota is not automatically removed. Could be automated, but is not a valid scenario in our case.


# Der übergeordnete Userhome Ordner hat die default Quota
# Die User welche in einer entsprechenden Quota-Gruppe sind erhalten die der Gruppe zugehörige Quota
# Entfernen aus der Gruppe führt nicht zur Entfernung der Quota!
# Nico Baumgartner, 27.07.2017

function set-homequota
{
param($group, $template)
$ConfirmPreference = "none"
$group = Get-ADGroupMember $group
    foreach ($user in $group)
    {
        $user = get-aduser $user -Properties homedirectory
        $homedir = "d:\home" + (get-item $user.HomeDirectory).BaseName
        if ($homedir -eq "d:\home")
        {
            $msg =  "Fehler beim Setzen der Quota für " + $user.Name + ", Ungültiger Pfad."
            Write-EventLog -LogName "Application" -Source "Rhenus Quota Script" -EventId 200 -EntryType Error -Message $msg
            write-host $msg
            $homedir = "" #Vermeiden, dass Quota für den überliegenden D:\Home\ Ordner geschrieben wird.
        }
        $aktquota = Get-FsrmQuota $homedir
        if ($template -eq $aktquota.template)
        {
            Write-Host $template
            Write-Host $aktquota
            write-host "Richtiges Template bereits zugewiesen" für $user.Name
        }
        Else
        {
            Remove-FsrmQuota $homedir -Confirm:$false
            new-FSRMQuota $homedir -Template $template -Confirm:$false
            $aktquota = ""
            $aktquota = Get-FsrmQuota $homedir
                    if ($template -eq $aktquota.template)
                    {
                    $msg =  "Neue Quota gesetzt für " + $user.Name
                    Write-EventLog -LogName "Application" -Source "Rhenus Quota Script" -EventId 101 -EntryType Information -Message $msg
                    Write-Host $msg
                    }
                    Else
                    {
                    $msg =  "Fehler beim Setzen der Quota für " + $user.Name
                    Write-EventLog -LogName "Application" -Source "Rhenus Quota Script" -EventId 200 -EntryType Error -Message $msg
                    write-host $msg
                    }                    
        }
    }
}

# New-EventLog -Source "Rhenus Quota Script" -LogName "Application"
Write-EventLog -LogName "Application" -Source "Rhenus Quota Script" -EventId 100 -EntryType Information -Message "Rhenus Quota Script gestartet"

$qgroup = "AA_RAG_CH_HomedriveQuota_0500MB_LG"
$template = "Rhenus 0500MB Homedrive"
set-homequota $qgroup $template

$qgroup = "AA_RAG_CH_HomedriveQuota_2000MB_LG"
$template = "Rhenus 2000MB Homedrive"
set-homequota $qgroup $template

$qgroup = "AA_RAG_CH_HomedriveQuota_8000MB_LG"
$template = "Rhenus 8000MB Homedrive"
set-homequota $qgroup $template

Makita 9500d Cordless Angle Grinder on Steroids

I wanted one for a long time, but getting one wasn’t easy. I don’t think that they were good sellers at all, most of them most likely went to trash several years ago. Anyway, I was able to find one on ebay kleinanzeigen in Germany. Seller told that it is in good working condition, battery was missing, and the shield was missing as well. I didn’t care for the battery, as I wanted to do a Li-Ion conversion. For the shield, I’ve found a solution on Aliexpress, the Chinese sell shields that you can attach to your drill, and then do ridiculous things with it… It was quite easy to adapt one to the Makita.

When I got it, I tested it out with

my existing Makita NiMH battery, the performance was a lot worse than expected, and the motor was pretty worn, or at least it sounded like that. I looked in my parts that I’ve salvaged from cordless drills, and found a matching motor out of a green bosch drill (don’t remember the model, but it was a 12v NiCD model that I got for free because of the dead battery). This one felt quite beefy (strong magnets, compared to the original), and felt like new. I’ve removed the pinions and pushed the Makita pinion to the Bosch motor using my vice.

I’ve built a battery out of 3 18650 cells (Warning: you need to know what you’re doing, you cannot use normal 18650 cells, it needs to be high discharge cells – like the ones used in cordless tools). There’s no over discharge protection, I’m able to handle this by myself, worst case I would have to replace the battery, if  I run it too low.

Makita 9500D Complete

Picture 1 of 9

Grinder Timer for Solis Scala

I’ve built a little timer with 4 preset values based on an Arduino, Relay, Cellphone Charger.

It all fit inside the original housing. Software needs some improvement, by the time I’m only using a hardcoded delay per push button to match one of the 4 bialetti moka makers that we regularly use.

Stabmixer – Electric Outboard Project

Ever since I was a kid, i wanted an electric outboard motor to use with a light rubber boat (without a hard floor). I actually even started experimenting when i was 12, but that didn’t work out at all.

Now, many years later, I wanted to give it a try again, my goal was a lightweight electric outboard, driving a chain inside a tube down to the propeller. Unfortunately, it all went wrong after I’ve made a prototype that was running the chain directly through the water. It worked so well, that I’ve decided to keep the chain outside. What I built is good for more than 1kw, but my intex excursion has it’s limits at around 6kph, which requires roughly 400watts.

The part’s I’ve used are:

Battery: 12s4p 18650 High drain (powertool) cells.
Motor: Chinese no-name Hub, good for about 1000w continues
Gear Ratio: 22×14
Propeller: JXF 15×13 / 381 x 330mm
Other Parts: Aluminium Rods, Steel Plates, Road frame parts, Buttom Bracket, Bolts, Nuts, Washers, Stem, Handlebar.

Be sure to check out the videos:

 

Blendwirkung V2 – The Uetliberg descent bike light

Blendwirkung V1 was a road light, that was built based on a Luxeon 1 LED (which was relatively new back then in ~2005). I have used it for a while, until I’ve decided that it was just too big and heavy.

Many years later, after I’ve moved my Magicshine from the handlebar to the helmet, and added the beautiful Lux-RC / Easy2Led Light to the handlebar. I began to think about a cordless solution on the helmet, as I really didn’t like the battery in the backpack, running a cable to the helmet. I’ve decided to go old school with this, and use NiMH, as I don’t want any LiXX battery on my helmet. This could be paranoid, but I just don’t like the idea at all.

 

 

I only use this light for the descent of our weekly Uetliberg-Run, so runtime wasn’t a big criteria.  I just wanted high output for about 20minutes on the existing 2/3 sub C NiMH cells that I’ve had lying arround. In the end I went for these components:

  • 2x Nanjg 110 Boost driver, ~950mA each – so Output is almost 2A
  • 1x CREE XM-L2 T6 4C LED – this is warm white, you gotta love it in the woods.
  • 1x TIR Optic, it’s either 20 or 25 degree, I don’t remember.
  • 2x 2500 mAh Sub-C NiMH high power cells.
  • Various Alloy sheet + part of an old heatsink

The light pulls arround 6Amps from the battery, which makes it difficult to find a good switch, since the one I initially installed was fried after about 10 toggles, I’ve removed it and don’t have a switch at the moment. It’s no beauty, but its brighter than most other lights I’ve seen on the Uetliberg, and it was most likely the cheapest as well. Have been using it many times – still love it. This light cannot be used stationary, as it needs some air flow to keep the temperature down.

Cordless drill in the kitchen

 

A new case for an old Squeezebox (v1) – The SpaceDock

SpaceDock1

When one of my V3  Squeezeboxes died recently, it meant that I’ll have to find a solution for the sticky (probably the softeners in went crazy after all those years) case of the working v1 unit, that I was given by a friend. The whole case was so sticky, I did not see any solution in reusing it (others have had the same issue).

Anyway, I have decided to draw an acrylic plate that a friend who owns a company that has a co2 laser can then cut for me. That plate with the attached Squeezebox internals + some magnets went behind a cabinet, so that only the display + IR receiver is visible.

The name SpaceDock is coincidence, it’s the name of the track that was playing.

Squeezebox Boom DIY wall mount made of bicycle parts

I finally got myself a SB Boom for the bedroom. It was clear that I need some kind of a wall-mount, and as the Boom has 4 mounting holes, that didn’t seem to be too complicated. Only problem here is the threading, seems to be 2 or 2.5mm (sorry didn’t measure), I have found some screws out of an old computer hard drive that fit.
The mount itself is made of 2 bicycle stems, connected through a piece of 1 1/8″ steering tube of a fork.

Eberspächer heater 24V to 12V conversion

The previous owner of our boat installed an Eberspächer Air heater, which was meant for a lorry, and therefore 24V. Our boat only has 12V Batteries / Alternator. As far as I know he used another battery in series with the auxiliary battery to power the heater, but this battery obviously wasn’t charged when using the heater – I didn’t like that solution, the heater wasn’t used for about 10 years, and now I’ve decided to build a solution.

DSC00040

 

Idea:
The heater has a small controller unit + the heater itself. My idea was to find a 12V to 24V step up converter, and run everything on 24V. This didn’t work out, as I didn’t find an affordable 12V to 24V converter, the one I bought said 150W output power, but that just isn’t enough for the initial glow.

2nd idea:
I thought, why not just replace the glow plug, with a 12V version (didn’t know if it exists back than), and use a relay to switch a 12V line with the 24V from the controller unit.

Doing it:
At this point I’ve decided to unmount the heater, as i needed to find out what kind of unit I have, and which glow plug I actually needed.

What I found was even better:
There’s a huge resistor (or call it a spring) in series with the glow plug – the glow plug is actually a 12V plug, you just need to rewire it to not use the resistor, and install the relay as mentioned above (I obviously don’t know if this is with all the Eberspächer heaters, but it’s worth looking).

Resistor:

DSC00032

Open controller unit:

DSC00034

Controller unit with attached step up converter + relays:

 

 

DSC00036

DSC00035

Close-up of the modification:
DSC00038

The yellow line goes to the glow plug (already connected directly on the picture, the yellow line in the background goes to the resistor and back):
DSC00041

V-Zug Adora – Fehler 1 – Temperaturfühler defekt

Kürzlich hat meine V-Zug Adora 55 Geschirrspühlmaschine den Dienst mit F1 – Fehler 1 verweigert. Das Handbuch beschreibt leider nur den Fehler 8 (zugeführtes Wasser zu heiss). Meine E-Mail Anfrage bei V-Zug wurde schnell und kompetent beantwortet:
“Wassertemperaturmessung fehlerhaft” Was wiederum nicht heissen muss, dass es der Sensor ist, aber die Wahrscheinlichkeit ist hoch. Das Teil habe ich darauf ausgebaut, befindet sich im unteren Bereich, an dem man durch entfernen der Front + einer weiteren Abdeckung herankommt. Leider ist das von V-Zug verbaute Teil ohne Typenbezeichnung, die deutsche Konkurenz verbaut ein physikalisch baugleiches Teil, aber wie ich herausfinden musste mit anderen Werten. Erneut bei V-Zug angefragt, die Teilenummer ist: P59013 – mit Versand hat mich das Teil CHF 21.20 gekostet (was ich sehr fair finde).

Die Bezeichnung auf der Rechnung ist:
Temperaturfühler NTC 100K Ohm / max. 100°C Stahlgehäuse
Bei Raumtemperatur ergab meine Messung ca. 140kOhm. Mein defektes Bauteil lässt sich nicht mehr messen (widerstand unendlich hoch).

Gerne würde ich hier eine Liste mit weiteren V-Zug Fehlercodes publizieren, falls jemand etwas weiss bitte über Komentar bei mir melden.

Yet another Lux-RC / Easy2Led bike light

Training off-road during the colder days often also means that it’s getting quite dark. There are lots of bike lights on the market, most of them are either too expensive or not 100% satisfying. There’s however a simple solution using components from Lux-Rc and Easy2Led.

Lux-Rc light engine:

A small board, 3 leds and a boost regulator is already integrated, different configurations are available

Easy2Led light housing:

A good fit for the L33X light engine from Lux-Rc, in addition you’ll need a handlebar mount (Lupine or the Chinese equivalent that can be ordered at Lux-Rc), cables, battery, a momentary switch.

Battery:

Input voltage depends on the light engine, mine is optimized for 2s Li-Ion batteries, I’m not going into detail about building a Li-Ion battery pack. This is dangerous, and you should know what you do, or better leave it. My battery pack has some additional heat-shrink tubing over each individual cell, heat shrink tube over the whole pack, and then a layer of plastidip liquid rubber on top of the heat-shrink tubing. Additionally, I’ve added some foamed rubber on the side that touches the frame when the Pack is mounted to my bike.

Oh yeah, and please use a little less thermal glue, maybe 1/3rd of what I’ve used should be enough.

Project FireStarter

I’ve always wanted to have a battery powered BBQ fan. The plan was to make it small/portable, but it all went wrong:

Having a cold beer on a boat.

I prefer having a cold beer when I’m on our boat, but since this is usually on the sunny days, the performance of our fridge (Waeco CF-18) was too weak to cool one down in a short time (temperature in the cabin goes up to ~35° C if the sun is burning down).

I’ve been thinking about some kind of a GSM-based remote control, and actually found a nice product called microguard. The product seemed perfect, relatively cheap, easy to implement, available, but there was no time-out that could be set. Even if I have a separate starter-battery, it was key to find a solution that turns off the fridge after a given time without user interaction. Luckily, the guy who runs microguard was very cooperative, and added a timeout feature for me (and everyone else of course).

The module now turns on a relay for two hours after it’s been called from my or one of 4 other predefined phones. this is a bit on the short side, but I can live with calling twice.

This is how my installation looks:

From left to right:
Charge split diode / Rear side of main switches / Fridge fuse / Microguard module with relays, cables, mounted on an a plastic case / RedBull cup as holder for a Siemens S45.
The Cat5 network cabling goes directly to the voltmeters on the dash, this was made to show the exact voltage without loss due to load on the cabling.

As mentioned before, I have two separate batteries the starter is a traditional lead/acid battery, and the domestic is an AGM type, which allows deep cycles.

This is how the battery compartment looks:

 

The switches on the left are starter / jumper / domestic. This allows maximum flexibility. The domestic main switch actually doesn’t kill the microguard / fridge, so it can be off, and I can still call the fridge.

Balancing the Magicshine MJ-836 Bike Light Battery

There are many reports about unbalanced Li-Ion cells in Magicshine Bike lights. This can lead into overcharged cells, which is dangerous, or at least will damage the cells. The charger which comes with the light does not have any balancing capabilities, the battery itself only has some very limited under/over voltage protection.

To solve this problem, you’ll need to modify the battery (add a balancing connector), and use a different charger, or external balancer. I’ll use my hobby charger, which has an integrated balancer.

This is no complete guide, it needs common sense, and some knowledge about electronics. You should also know, that working with Li-XX cells is dangerous.

If you don’t know how Li-XX balancing works, please read:
http://scriptasylum.com/rc_speed/lipo.html
http://www.rcgroups.com/forums/showthread.php?t=599316
before starting to modify your battery pack.

Adding the balancing connector:

Open up the pack:

The interesting part is the four 18650 cells, remove the top of the pack (shown on the left):

Add a new wire which will end as your balancing connector, this is connected to the “middle” of the pack, the pack is 2S2P.

Your Magicshine Pack should now look like that:

The next Step is to put back the isolation, and bring the balancer wire out of the case. this can be done through the original cable exit:

I’ve added a 2mm banana connector, some heat shrink tube, and a cable tie:

Finished Pack, charging:

test

As you can see, the connections were made as follows:

– from the battery goes to – of the charger, and pin1 of the balancer.
newly made balancing wire goes to pin2 of the charger
+ goes to + of the charger, and pin3 of the balancer.

Trisa Elektrozahnbürste AA Mod

This article is about a swiss product, which I don’t think is very common outside Switzerland, so I’m writing in German.

Als ich mir die Elektrische Zahnbürste von Trisa gekauft hatte viel meine Wahl auf dieses Modell, weil ich weder Platz noch Lust auf eine Ladestation hatte. Das Konzept aufladen und leerbrauchen hat mir da einiges mehr zugesagt. Am liebsten hätte ich jedoch eine Zahnbürste gekauft, die mit einer herkömlichen AA Batterie / Akku betrieben wird.

Letzte Woche ist mir die Trisa aus unerklärlichen Gründen ausgestiegen. Ich habe dann am Ladeanschluss mit einer Zange die Platine inkl. Akku rausgerissen. Eigentlich mit der Idee das Teil zu reparieren, doch der AA gedanke war schnell wieder da. Kurz eine Batterie reingesteckt, passt perfekt, nur findet auf der Vorderseite kein Kontakt statt. Es fehlten einige Milimeter beim Minus-Pol, welcher in der Bürste sitzt. Ein Quadratischer Neodym Magnet mit 7mm Seitenlänge war schnell zur Hand, und stellt nun den kontakt her.

Die Zahnbürste läuft nun perfekt mit einem AA Akku.