How To Mash Up BLE, NodeJS, And MQTT To Get Internet Of Things

We’re living in the world of connected devices. It has never been easier to roll your own and implement the functionality you actually want, rather than live with the lowest common denominator that the manufacture chose.

In a previous article I walked though a small python script to talk to a BLE light and used it to cycle through some colors. Now I want to delve deeper into the world of Internet Connected BLE devices and how to set up a simple Internet-Of-Things light. With this example in hand the sky’s the limit on what you can build and what it will be able to do.

Join me after the break as I demonstrate how to use NodeJS to bridge the digital world with the physical world.

Continue reading “How To Mash Up BLE, NodeJS, And MQTT To Get Internet Of Things”

Power Over Ethernet Splitter Improves Negotiating Skills

Implementing PoE is made interesting by the fact that not every Ethernet device wants power; if you start dumping power onto any device that’s connected, you’re going to break things. The IEEE 802.3af standard states that the device which can source power should detect the presence of the device receiving power, before negotiating the power level. Only once this process is complete can the power sourcing device give its full supply. Of course, this requires the burden of smarts, meaning that there are many cheap devices available which simply send power regardless of what’s plugged in (passive PoE).

[Jason Gin] has taken an old, cheap passive PoE splitter and upgraded it to be 802.3af compatible (an active device). The splitter was designed to be paired with a passive injector and therefore did not work with Jason’s active 802.3at infrastructure.

The brain of the upgrade is a TI TPS2378 Powered Device controller, which does the power negotiation. It sits on one of two new boards, with a rudimentary heatsink provided by some solar cell tab wire. The second board comprises the power interface, and consists of dual Schottky bridges as well a 58-volt TVS diode to deal with any voltage spikes due to cable inductance. The Ethernet transformer shown in the diagram above was salvaged from a dead Macbook and, after some enamel scraping and fiddly soldering, it was fit for purpose. For a deeper dive on Ethernet transformers and their hacked capabilities, [Jenny List] wrote a piece specifically focusing on Raspberry Pi hardware.

[Jason]’s modifications were able to fit in the original box, and the device successfully integrated with his 802.3at setup. We love [Jason]’s work and have previously written about his eMMC adventures, repairing windows tablets and explaining the intricacies of SD card interfacing.

Two Bit Circus Took The Tech We Love And Built An Amusement Park

Carnival games are simple to pick up, designed to provide a little bit of entertainment in exchange for your game ticket. Given that the main point is just to have some silly fun with your friends, most game vendors have little reason to innovate. But we are people who play with microcontrollers and gratuitous LEDs. We look at these games and imagine bringing them into the 21st century. Well, there’s good news: the people of Two Bit Circus have been working along these lines, and they’re getting ready to invite the whole world to come and play with them.

“Interactive Entertainment” is how Two Bit Circus describe what they do, by employing the kinds of technology that frequent pages of Hackaday. But while we love hacks for their own sake here, Two Bit Circus applies them to amuse and engage everyone regardless of their technical knowledge. For the past few years they’ve been building on behalf of others for events like trade shows and private parties. Then they worked to put together their own event, a STEAM Carnival to spread love of technology, art, and fun. The problem? They are only temporary and for a limited audience, hence the desire for a permanent facility open to the public. Your Hackaday scribe had the opportunity to take a peek as they were putting on the finishing touches.

Continue reading “Two Bit Circus Took The Tech We Love And Built An Amusement Park”

Fail Of The Week: Solid State Relay Fails Spectacularly

A lot of times these days, it seems like we hackers are a little like kids in a candy store. With so many cool devices available for pennies at the click of a mouse, it’s temptingly easy to order first and ask questions about quality later. Most of the time that works out just fine, with the main risk of sourcing a dodgy component being a ruined afternoon of hacking when a part fails.

The stakes are much higher when you’re connecting your project to the house mains, though, as [Mattias Wandel] recently learned when the solid-state relay controlling his water heater failed, with nearly tragic results. With aplomb that defies the fact that he just discovered that he nearly burned his house down, [Mattias] tours the scene of the crime and delivers a postmortem of the victim, a Fotek SSR-25DA. It appears that he mounted it well and gave it a decent heatsink, but the thing immolated itself just the same. The only remnant of the relay’s PCB left intact was the triac mounted to the rear plate. [Mattias] suspects the PCB traces heated up when he returned from vacation and the water heater it was controlling came on; with a tank full of cold water, both elements were needed and enough current was drawn to melt the solder build-up on the high-voltage traces. With the solder gone, the traces cooked off, and the rest is history. It’s a scary scenario that’s worth looking at if you’ve got any SSRs controlling loads anywhere near their rated limit.

The morals of the story: buy quality components and test them if possible; when in doubt, derate; and make sure a flaming component can’t light anything else on fire. And you’ll want to review the basics of fire protection while you’re at it.

Continue reading “Fail Of The Week: Solid State Relay Fails Spectacularly”

A Peek At The Mesmerizing Action Of A Cycloidal Drive

Cycloidal drives are fascinating pieces of hardware, and we’ve seen them showing up in part due to their suitability for 3D printing. The open source robot arm makers [Haddington Dynamics] are among those playing with a cycloidal drive concept, and tucked away in their August 2018 newsletter was a link they shared to a short but mesmerizing video of a prototype, which we’ve embedded below.

A 10:1 Cycloidal Drive [Source: Wikipedia, image public domain]
A cycloidal drive has some similarities to both planetary gearing and strain-wave gears. In the image shown, the green shaft is the input and its rotation causes an eccentric motion in the yellow cycloidal disk. The cycloidal disk is geared to a stationary outer ring, represented in the animation by the outer ring of grey segments. Its motion is transferred to the purple output shaft via rollers or pins that interface to the holes in the disk. Like planetary gearing, the output shaft rotates in the opposite direction to the input shaft. Because the individual parts are well-suited to 3D printing, this opens the door to easily prototyping custom designs and gearing ratios.

[Haddington Dynamics] are the folks responsible for the open source robot arm Dexter (which will be competing in the Hackaday Prize finals this year), and their interest in a cycloidal drive design sounds extremely forward-thinking. Their prototype consists of 3D printed parts plus some added hardware, but the real magic is in the manufacturing concept of the design. The idea is for the whole assembly to be 3D printed, stopping the printer at five different times to insert hardware. With a robot working in tandem with the printer, coordinating the print pauses with automated insertion of the appropriate hardware, the result will be a finished transmission unit right off the print bed. It’s a lofty goal, and really interesting advancement for small-scale fabrication.

Continue reading “A Peek At The Mesmerizing Action Of A Cycloidal Drive”

MIDI Association Releases Spec For TRS Jacks

The MIDI spec was released in 1983, and for more than thirty years every synthesizer, drum machine, and piece of computer hardware with MIDI has sported an enormous DIN-5 jack on the back. Why did they choose such a large connector? Well, MiniDIN connectors hadn’t even been invented yet, and today even MiniDIN connectors are rarely-seen, obsolete connectors.

In the last decade, MIDI has found its way into some very small machines. Those Pocket Operators have MIDI sync, you can control a Game Boy with MIDI using the right hardware, and the cute little Korg synths also have MIDI tucked away in there somewhere. You can’t put a DIN-5 jack on those things, leading to some weird implementations of MIDI over non-standard connectors.

Now the MIDI Association has weighed in on the situation. There’s now a spec for MIDI over 2.5mm and 3.5mm TRS jacks. In just a few short decades, you’ll be able to connect MIDI gear with an audio aux cable.

Although there are five connectors in a DIN-5 jack, most implementations use only two connectors to send and receive data. Synth manufacturers have capitalized on this fact and cheap TRS connectors to build their own implementation of MIDI using smaller connectors, sometimes with incompatable pinouts.

Now, though, there’s a standard. For TRS connectors, the tip is pin 5 on the DIN-5, the ring is pin 4, and the sleeve is pin 2. It sends and receives data to synths and drum machines from 1983, and it doesn’t use gigantic connectors.

The only caveats to the new MIDI standard is that 2.5mm TRS connectors are recommended, and that protection circuitry is strongly recommended in the case a headphone driver is inevitably connected to a MIDI device. Other than that, everything’s coming up roses, and this opens up the door to MIDI jacks that are much, much easier to source.

Retro-uC, Your Favorite Instruction Sets On Custom Silicon

A few months ago, we caught wind of an interesting project in Big-O Open silicon. It’s a chip, loaded up with the great CPU cores of yore. Now, it’s finally a project on Crowd Supply. The Retro-uC project is an Open Source microcontroller for the retro geek, with a Zilog Z80, MOS 6502, and Motorola 68000 buried in the epoxy of a single QFP package. Oh yes, custom silicon and retro goodness, what more could you want?

The Retro-uC project is part of the Chips4Makers project to develop an Open Source chip for the community. Of course, this has been done before with projects like the HiFive1 and other RISC-V implementations, but really — this is a Z80, 6502 and 68k on a single chip. Let’s not bury the lede here.

As far as the architecture and implementation of these cores go, the ‘active’ core is externally selected on reset, or can be changed through the JTAG interface. There are 72 GPIO pins that can handle 5V, with each pin mapped to the address space of the cores. So far, so good. We can make this work for some really cool stuff.

The JTAG interface is used for testing and programming, although programs can be stored on an external I2C Flash chip and booted from there. There is 4kB of on-chip RAM, and while the peripheral configuration is still being determined, there will at least be UART, I2C, and PWM peripherals. How many of each is anyone’s guess.

The Retro-uC is now a Crowd Supply project, with rewards/orders/whatever ranging from a bare Retro-uC chip for $42 USD to an Arduino Mega-ish development platform for $89, a breadboard version of the chip for $59, and a chip mounted to a Perf2+ prototyping board for $65.

While this chip hasn’t even gotten to tape-out, all the cores work on an FPGA, and there is precedent for doing Open Source, crowdfunded silicon. We’re looking at this one closely and are excited to see what everyone is going to make.

This project has been a long time in the making, with the project lead giving a talk at FOSDEM earlier this year. Now it’s finally time for the hard part of any silicon project — getting the money — and we’re looking forward to see what comes of it.