Oops! Something went sideways.

Looks like the styling got goofed up. Sorry about that, unless it's what you wanted. If this isn't what you were looking for, try force refreshing your page. You can do that by pressing Shift + F5, or holding Shift and clicking on the "reload" icon. (It's the weird circle arrow thing "⟳" just above this page, usually next to where it says https://blog.unitedheroes.net...)

isn't quite ashamed enough to present

jr conlin's ink stained banana

:: Raspberry Pi, PCA9685, and YOU!

i made a creepy eyeball pumpkin over the weekend. There are lots of how-tos for these sorts of things, so i’m not going to do that. Instead i’m going to offer some lessons-learned.




First, off, i’m a software guy. This is the first time i ever played around with servo motors.

So, let’s start off at the top, shall we?

Aside from the raspberry pi, you’ll need

  • A fake pumpkin big enough to get your hands into (yes, both hands)
  • A box cutter with a fresh blade, because otherwise it’s not going to cut right.
  • A PCA9685 servo controller board. Get the one from Adafruit. Yes, you’ll have to do soldering to add the pins. If you get one that’s already soldered, you’ll still need the Adafruit libraries and documentation, because they’re better than the ones that come with the pre-built boards.
  • 4 strand of Female to Female jumper wires. Really, you should have a bunch of these lying around if you’re going to do stuff with a Pi other than run Pi-Hole or HomeAssistant on it.
  • A hot glue gun and a surprising number of glue sticks
  • 2 bags of 10 full globe plastic eyeballs. Yes, the half eyeballs look better, but they stop looking better once they turn any angle. Yes, it’s more eyeballs than you need. You’re going to screw up a few.
  • About 10 inches of PVC pipe. You will need to bring a sample eyeball with you to make sure it fits inside the pipe.
  • A three AAA battery holder plus connector wire (optional, but since there’s, like, one electronics shop left in the San Jose area that even comes close to having it, it’s a good a reason as any to go to Excess Solutions, which has become the last one standing from Weirdstuff and HSC)
  • Nylon zip ties. (unless you’re planning on hot-gluing the motors to the pipe because you never want to use those motors for anything else ever again.)
  • A roll of 20 gauge bailing wire you bought back in the 80’s and forgot you had until now, but thank you past you for not pitching that.
  • A 1.25″ SpeedBor drill bit you got to add a drain to a sink years ago and also forgot you had but thankfully didn’t pitch or sell.
  • A dremel with one of those drum sander bits.
  • a breathing mask because it turns out that dremel’d off foam gets friggin’ EVERYWHERE.
  • Two cans of compressed air.
  • A shop vac with a reasonably clean filter.
  • A chop saw, rotary sander, laser level and drill press. Ok, like me, you probably don’t have that, and unlike some of the other crap on this list, you’re not going to get those either. So, instead build a bunch of crappy rigs to try and keep a hacksaw straight while wondering if you ever had a proper PVC pipe cutter (you don’t). You’ll also need whatever sandpaper you can find to take all the plastic burrs off the bad saw job you did.

Now for the lessons learned:

  • This is going to take all day. Plan accordingly.
  • Wiring up the PCA board involves you understanding the semi-arcane labeling systems that exist for electronics. Basically, for the Raspberry Pi:
    PCA Pi GPIO post Notes
    GND 6 Ground (also pins 6,9,14,20,25,30,34, or 39
    OE Output Enable (NOT USED)
    SCL 5 (Serial Clock Line)
    SDA 3 (Serial Data Line. No idea why “A” either other than easier to read as tiny print.)
    VCC 1 IC Power (3v also pin 17)
    V+ 2 Servo Power (5v also pin 4)
  • Wire up the boards and add the motors (remember, for the motors, darkest wire is “Ground”) with power off.
  • Once things are wired up, boot up the Pi.
  • Make sure the Pi has the I2C kernel mod loaded (use sudo rpi-config to turn it on).
  • You also want to apt install i2c-tools as well so you can verify that the PCA board is recognized:
    # i2cdetect -y 1
         0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
    00:          -- -- -- -- -- -- -- -- -- -- -- -- --
    10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    40: 40 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    70: 70 -- -- -- -- -- -- --
    

    No values at 0x40 & 0x70? It’s not there.

  • Drilling holes on the directly opposite side of a ball is not easy. You can build a jig to hold things. i wound up taping a bit of PVC pipe to an old phone book, finding the center, and using a bit of wire as a post to hold it in place. i still screwed up, and that’s why you buy two bags of eyeballs.
  • You will try to be all sorts of clever in how you want to rig up the eyes. Don’t be. Simplicity works better than imagined artistry. (Plus fishing line will NOT cooperate with you trying to emulate eye muscles no matter what elder gods you may invoke.)
  • Make sure every single time you’re about to do something irreversible, that you’re working on the correct side. You can hide some sins, but not all of them.
  • Make the eyeball mounts first. These will take most of the day and be really annoying. Remember to cut more than you think you’ll need because you’re going to screw some of them up.
  • Depending on how bug-eyed you want your eyeballs, you can drill the swivel point deeper or shallower into the lengths of PVC. Mine are around 7.5mm in. Remember what i said about irreversible? Mark which side of the tube is the front. Future you will thank you.
  • Drill all the holes before you start gluing things in place. Each hole will need 45 – 70mm clearance (depending on where the motor is attached). Use a sample eyeball mount to figure out placements. If you’re feeling super clever, you can push a length of wire from the inside out to not where to drill the hole.
  • Did i mention that pumpkin foam gets everywhere? Oh, just wait.
  • Since the shell will be thick (anywhere from 10 to 40mm), you’ll need to dremel out a bunch of it. This will terrify you because it’s a whirring destruction machine and you know your hand is going to slip and destroy everything. Fortunately, this will distract you from the ungodly amount of dust being generated.
  • It’ll be only afterwards as you survey the foamy carnage that you’ll think about setting up the shopvac to suck up the dust being generated.
  • Oh, yeah, and the face mask would have been good too.
  • Place the eyes into the holes and secure them in place with hot glue. Bonus, you want to hold the eye in place with one hand while applying the glue otherwise the damn thing will slip off, or the glue will leak and stick to everything. Check each before everything sets.
  • ProGuy who did it once tip: compressed air will help set the glue quicker that just ambient temperature will.
  • Once all the eyes are in place, try to secure the internal cabling. Don’t try to use blue tape to hold things in place in there because holy hell there’s still ground up foam? You can use bits of blue tape to hold strands of wire together.
  • Plug the eyes back in, pray to whatever gods you have, and power up to check what’s working and what’s not.
  • Tweak the range of movement, because it’s not going to be from 0 to 180. i use 20-160. You’ll know when you no longer have eyeballs that sound like angry bees when they’re resting.

There, that’s it! Wasn’t that easy and fun?

Of course it wasn’t.

Still, if you want to add a light, i found an old LED bike light works pretty well and might even be a bit overpowering.

:: In Praise of Robber Barons

John D. Rockefeller became the nations first billionare (back when the cost of living was around $.25 a day and the average wage was around $430 a year) He was the richest American ever, and widely considered to have been the richest person on the planet. His company, Standard Oil, was considered the most ruthless and cruel monopoly and is the textbook example of Monopoly used still today.

Andrew Carnegie pretty much was American steel at a time when everything was made from steel. Steam engines, the rails they ran on, the beams used to construct modern buildings, cars, ships, you name it, all steel, and pretty much from his foundries. He killed over 2,000 people because his get away flooded a town, and he is responsible for the Homestead Strike which is one of the bloodiest anti-union attacks. Fair wages and decent working conditions? Bah, peasants.

William Randolph Hearst build a publishing empire from salacious articles and, frankly, out right lies. Heck, to boost sales of a flagging paper, he even convinced the country to go to war. (You, know, just in case you think that conservative nut jobs riling up the masses is a new thing.)

Why do i note these folk? Well, recently i’ve been thinking about our current crop of robber barons. It started when i was listening to a podcast talking about the Vision Fund which gives questionable startups like WeWork ungodly gobs of cash.

The point really got driven home when i saw this tweet showing how taxes for the top 400 have dropped over the years.

So, what are the ultra wealthy folks like Bezos, Jobs, Zuckerberg and the rest doing with their cash? They’re “reinvesting it” using investment funds like the Vision Fund above. They’re burning it in rocket fuel.

Know that they’re not doing with that huge pile of cash? Building universities, or public squares, or even over-opulent tourist attractions lording over large swaths of green space. Basically, the old robber barons at least had some level of civic mindedness (or at least sense of legacy) to realize that at least trying to buy some positive legacy might be a good idea.

At least that’s one thing i can look forward to. The new crop will be forgotten quickly.

They’re the kings that Ozymandias was trying to impress.

The ones you have no memory of.

Because, you know, fuck them.

:: Goals Keeping

Can i take a moment to say that i have learned to hate Goals?

i don’t mean things like “Personal Goals” (like to learn to play the piano, meet some famous individual, travel to location, etc.) or the sort of things they keep track of in football matches, i’m talking about the Goals you’re expected to set and achieve every quarter/year by your employer.

What Are They?

A Goal is how you justify being paid. They’re a set of tasks that you’ve declared you’ll accomplish in X period for the benefit of the organization. They’re the short description of your work that your boss will read and regurgitate up the chain to whoever decides you get a paycheck.

If you’re clever, your goals will align with your company / division / team.
If you’re creative, they’ll extend the reach of company / division / team and make your direct chain look better.
In reality, they’re an experiment to determine who is good at predicting the future or has insider information that can be attributed to higher placed individuals.

Why They Suck

Goals are great if you’re doing factory work. They fall into the class of “i will do X more efficiently to increase profitability”. This could be reduce costs. This could be to increase productivity. This could be to acquire more revenue or assets for the org. If you’re working for an org that does something like that, it’s super easy to come up with one or more goals. Again, if you’re clever, you’ll even help yourself out by quietly introducing an inefficiency that you can then claim to improve in some future period.

This is because your manager is not paying attention to you specifically. Often, the system is self reporting. You set your goals and later report accomplishment or failure. This is super obvious if there’s a “self-assessment” operation. You’re going to report that “i’m Awesome! Except for the fact that i only did 10x more this quarter than i predicted.” That last bit shows that you’ve got room to grow and will be the point that your manager will discuss with you during your review.

There is absolutely no reason to be honest, even though you’re regularly told you must be. Let’s say you were honest and put down “i got everything done, on time and on schedule, but the project was cancelled.” You would be at a disadvantage since there’s no win and you’ve effectively wasted your time. You had no control over the project being cancelled, but that was also a failure for not predicting it would. Management has a reason not to give you a raise. Congratulations.

Mind you, your boss is most likely innocent in this. They have to repeat this operation with however many reports they have, which gets multiplied up the chain. If you’ve ever been a TA grading papers, you know how much fun it is. At some level there’s a fixed budget that is used to determine who gets a raise, promoted, or dismissed. If the pool is about 5% per employee, and Sue gets a raise and bonus of 7%, then Bob may get only 3% this year. Better luck next year, Bob.

Where things start getting ugly is when you aren’t doing a metric based set of tasks.

Take, say, what i do. My job is to work on key back-end services, modernize and support them. My job is to deal with the acquired technical debt accrued with each new product release. And because New Thing is Awesome happens a fair bit, there’s a good amount of debt as folks wander off between New Thing is Shipped and Audience is Relying on New Thing. Never mind what it’s like at We’ve Been Charging Customers For Two Years for Thing, and Now There’s A Critical Bug.

Because, yeah, those things happen.

So, when it comes time for me to put together a list of goals, things get ugly fast. i have to predict the future, then when chaos happens. i race at the end of the evaluation period to try and do the thing i said was important however many months ago. If i were really playing the game right, i’d let the chaos collapse around me while i focused only on the few tasks i said i would.

i mean, sure, three core items of technology collapsed and the market disappeared, but look at the kerning and word placement on this document. ✔️

Sometimes figuring out goals is easy. In the first half of the year, i put together a new client library for one of the services i oversee and greatly improved operation and utility, and i was able to show a tick mark next to a goal, meaning i’m getting paid this half of the year.

i also did a bunch of other stuff, like work with 3rd party vendors, maintain support libraries, build relationships with customers, etc. that kept me pretty busy, but no check mark for that. Most of the time, i do support. i’m one of the “medics”/”clerics” of the org.

i have a beefy goal for this half of the year, but we might remove it. i’ve been busy pushing a critical bit of infrastructure closer to done (not a personal goal). We’ve also got an intern next year and it’ll be a good project for them. So, that leaves me without a goal.

Aside from the critical bit of infrastructure (which is more a shared goal), keeping things running so we can consider offering a pay service (also shared) and getting my boss up-to-speed (shared), and whatever other fires crop up.

This leads to “retroactive goal setting” where i get fairly late into the half and thanks to copious weekly activity report keeping, specify what major accomplishments i hit as ‘goals’. Usually with my direct managers approval because my goals are late and they need to checkbox that they’re in.

Because, again, this is more about giving someone a reason to continue to pay you for 6 months.

So, what should we use?

i’m willing to say “right tool for the job”.

For tasks, there’s no reason not to use a task list. As an org, you probably already have these. They’re what you use to get to your corporate goals.

For determining value, there’s, i dunno, let’s use employee contributions. Folks should keep a list of things they’ve done and (with the help of their manager and peers) write up a summary that can be presented at the end of the evaluation period, because that’s the end goal anyway. Maybe it’s “increased the number of X by Y%”. Yay you!

As an org, it’s a lot easier to plot how well your group is doing to achieve a given set of goals. There’s your group metric, but at the individual basis, probably not a great idea to introduce something that’s going to be gamed like nobody’s business.

Unless your job is to pull the lever and press the button to make the widget, there’s going to be a lot of complexity and unforeseeable events. Don’t make things hostile toward those.

i generally rally against the idea of work accounting. Not being held accountable (as in “you failed to deliver a task we needed by when we needed it that you said you could do), i mean accounting (as in you committed over 200,000 lines of code this quarter and resolved 47 issues). It’s why i am not a super fan of scrum’s Burn List.

But yeah, the current state of Goal keeping is just the fever dream of accountants.

:: Waiting For Mr. Good Avenger

There’s a really popular movie opening this weekend. You’ve heard of it. It’s earned (no kidding) $1.2 Billion dollars in the opening weekend and everyone says it awesome.

Mind you, being a card carrying nerd, i should probably either have seen it, have tickets to see it, or be in some theater right now watching it. i’m not.

Truth is, i’m not really sure i enjoy going to movie theaters anymore. i mean, they’re comfy, and the screen is huge and all, but they don’t really hold the same appeal to me anymore.

There are probably a lot of reasons for this. If i go to a given movie, i usually do it alone because most of the folks i’d want to go see a nerdy superhero beat-em-up live hours if not hundreds of miles from me (Thanks Internets!), so i’d be the sad, old dude in the back of a theater. Plus, for a communal activity, you’re supposed to be quiet. i mean, i get that nobody wants to hear about your rectal exam while Thor and the Hulk share a tender bonding moment bashing in alien skulls, but anything other than applause at predesignated points is roundly frowned upon. Then, you pay to watch the movie, and get 45 minutes of the same commercials you see on TV, previews for other movies you probably already saw on YouTube, and told to shut up repeatedly. (It’s not like audience participation ever really worked for a movie, after all.)

i dunno, but it just isn’t fun anymore.

So this means that watching something “spoiler free” just doesn’t happen.

i’m pretty sure that within hours i’ll find out about Iron Man’s defeat at the hooves of Hellcow, the surprise Jubilee/Dazzler dance number, or Thanos being defeated by the rise of Dr Bong. It’s ok. i honestly don’t care about spoilers because knowing that the whale won doesn’t make Moby Dick any less of a work of literature, and i’m pretty sure everyone who binge watches movies on Christmas has at least a clue about Clarence’s wings. If your movie runs for 3 hours and can’t survive someone knowing that Thanos has a severe reaction to Rice Krispie treats, well, it’s probably a 3 hour movie folks can skip.

So, i’ll probably just have to contend myself for waiting the 4 months to a year until the studios decide to let some streaming service run it. Heck, maybe i’ll even pony up $20 to watch a couple of Marvel flicks off of Disney+, and then cancel when i’m done.

At least i can hit the pause button to refresh the popcorn bowl.

:: Fun With Miles per kWh

Ok, so yeah, a bit of a follow-up on the electric vehicle front

In short, i got one. Well, sort of.

What i got was a Plug-in Electric Vehicle, which gets about 48* mpg city and a pure electric range of about 26** miles. Since that’s twice what the last car got, and my work (which is 10 miles away) very kindly provides free charging, i expect my fuel bill to drop a fair bit. The car is also pretty fun to drive and ticks pretty much all my required checkboxes (aside from a trailer hitch for a bike rack, but that’s something i can solve pretty easily).

What’s really interesting is doing the math on the charging bit, and why i’m now super happy with a PHEV rather than a full on electric. Particularly since i’m a right cheap bastard at times.

Consider, as stated, my car now gets about 26 miles on 8.6 kWh, or about 3.02 miles per kWh. That’s the max range on the full battery in pure electric mode, probably with a strong wind at your back and ample down hills, but good enough for now. It takes 2 hours and 42 minutes to charge up from pretty much zero on a Level 2 charger.

The hybrid engine gets me around 48 mpg in the city, which is what i generally drive. Again, presume strong winds, ample down hills, and whatever other bits gets you to that high of a number.

Currently, gas goes for around $3.30 per gallon. 26 is about 54% of 48, so it’s safe to assume that running pure electric is equivalent to running about half a gallon of fuel. That means it costs me $1.15 to drive the equivalent distance if my battery is flat and i use the gas engine.

So, when i charge, i want to look for any charging station that costs less than $1.81 total to use. That means anything that’s $.01 a minute (well, $.68 per hour because rounding) or less, or charges less than $0.21 a kWh. According to PG&E, my power company, i pay $0.28 per kWh peak (between 1:00 PM and 7:00 PM) and $0.27 off-peak, so it doesn’t really make sense to charge at home. i’d be paying an equivalent $4.64 for a gallon of gas.

What floors me is that looking at various commercial charging sites charge even more. EVgo, charges $1.50 an hour, which is like spending $6.70 a gallon on gas. i mean, i totally understand companies needing to make a profit and all, but Holy Ampère that’s a lot. Granted, it gets worse. There’s at least one “public” charge station nearby that charges $4 an hour. That’s about $11 a gallon.

i’m going to guess that my car is probably less efficient a pure EV than, well, a pure EV, but even so, if you’ve got an 80kWh battery and your range is 300 miles, that gets you about 3.75 miles per kWh. Still, a full “tank” of electricity still costs far less than it used to in my last car, so not really complaining. i’m also willing to bet that prices per kWh are probably less outside of the Bay Area, but yeah, i’m fine plugging into the free stations when i can and may just skip the pay ones.

Sam Penrose wrote up his thoughts about gas stations vs. electric. i’ll note that in the summer months, i’m getting around 51 MPG, and can fully charge off of the solar panels while they’re producing > 3kWh, and still send some to the grid. i’ll also note that the car is a blast to drive as pure electric, so i tend to charge up frequently.

* for the pedantic, after about a week, i’m seeing around 42mpg and the full battery charge gets me around **24 miles, but it’s also winter, which sets my target price per kWh to $.24 or $.77 an hour.

Blogs of note
personal Christopher Conlin USMC memoirs of hydrogen guy rhapsodic.org Henriette's Herbal Blog
geek ultramookie

Powered by WordPress
Hosted on Dreamhost.