Adding MQTT To A Solar Powered PIR Light

The size and price of the ESP wifi modules have quickly made them into one of the preferred building blocks for IoT devices. Unfortunately they are not particularly well suited for very low power applications.  [LittlePetieWheat] wanted to add MQTT to a cheap PIR solar light, so he paired an ESP with an Attiny85 to hold it to a strict power budget.

Most of these lights contain some sort of no-name microcontroller that monitors the analog PIR sensor, and turns on the LEDs as required. [LittlePetieWheat] replaced the PIR sensor with one that gives a digital output for simpler interfacing. The Attiny serves as the low power brains of the project. Its tasks include reading the solar panel and battery voltages, and PIR output. When movement is detected by the sensor, it activates a clever little latching power circuit to power on the ESP01 just long enough to send a MQTT message. The LEDs are only turned on if there is no power coming from the solar panel. The solar power is stored in a 18650 battery.

The Attiny85 might not be a powerhouse, but it is perfect for simple, low power applications like this. We’ve also seen it pushed to its limits by running tiny machine learning models, or receiving software updates over I2C. Continue reading “Adding MQTT To A Solar Powered PIR Light”

Into The Belly Of The Beast With Placemon

No, no, at first we thought it was a Pokemon too, but Placemon monitors your place, your home, your domicile. Instead of a purpose-built device, like a CO detector or a burglar alarm, this is a generalized monitor that streams data to a central processor where machine learning algorithms notify you if something is awry. In a way, it is like a guard dog who texts you if your place is unusually cold, on fire, unlawfully occupied, or underwater.

[anfractuosity] is trying to make a hacker-friendly version based on inspiration from a scientific paper about general-purpose sensing, which will have less expensive components but will lose accuracy. For example, the article suggests thermopile arrays, like low-resolution heat-vision, but Placemon will have a thermometer, which seems like a prudent starting place.

The PCB is ready to start collecting sound, temperature, humidity, barometric pressure, illumination, and passive IR then report that telemetry via an onboard ESP32 using Wifi. A box utilizing Tensorflow receives the data from any number of locations and is training to recognize a few everyday household events’ sensor signatures. Training starts with events that are easy to repeat, like kitchen sounds and appliance operations. From there, [anfractuosity] hopes that he will be versed enough to teach it new sounds, so if a pet gets added to the mix, it doesn’t assume there is an avalanche every time Fluffy needs to go to the bathroom.

We have another outstanding example of sensing household events without directly interfacing with an appliance, and bringing a sensor suite to your car might be up your alley.

The Swiss Army Knife Of Bench Tools

[splat238] had a ton of spare sensors laying around that he had either bought for a separate project or on an impulse buy, so he knew he had to do something with them. He decided to build his own digital multi-tool focusing on sensors that would be particularly useful in a workshop setting. Coincidentally, he was inspired by a previous hack that we covered a while back.

He’s equipped his device with a bubble level, tachometer, IR thermometer, protractor, laser pointer, and many, many more features that would make great additions to any hacker’s workspace. There’s a good summary of each sensor, making his Instructable somewhat of a quick guide to common sensing modalities for hardware designers. The tachometer, thermometer, laser pointer, and a few other capabilities are notable upgrades from the project we highlighted previously. We also appreciate the bigger display, allowing for more detailed user feedback particularly in using the compass and bullseye digital level among other features.

The number of components in [splat238’s] build is too extensive to detail one-by-one in this article, so please see his Instructable linked above for all the details. [splat238] made his own PCB for mounting each sensor and did a good job making the design modular so you wouldn’t need to add certain components if you don’t need them. Most of the components take some through-hole soldering with only a handful of 0805 resistors required otherwise. The housing was designed such that the user can handle the tool with one hand and can switch between each function with a push of a button.

Finally, the device is powered using a rechargeable lithium-polymer battery making it very reusable. And, if there weren’t enough features already, the battery can be charged via USB or through two solar panels mounted into the housing unit. Okay, solar charging might be a case of featuritis, but still a cool build either way.

Check out some other handy DIY tools on Hackaday.

Continue reading “The Swiss Army Knife Of Bench Tools”

Fail Of The Week: How Not To Do IoT Security

There are a lot of bad days at work. Often it’s the last day, especially when it’s unexpected. For the particularly unlucky, the first day on a new job could be a bad day. But the day you find an unknown wireless device attached to the underside of your desk has to rank up there as a bad day, or at least one that raises a lot of serious questions.

As alarming as finding such a device would be, and for as poor as the chain of decisions leading these devices being attached to the workstations of the employees at a mercifully unnamed company, that’s not the story that [Erich Styger] seeks to tell. Rather, this is a lesson in teardown skills – for few among us would not channel the anger of finding something like this is into a constructively destructive teardown – and an investigation into the complete lack of security consideration most IoT devices seem to be fielded with these days.

Most of us would recognize the device as some kind of connected occupancy sensor; the PIR lens being the dead giveaway there. Its location under a single person’s desk makes it pretty clear who’s being monitored.

The teardown revealed that the guts of the sensor included a LoRa module, microcontroller, a humidity/temperature sensor, and oddly for a device apparently designed to stick in one place with magnets, an accelerometer. Gaining access to the inner workings was easy through the UART on the microcontroller, and through the debug connectors and JTAG header on the PCB. Everything was laid out for all to see – no firmware protection, API keys in plain text, and trivially easy to reflash. The potential for low-effort malfeasance by a compromised device designed to live under a desk boggles the mind.

The whole article is worth a read, if only as a lesson in how not to do security on IoT devices. We know that IoT security is hard, but that doesn’t make it optional if you’re deploying out in the big wide world. And there’s probably a lot to learn about properly handling an enterprise rollout too. Spoiler alert: not like this.

Dummy Security Camera Is Smarter Than It Looks

The idea behind a dummy security camera is that people who are up to no good might think twice about doing anything to your property when they think they’re being recorded. Obviously a real security camera would be even better, but sometimes that’s just not economically or logistically possible. Admittedly they’re not always very convincing, but for a few bucks, hopefully it’s enough to make the bad guys think twice.

But what if that “fake” camera could do a little more than just look pretty up on the wall? [Chris Chimienti] thought he could improve the idea by adding some electronics that would notify him if motion was detected. As an added bonus, any would-be criminals who might be emboldened by the realization the camera itself is fake might find themselves in for a rude surprise when the notifications start firing off.

In the video after the break, [Chris] really takes his time walking the viewer through the disassembly of the dummy camera. As it turns out, these things look like they’d make excellent project enclosures; they come apart easily, have nothing but empty space inside, and even have an integrated battery compartment. That alone could be a useful tip to file away for the future.

He then goes on to explain how he added some smarts to this dummy camera. Up where the original “lens” was, he installed a PIR sensor, some white LEDs, a light sensor, and the original blinking red LED. All of this was mounted to a very slick 3D printed plate which integrates into the camera’s body perfectly. The new hardware is connected up to a similarly well mounted Wemos D1 Mini inside the camera. The rest of the video goes through every aspect of the software setup, which is sure to be of interest to anyone who’s ever thought of rolling their own IoT device.

This type of PIR sensor is hacker favorite, and we’ve seen a number of projects using them for all sorts of creative purposes. We’ve even seen them paired with the ESP8266 before for Internet-connected motion sensing, albeit without the tidy security camera enclosure.

Continue reading “Dummy Security Camera Is Smarter Than It Looks”

In This Aussie’s Back Yard, No Cat Is Safe From An Automated Soaking!

Some of us here at Hackaday are cat lovers, but we also understand that a plethora of unwanted cats using a suburban back garden can be bothersome, and a few years ago we featured a project from Aussie YouTuber [Craig Turner], in which he created a motion-detecting water spray for use as a relatively harmless cat repellent. Now he’s back with an updated version which is a little slicker and easier to make.

At its heart is the same PIR-turns-on-water operation, but this time there is a solenoid valve and purpose-built nozzle instead of a car central locking actuator and a lawn sprayer. Doing the electronic work is an off-the-shelf PIR module, so there is no  longer any need to hack a security PIR detector. Add in some pipe sections and PTFE tape with a bit of hot glue, and the result is a far more professional and streamlined device. The video gives a full run-down on construction, though we notice he neglected to emphasise the polarity of his protection diode so keep an eye out if you follow his example.

So if the thought of a continuous supply of free feline company courtesy of your neighbours is not for you then now you are equipped to send them packing. The latest video incarnation of the project is below the break, but if you are in search of the original then you can go back to our coverage at the time.

Continue reading “In This Aussie’s Back Yard, No Cat Is Safe From An Automated Soaking!”

Super Simple Sensor Makes DSLR Camera Motion Sensitive

Do you have a need to photographically document the doings of warm-blooded animals? If so, a game camera from the nearest hunting supplier is probably your best bet. But if you don’t need the value-added features such as a weather-resistant housing that can be chained to a tree, this DIY motion trigger for a DSLR is a quick and easy build, and probably loads more fun.

The BOM on [Jeremy S Cook]’s build is extremely short – just a PIR sensor and an optoisolator, with a battery, a plug for the camera’s remote jack, and a 3D-printed bracket. The PIR sensor is housed in a shroud to limit its wide field of view; [Jeremy] added a second shroud when an even narrower field is needed. No microcontroller is needed because all it does is trigger the camera when motion is sensed, but one could be added to support more complicated use cases, like an intervalometer or constraining the motion sensing to certain times of the day. The video below shows the build and some quick tests.

Speaking of intervalometers, we’ve seen quite a few of those over the years. From the tiny to the tinier to the electromechanical, people seem to have a thing for taking snapshots at regular intervals.

Continue reading “Super Simple Sensor Makes DSLR Camera Motion Sensitive”