The first time I was in school for electrical engineering (long story), I had a professor who had never worked in the industry. I was in her class and the topic of the day was measuring AC waveforms. We got to see some sine waves centered on zero volts and were taught that the peak voltage was the magnitude of the voltage above zero. The peak to peak was the voltage from–surprise–the top peak to the bottom peak, which was double the peak voltage. Then there was root-mean-square (RMS) voltage. For those nice sine waves, you took the peak voltage and divided by the square root of two, 1.414 or so.
You know that kid in the front of the class? They were in your class, too. Always raising their hand with some question. That kid raised his hand and asked the simple question: why do we care about RMS voltage? I was stunned when I heard the professor answer, “I think it is because it is so easy to divide by the square root of two.”
The video in question was of [The 8-bit Guy] doing a small restoration of a 1984 Radio Shack Armatron toy. Expecting a mess of wiring we were absolutely surprised to discover that the internals of the arm were all mechanical with only a single electric motor. Perhaps the motors were more expensive back then?
The arm is driven by a Sarlacc Pit of planetary gears. These in turn are driven by a clever synchronized transmission. It’s very, very cool. We, admittedly, fell down the google rabbit hole. There are some great pictures of the internals here. Whoever designed this was very clever.
The robot arm can do full 360 rotations at every joint that supports it without slip rings. The copper shafts were also interesting. It’s a sort of history lesson on the prices of metal and components at the time.
Regardless, the single motor drive was what attracted [crabfu], ten entire years ago, to attach a steam engine to the device. A quick cut through the side of the case, a tiny chain drive, and a Jensen steam engine was all it took to get the toy converted over. Potato quality video after the break.
It’s not just an LED-blinker, though. He added in a light-detection function so that it only switches on at night. It uses the Forest Mims trick of reverse-biasing the LED and waiting for it to discharge its internal capacitance. The point is, however, that it gives the chip something to do instead of simply sleeping.
Although he’s an AVR user by habit, [Thierry] finds in favor of the PIC because it’s got a lower power draw both when idling and when awake and doing some computation. This is largely because the PIC has an onboard low-power oscillator that lets it limp along at 32 kHz, but also because the chip has a lower power consumption in general. In the end, it’s probably a 10% advantage to the PIC on power.
If you’re competent with one of the two chips, but not the other, his two versions of the same code would be a great way to start familiarizing yourself with the other. We really like his isDarkerThan() function which makes extensive use of sleep modes on both chips during the LED’s discharge period. And honestly, at this level the code for the two is more similar than different.
(Oh, and did you notice [Thierry]’s use of a paper clip as a coin-cell holder? It’s a hack!)
Surprisingly, we’ve managed to avoid taking a stray bullet from the crossfire that occasionally breaks out between the PIC and AVR fans. We have covered a “shootout” before, and PIC won that round too, although it was similarly close. Will the Microchip purchase of Atmel calm the flames? Let’s find out in the comment section. We have our popcorn ready!
Here’s a neat hack for making a magnetic charging mount for a cell phone. We know what you’re thinking, but this is definitely not a traditional contactless charging system. Those use magnets but in a different way. This hack involves putting a couple of magnets onto the case of the cell phone, and a couple more on a charging base. You then wire these magnets into the power inputs of the USB port, and a USB cable onto the base, so putting the phone on the base magnets completes the circuit. The magnets themselves become the charging contacts.
It’s a neat idea, but makes us wonder what this will do to the compass sensor in your phone or your credit cards if they are nearby. With these caveats, it is a neat hack, and could be easily adapted. Want to make a vertical cell phone mount, or a way to attach (and charge) your cell phone to the fridge? This can be easily adapted for that.
In this installment of Minimal MQTT, I’m going to cover two loose ends: one on the sensor node side, and one on the MQTT server side. Specifically, I’ll tackle the NodeMCU’s sleep mode to reduce power and step you through bridging MQTT servers to get your data securely out of your home server and into “the cloud”, which is really just other people’s servers.
If you’re just stepping into this series now, you should really check out the other three posts, where I set up a server, then build up some sensor nodes, and then flesh-out a few ways to control everything from your phone or the web. That’s the coolest material, anyway. This last installment just refines what we’ve built on. Let’s go!
More and more, the power grid is distributed. Houses have solar panels on their roofs, and where possible, that excess power is sold back to the grid. The current trend is towards smart meters that record consumption for an entire household and relay it back to the power plant every day or so. The future is decentralized, through, and a meter that is smart once a day simply won’t do. A team on Hackaday.io has put together the ultimate in decentralized energy modernization. It’s the InternetS of Energy, and it removes the need for power companies completely.
The team has identified a few key features of the current power grid that don’t make sense in the age of the Internet. The power company doesn’t have extremely granular data, and sending power over long distances is either inefficient or expensive. The solution for this is to have distributed power plants, all connected together into a truly intelligent power grid.
This InternetS of Energy uses open-source energy monitoring systems running the Ethereum client to push power-usage data onto the blockchain. This makes the grid secure and pseudonymous, and if the banking industry is any indication, something like this is the future of economic transactions.
While it may not be the best solution for mature power grids, it is an extremely interesting avenue of research for developing nations. Wherever local resources allow it, electricity can be generated and sent to where it’s needed. It’s exactly what the power grid would be if it were re-designed today from scratch, and an excellent candidate for the 2016 Hackaday Prize.
[glitch] had a cheap EPROM eraser with very few features. Actually, that might be giving it too much credit: it’s barely more than a UV light that turns on when it’s plugged in and turns off when it’s plugged out unplugged. Of course it would be nice to implement some safety features, so he decided he’d hook it up to a software-controlled power outlet.
Of course, controlling a relay that’s wired to mains is old hat around here, and in fact, we’ve covered [glitch]’s optoisolated mains switch already. He’s gone a little beyond the normal mains relay project with this one, though. Rather than use a microcontroller to run the relay, [glitch] wrote a simple Ruby script on his computer to turn the EPROM eraser on for the precise amount of time that is required to erase the memory.The Ruby script drives the relay control directly over a USB to serial adapter’s RTS handshake pin.
[glitch]’s hack reminds us that if you just need a quick couple bits of slow output, a USB-serial converter might be just the ticket. You could imagine driving everything from standard lamps to your 3D printer’s bed heater (provided you use similar hardware), but it’s especially helpful for [glitch] who claims to forget to turn off the eraser when it’s done its job, which leaves a potentially dangerous UV source just lying about. It’s always a good idea to add safety features to a dangerous piece of equipment!