Software USB On The ESP8266

A while back, [cnlohr] needed a USB keyboard and mouse. His box ‘o junk didn’t hold this particular treasure, and instead of hopping on Amazon like a normal geek or venturing into the outside realm on a mid-level ‘store’ quest like a normal person, [cnlohr] decided to turn an ESP8266 into a USB keyboard and mouse. How hard could it be? The ESP doesn’t support USB, but bitbanging hasn’t stopped him before. The end result is a USB stack running on the ESP8266 WiFI module.

[cnlohr] has been working for about a month on this USB implementation for the ESP, beginning with a logic analyzer, Wireshark, Xtensa assembly, and a lot of iteration. The end result of this hardware hacking is a board based on the ESP8285 – an 8286 with integrated Flash – that fits snugly inside a USB socket.

This tiny board emulates low-speed USB (1.5 Mbps), and isn’t really fast enough for storage, serial, or any of the fancier things USB does, but it is good enough for a keyboard and mouse. Right now, [cnlohr]’s ESP USB device is hosting a webpage, and by loading this webpage on his phone, he has a virtual keyboard and mouse on a handheld touchscreen.

If you’re keeping track, [cnlohr] has now brought Ethernet and USB to a tiny microcontroller that can be bought for a few bucks through the usual online outlets. If you’d like to build your own ESP USB stick, all the files are over on the Gits.

Thanks [lageos] for the tip.

Continue reading “Software USB On The ESP8266”

Interesting Switch Autopsy

We put a lot of trust into some amazingly cheap components, sometimes that trust is very undeserved. Long gone are the days when every electronic component was a beautifully constructed precision lab instrument.  As [Rupert Hirst] shows, this can be a hard lesson to learn for even the biggest companies.

[Rupert]’s Nexus 5 was suffering from a well known reboot issue. He traced it to the phone’s power switch. It was always shorting to ground, even though it clicked like it was supposed to.

He desoldered the switch and pried the delicate sheet metal casing apart. Inside were four components. A soft membrane with a hard nub on the bottom, presumably engineered to give the switch that quality feeling. Next were two metal buckles that produced the click and made contact with the circuit board, which is the final component.

He noticed something odd and  busted out his USB microscope. The company had placed a blob of solder on the bottom buckle. We think this is because steel on copper contact would lead to premature failure of the substrate, especially with the high impact involved during each switching event.

The fault lay in the imprecise placement of the solder blob. If it had been perfectly in the middle, and likely many phones that never showed the issue had it there, the issue would have never shown up. Since it was off-center, the impact of each switching event slowly deposited thin layers of solder onto the copper and fiberglass. Finally it built up enough to completely short the switch.

Interestingly, this exact problem shows up across different phone manufacturers, somewhere there’s a switch company with a killer sales team out there.

Tour De Force Battery Hacking

Lithium-Ion batteries are finicky little beasts. They can’t be overcharged, overdischarged, overheated, or even looked at funny without bursting into flames. Inside any laptop battery pack, a battery charge controller keeps watch over all the little cells, and prevents them from getting damaged.

Of course, any “smart” device will sometimes make the wrong choices, and then it’s up to us to dig inside its brains and fix it. When [Viktor] got a perfectly good battery pack with a controller that refused to charge the batteries, he started off on what would become an epic journey into battery controllers, and the result is not just a fixed battery, but a controller-reprogramming tool, software, and three reversed controller chips so far.

devbBattery controller chips speak SMBus, and [Viktor] started out by building a USB-SMBus tool. It’s a clever use of a cheap eBay development board for a Cypress CY7C68013A USB microcontroller. Flashed with [Viktor]’s firmware and running his software on the host computer, a SMBus scan is child’s play.

The rest of the story is good old-fashioned hacking: looking for datasheets, reading industry powerpoints, taking wild guesses, googling for passwords, and toggling the no-connect pins while booting the controllers up. We’re not going to argue with results: the bq8030, R2J240, and M37512 controllers have all given up their secrets, and tools to program them have been integrated into [Viktor]’s SMBusb tool.

In short, this is one of the nicest hard-core hacks we’ve seen in a while. Kudos [Viktor]! And thanks for the SMBus tool.

Hackaday Prize Entry: BunnyBot Helps Out All On Its Own

[Jack Qiao] wanted an autonomous robot that could be handy around an ever-changing shop. He didn’t want a robot he’d have to baby sit. If he said, ‘bring me the 100 ohm resistors’, it would go find and bring them to him.

He iterated a bit, and ended up building quite a nice robot platform for under a thousand dollars. It’s got a realsense camera and a rangefinder from a Neato robotic vacuum. In addition to a mircrophone, it has a whole suite of additional sensors in its base, which is a stripped down robotic vacuum from a Korean manufacturer. A few more components come together to give it an arm and a gripper.

The thinking is done on a  Nvidia Jetson TK1 board. The cores on the integrated graphics card are used to perform faster computer vision calculations. The software is all ROS based.

As can be seen in the video after the break. The robot uses SLAM techniques to successfully navigate and complete tasks such as fetch resistors, get water, and more. [Jack Qiao] is happy with his robot, and we would be too.

Continue reading “Hackaday Prize Entry: BunnyBot Helps Out All On Its Own”

10,000 Lumen Sunrise Lamp Curses The Darkness

Some of us need a bit of help to get up in the mornings. This can come in the form of a sunrise lamp, which simulates the light of the sunrise to fool our poor sleep-deprived brains into waking up in the depths of winter. [Lincoln Johnson] found the ones he tried were not bright enough to wake him, so he decided to build his own: a 10,000-lumen monster that can wake him up from across the room.

It uses a lot of LEDS: 5 meters of 5630 LED strip, which pulls a circuit bending 72 watts when running at full blast. This monstrosity is powered by an Arduino Pro, which is programmed to slowly increase the brightness over a period of 30 minutes, thus simulating the sunrise. It uses PWM control to fade the LEDs, and also includes a dot matrix display to show the time. Honestly, if you are able to sleep through this thing blasting your eyes, you are probably dead.

Make Your Own Simple VHF Tuning Capacitor

If you enjoy building radio projects you may have noticed something slightly worrying over the last few years in your component supply. Variable capacitors are no longer as plentiful as they used to be. There was a time when all radio receivers contained at least one, now with the advent of the varicap diode and the frequency synthesiser the traditional tuning capacitor is a rare breed. They are still made, but they’re not cheap and they won’t appear so readily in your junk box any more.

Fortunately a variable capacitor is a surprisingly simple device, and one you can make yourself if you are of a mind to do so. [Patrick] did just that with his home-made capacitor, in this case of a few tens of pF and suitable as a low-power trimmer capacitor or in a single-chip FM radio.

Rather than make a set of interlocking vanes as you’d find in a commercial design, he has gone for a screw in a tube. The capacitance is set by the length by which the screw is inserted into the tube. And his tube is not a tube in the traditional sense, instead he has used a coil of enamelled copper wire wound on the screw thread, whose insulation forms the dielectric. It looks wrong to use a coil in this way as you’d expect a similar coil to form the inductive part of a tuned circuit, but this coil is shorted out to prevent its inductance becoming a factor at the frequency in question.

It’s evidently not the answer to all variable capacitor problems, but it’s a neat piece of lateral thinking and it will make a simple working capacitor from readily available parts.

We’ve featured a couple of more traditional style home-made variable capacitors in the past on these pages, one made from thin aluminium sheet cut with scissors, and another one designed for use in higher power transmitters.

Thanks [PeterF] for the tip.

Five-Stage Coilgun Powered By An Arc Welder!

Coilguns used to be the weapons of science fiction. Nowadays, whenever we see someone build one in their workspace it always serves as an inspiring reminder that the future is now. YouTuber [Cody’sLab] has done just that, assembling a rudimentary — but beefy — coilgun in his workshop.

The one in the video is based off an old design that used a 12V battery and without any fancy electronics. This new model has five coil stages along its two-foot length. Four wooden dowels and two copper tubes are arranged in a hexagonal shape to form the barrel and accelerator rails. The coils are each 100 feet of 14-gauge thin coated copper wire, all connected to a common ground. Still lacking any complex electronics, this version eventually gets its projectile launched a good few dozen feet. The ‘bullet’ is a piece of  steel with some brass to prevent it spinning in the barrel, while a hole has been drilled in it to accommodate a spring which keeps the two graphite brushes contacting the copper tubes.

The first test proved to be a little underwhelming, and [Cody] had to try something drastic — so he hooked it up to an arc welder to fire the projectile using 22V and 200A.

Continue reading “Five-Stage Coilgun Powered By An Arc Welder!”