Repairing A Macbook Charger… With A Pistachio Nut

Laptop chargers face a hard life. They’re repeatedly plugged and unplugged, coiled up, stuffed into bags, thrown around, and just generally treated fairly poorly. Combine this with fairly lightweight design and it’s not uncommon for a laptop charger to fail after a few years. It’s usually the connector that goes first. Such was the case when I found myself face to face with a failed Macbook charger, and figured it’d be a simple fix. Alas, I was wrong.

Unlike most PC manufacturers, who rely on the humble barrel jack and its readily available variants, Apple liked to use the Magsafe connector on its Macbook line. This connector has many benefits, such as quick release in the event someone trips over the cable, and the fact that it can be plugged in without regard to orientation. However, it’s not the easiest to fix. When the charger began failing, I noticed two symptoms. The first was that the charger would only function if the cable was held just so, in exactly the right orientation. The other, was that even when it would charge, the connector would become very hot. This led me to suspect an intermittent connection was the culprit, and it was quite a poor one at that; the high resistance leading to the heat issue.

It’s at this point with any other charger that you get out your trusty sidecutters, lop the end off, and tap away at Digikey to get a replacement part on the way. With Magsafe? No dice. Replacement parts simply aren’t available — a common problem with proprietary connectors. I endeavoured to fix the problem anyway. I began to strip away the metal shell around the back of the connector with my sidecutters, and eventually an angle grinder. A Dremel would have been the perfect tool for the job, actually, but I persevered regardless. After much consternation, I had the connector peeled back and was able to identify the problem.

Continue reading “Repairing A Macbook Charger… With A Pistachio Nut”

Making Solar Cells

We will admit that it is unlikely you have enough gear in your basement to make a solar cell using these steps. However, it is interesting to see how a bare silicon wafer becomes a solar cell. If you’ve seen ICs going through fabrication, you’ll see a lot of similarities, but there are some differences.

The process calls for a silicon wafer, some ovens, spin coaters, photolithography equipment, and a dice saw, among other things. Oh, you probably also need a clean room. Maybe you should just buy your solar cells off the shelf, but it is still interesting to see how they are made.

Modern solar cells have some extra structures to improve their efficiency, but the cells in this video are pretty garden-variety. For example, some experimental cells use multiple layers of active devices, each tuned to absorb a different wavelength of light.

If you really want to make your own, there’s another process where you can start with some copper and wind up with a kind of solar cell that uses a copper-based semiconductor material. But don’t be fooled into thinking that making the silicon variety is totally out of reach to hackers, we’ve seen [Sam Zeloof] pull it off.

Continue reading “Making Solar Cells”

Two Factor Authentication With The ESP8266

Google Authenticator is a particularly popular smartphone application that can be used as a token for many two factor authentication (2FA) systems by generating a time-based one time password (referred to as TOTP). With Google Authenticator, the combination of your user name and password along with the single-use code generated by the application allows you to securely authenticate yourself in a way that would be difficult for an attacker to replicate.

That sounds great, but what if you don’t have a smartphone? That’s the situation that [Lady Ada] recently found herself in, and rather than going the easy route and buying a hardware 2FA token that’s compatible with Google Authenticator, she decided to build one herself based on the ESP8266. With the hardware and source documented on her site, the makings of an open source Google Authenticator hardware token are available for anyone who’s interested.

Generated codes can also be viewed via serial.

For the hardware, all you need is the ESP8266 and a display. Naturally [Lady Ada] uses her own particular spin on both devices which you can purchase if you want to create an identical device, but the concept will work the same on the generic hardware you’ve probably already got in the parts bin. Software wise, the code is written in CircuitPython, a derivative of MicroPython, which aims to make microcontroller development easier. If you haven’t tried MicroPython before, grab an ESP and give this a roll.

Conceptually, TOTP is relatively simple. You just need to know what time it is, and run an SHA1 hash. The time part is simple enough, as the ESP8266 can connect to the network and get the current time from NTP. The calculation of the TOTP is handled by the Python code once you’ve provided it with the “secret” pulled from the Google Authenticator application. It’s worth noting here that this means your 2FA secrets will be held in clear-text on the ESP8266’s flash, so try not to use this to secure any nuclear launch systems or anything, OK? Then again, if you ever lose it the beauty of 2-factor is you can invalidate the secret and generate a new one.

We’ve covered the ins and outs of 2FA applications before here at Hackaday if you’d like to know more about the concept, in addition to previous efforts to develop a hardware token for Google Authenticator.