Monday, December 13, 2021

Airbow Guard Cover - V2 Design Update

Design Update

After several years of making the previous version of this gadget for various people around the world, I was forced to redesign it a little so that I could print the parts on a slightly smaller 3D printer, because the original printer I was using sorta started having too many problems.  After I managed to make a few of the covers on the other printer, I decided to keep working on it a while and update the design with a few changes that I have thought about over the past few years.

Here's the blog post about the previous design: https://whirlysworld.blogspot.com/2018/01/benjamin-airbow-missing-accessory.html  So, I won't repeat any of that stuff here.  Most of what that post says hasn't changed.  This post will just cover the design changes for "Version 2".

Friday, September 10, 2021

Arduino Pro Mini Vin/RAW vs. Vcc vs. FTDI

Goal

Connect an Arduino Pro Mini such that external devices get their power from an external power supply, while the Pro Mini remains connected via FTDI to a USB port on a computer, for programming, and serial-monitor uses.

Challenges

  • Powering the Pro Mini board + external devices totaling more than 200mA exceeds the rating for the on-board voltage regulator (VReg) on Vin/RAW.
  • Powering the Pro Mini board using Vin/RAW (i.e. VReg input > the board's operating voltage / 5v or 3.3v) sends voltage/current back, from the VReg output, through various routes, into the FTDI output pins, and in turn through the USB connector, risking damage to the USB port on a computer used for programming or a serial monitor.
    • Note: Disconnecting the FTDI +5v pin prevents the FTDI from communicating with the Pro Mini, and doesn't block all the backflow paths anyway.
  • Powering the Pro Mini board using its Vcc pin with an externally regulated voltage matching the board's operating voltage, basically attaches to the same "bus" as the output pin of the on-board VReg.  This conflicts with input voltage from the USB/FTDI and may backflow current into the USB port.
    • This might be tolerated, but still isn't an ideal, safe way to hook things up.
  • Logic voltage to control high-power external devices (e.g. motor, LED-array, or loud buzzer) must use the same reference +/- voltage as the board, or HIGH and LOW might make no sense.

Solution

While programming and developing, ONLY connect the GND of the external power supply to the GND of the Arduino Pro Mini, creating a common reference point for the Negative / NEG / "-" / Ground / 0v point, but _NO_ connection or conflict for the Positive / POS / "+" / Vcc.

Later, in order to run the external devices directly from the external power supply, and separately also run the Arduino Pro Mini from the same external power supply, completely remove the FTDI/USB device, and connect the external power supply to the Pro Mini via the appropriate pin, Vcc or Vin/RAW.

Explanation

The reason this works is that the difference in potential (voltage) observed relative to GND is polarized / directional based on which way current flows in the circuit.  If the GND reference point for both the board+USB and the external power supply are tied together, then the relative reference point for current flow, is also common.

Transistors (typically used to allow low-current logic to control a higher current device) trigger (amplify) based on current flow, so it only matters that the signal (base) current flows the same direction as the load (collector/emitter) current.  With the GND for both power sources (USB/FTDI and external) tied together, the current flow direction will match.

Connection Scenarios

  1. Programming / Development / Debugging
    • USB/FTDI Connected - supplies power to Arduino Pro Mini
    • Only Arduino Pro Mini GND pin connected to external power supply GND
      • i.e. Pos NOT connected
    • Pos and Neg from external power supply connected to supply power on external devices
  2. Standalone
    • USB/FTDI NOT connected to Arduino Pro Mini
    • Both Pos and Neg from external power supply connected to Pro Mini Vcc and GND
    • Pos and Neg from external power supply connected to supply power on external devices

Disclaimer:

The terminology used here, and maybe even some of the technical statements might not be expressed in the same terms as are used to explain electronics circuits and concepts elsewhere.  This was just my attempt at explaining things the way it makes sense to me, so that when I forget how this works, I can use this as a reminder.  Hope it helps someone else who is struggling with the same thing while developing with an Arduino Pro Mini.

Some of the discussions about this seem to go nowhere, or end in unresolved debate:
  • https://forum.arduino.cc/t/power-the-pro-mini-through-vin-and-serial-ftdi-chip/317067 
  • https://forum.arduino.cc/t/connecting-5v-vcc-to-an-arduino-pro-mini-or-to-any-arduino/340382
  • https://electronics.stackexchange.com/questions/97184/how-to-power-arduino-pro-mini-via-vcc-pin-12v-input
  • https://forum.arduino.cc/t/powering-pro-mini-and-ftdi-serial-question/252020

Tuesday, February 23, 2021

2010 Subaru Outback - LED Headlight Conversion


 Overview

The Subaru Outback is a really popular car, right?  There are millions of them on the road, right?  Things that are annoying about popular cars get solved with aftermarket products after a while, don't they?  Well, I'm puzzled, because the halogen lowbeam (H7) headlights on a 2010 Subaru Outback burn out WAY too often (every ~10 months in my recent experience), and they are an ENORMOUS pain to swap out.  Yet, there seems to be no reasonable options to install LED headlight bulbs.  I finally had enough, and spent some time designing my own solution.  This post is meant to share what I did, so that maybe someone else will have a bit of a head start on the whole endeavor.

Existing Solutions

SubieLED.com

The LED kits from this company seem to be relatively easy to install, and work with the existing dust cover by including an LED with a wide, low-profile heat sink.  Another option looks like it would require the dust-cover to be left off.  Here's a link to their stuff, in case they get them back in stock, or offer them at a more reasonable price:  http://www.subieled.com/#!/Low-Beam-H7/c/48078355

CarRover Silicone Dust Cover

Using these seemed like it might work with many of the standard H7 bulbs you can get for $30 or $40 from Amazon and various other sources.  I even ordered some but when I got them, and thought about it a little more, I realized they wouldn't really close up the headlight housing since the spring clip would be in the way, and if the wire from the LED module/bulb comes out the back, it somehow has to go back into the headlight housing to connect.  That further disrupts the dust seal allowing moisture or dust to get in, so they're still not ideal.

Others

I'm sure there are other LED "bulbs" or dust-cover options that might sorta work for a 2010 Subaru Outback, and there are quite a few that say they'll work, but I really didn't find any that were meant for my specific application.  If you're reading this and you know of something, please add a comment.

My Solution

I have a 3D printer, and reasonably good 3D design skills, so I decided to tackle this with my own "resources." The process was a little annoying since I also decided I was done paying yet-another-$30 for more halogen bulbs, and one of them had already burned out, so I was a bit reluctant to drive after dark.  Then the other halogen burned out, so I was stuck not using the Subie until I worked out how to get the LEDs installed.

Inverted Dust-Cover

I started with the basic idea of an inverted dust cover that leaves the LED heat sink out where air circulates to cool it, and still seals up the headlight housing.  However, unlike the "one size fits all" silicone dust cover, mine would need to either account for the spring clip, or replace its function by holding the LED H7 in place.  There was also the challenge of routing the wire from the rear of the LED back into the headlight housing to connect with the car's wiring harness.


Rigid Plastic

3D printers can produce flexible objects like silicone, but most of the time they work with rigid materials like PLA or ABS.  With strategic use of a few o-rings, I decided the best way to replace the function of the spring-clip was to make the dust-cover fit precisely into the opening and hold the bulb in place.  Here's a sketch of what that means for those who understand things better visually than verbally.

Pass-Thru for the Wire

The final challenge (or so I thought) was passing the wire through from outside back into the headlight housing.  You can make any shape you want with a 3D printer, so that was just a matter of printing a slot for the wire, and a plug to cover up the slot after the wire was in.  Easy!!  Well, ok, it was one of the more tedious parts of creating the 3D model, but still not a complete roadblock.

Tight Spaces


The actual final challenge was that the inverted dust-cover could not be maneuvered into the headlight housing with the LED already installed.  The "blade" part of the LED just sticks out too far, and the dust cover has to slide around in front of metal cross-member in the body of the car.  The only option is to get the dust-cover in place with the flange part of the LED and then install the LED body.  The risk of dropping the LED flange and/or the o-ring into the bottom of the headlight housing was promising to be a show-stopper.  I REALLY didn't want to add the chore of fishing those things back out of the housing to the already-frustrating ordeal,  But, back to the 3D printer for a solution... all it took was a substitute for the LED body, without anything sticking out, to use during installation.  The downside is that this is where the whole solution really locks into a specific LED product (for now).

More about the Lock-In

As I mentioned in the previous section, this solution is not only specific to a 2010 Outback, but also to a specific LED product.  It's not that this product is necessarily any better than others, but just happens to be the one I settled on.  The main drivers for my choice were, A) fanless design, B) good reviews, C) BeamTech brand generally has good reviews on all products, and D) 30,000 hours lifespan.  So, here are the details.

  • BeamTech H7 - BEAMTECH-CCD17-05-S2-H7
    • At Amazon: https://smile.amazon.com/dp/B071J4SCXY/ref=cm_sw_r_tw_dp_NCWMMWCDBZEWQ9ER9YHP
    • At BeamTechs.com: https://www.beamtechs.com/collections/j1-led-headlight-bulb/products/beamtech-h7-led-headlight-bulb-fanless-csp-y19-chips-8000-lumens-6500k-xenon-white-extremely-bright-conversion-kit
By the way, the headlight housing is the same on some other Subaru models, like the Legacy sedan, and possibly other year models (maybe through 2014).  I'm not 100% sure which ones this might also work on.

Summary


There are a few sub-optimal ways of installing LED headlights in a 2010 Subaru Outback and as a result of the time I spent obsessing over the design and development, there is (now) a more workable, and/or affordable option.  Hope this inspires someone else to tackle this project and eliminates some of the guesswork that I had to stumble through.

I know not everyone has a 3D printer, but if you do, and you want to do this project without working all that out for yourself, you can find the model files to print these exact dust-covers and the installation tool for a small fee here:  https://cults3d.com/en/3d-model/various/2010-subaru-outback-led-headlight-dust-cover

I also occasionally have some idle time on my 3D printer, so if it's not an option to print it for yourself, I can print the parts and put together a kit with the o-rings and screws you'll need (but you buy the LED bulbs yourself).  Based on previous, similar projects, I'll ask $50 to reimburse materials, printer setup time, trip to UPS, packaging materials, etc. + actual shipping cost (probably around +$10 to most places in the U.S. and +$25 international).  Just email me at subaru.ledmod @ liveintellect . org (remove the spaces) to request.  I'll let you know how quick I can get it done, arrange for Paypal or something similar, and go from there.

Saturday, January 23, 2021

Userscript to Automatically Click "Not Now" on the PayPal "Get the App" Nag

I finally had enough of the prompt EVERY TIME I LOG IN to PayPal nagging me to get their stupid mobile app.  Here's the UserScript (tested in TamperMonkey) to detect when that annoying "Get the App" page pops up right after login, and automatically find the "Not Now" link, and automatically click it.  This is what I would do anyway from now on, so the browser might as well do it for me.


// ==UserScript==
// @name         SkipPaypalLoginNag
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Automatically click the "Not now" link on PayPal's aggravating "every time you log in" Nag to get their stupid mobile app
// @author       Super-Annoyed PayPal User
// @require      http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js
// @require      https://gist.github.com/raw/2625891/waitForKeyElements.js
// @match        https://www.paypal.com/cgp/app-download*
// @grant        none
// @run-at       document-idle
// ==/UserScript==

(function() {
    'use strict';
    waitForKeyElements ("[data-name='continue_to_the_website']", clickTheNotNowLink);

    function clickTheNotNowLink() {
        var skipLink = document.querySelector("[data-name='continue_to_the_website']");
        if (skipLink) {
            console.log("Found the link to skip this annoying thing");
            skipLink.click();
        } else {
            console.log("Didn't find the link to skip the annoying thing");
        }
    }
})();