An Arduino Library For The PS4

PS4 Controller

Looking to interface your Arduino with the PS4 controller? [Kristian] has updated his USB host library with support for the controller. The library makes it easy to read most of the inputs from the controller. Currently the buttons and joysticks work, and support for the light sensor, rumble, and touchpad is on the way.

To get this working, you will need the USB Host Shield for the Arduino and a Bluetooth dongle. Once you have the hardware setup, you can use the library to pair with the controller. When connected, simple function calls will let you read the state of the device.

While this does require some additional hardware to connect, all of the code is open source. If you’re looking to experiment with the PS4 controller yourself, [Kristian]’s work could be a helpful starting point. Of course, all of the source is available on Github, and the example sketch shows how easy it is to roll the PS4 controller into your own Arduino project.

Software Half Duplex UART For AVRs

If you have worked with very low cost microcontroller in the past, such as the ATtiny series from AVR, you’ve probably been stuck without a UART peripheral. The usual answer to this problem is to implement the UART in software. It’s not fast, but it works.

Lets say you’re even more limited on resources, and only have a single pin for UART. [Ralph] created a software library and a small circuit that enables half duplex UART using only one pin. With the above circuit, and a 62 byte Arduino compatible library, you can add UART to the tiniest of ATtinys.

In this circuit, the Tx/Rx pin is on the AVR, and the Tx and Rx pins are another device. The circuit relies on the idle state of UART being a logic high signal. When the Tx pin is idle, the transistor stays on. This allows the Tx/Rx pin to pull Rx low when the AVR sends a 0. When the Tx pin sends a 0, the Tx/Rx pin gets pulled low through the diode.

It’s a clever hack, and could definitely help add communication to your next tiny project.

Tape Measure VHF Yagi Antenna

tap measure yagi vhf antenna

Radio direction finding and fox hunting can be great fun and is a popular activity with amateur radio (ham radio) enthusiasts. These antennas are great and are not only good for finding transmitters but also will greatly increase directional distance performance including communicating with satellites and the international space station (ISS).

[jcoman] had a nephew who was interested in learning about amateur radio so [jcoman] figured building and using a cheap and portable 2 meter band VHF Yagi style beam antenna would be the perfect activity to captivate the young lad’s interest in the hobby.

His design is based on [Joe Leggio’s] (WB2HOL) design with some of his own calculated alterations. We have seen DIY Yagi antenna designs before but what makes this construction so interesting is that the elements come together using bits of cut metal tape measure sections. These tape measure sections allow the Yagi antenna, which is normally a large and cumbersome device, to be easily stowed in a vehicle or backpack. When the antenna is needed, the tape measure sections naturally unfold and function extremely well with a 7 dB directional gain and can be adjusted to get a 1:1 SWR at any desired 2 m frequency.

The other unique feature is that the antenna can be constructed for under $20 if you actually purchase the materials. The cost would be even less if you salvage an old tape measure. You might even have the PVC pipes, hose clamps and wire lying around making the construction nearly free.

We were quite surprised to find that such a popular antenna construction method using tape measure elements had not yet been featured on Hackaday. For completeness this is not the only DIY tape measure Yagi on Instructables so also check out [FN64’s] 2 m band “Radio Direction Finding Antenna for VHF” and [manuka’s] 70 cm band “433 MHz tape measure UHF antenna” postings. The other Yagi antenna designs featured on Hackaday were “Building a Yagi Uda Antenna” and “Turning an Easter Egg Hunt into a Fox Hunt” but these designs were not so simple to construct nor as cleverly portable.

A Simple LED Flashlight Composed Of A Relay And A Magnet

In our tips line we sometimes receive hacks that are amazing just because of their ingenuity. This relay-powered flashlight is definitely one of them. It has been named RattleGen by its creator [Berto], who apparently often makes simple hacks used in his everyday life (have a look at his YouTube channel).

To understand this hack, you first need to know (in case you didn’t already) that a magnet moving near a conductor (here a coil) induces a voltage at its terminals. This is called electromagnetic induction. In the picture you see above, you may distinguish a disassembled relay with a magnet located on the lever’s end. As a ferromagnetic metal is already placed inside the coil, the lever is by default ‘stuck’ in this position. By continuously pressing the latter on its other end, important voltage spikes are created at the coils terminals. [Berto] therefore used a bridge rectifier to transform the AC into DC, and a 1000uF capacitor to smooth the power sent to his super bright LED. A video of the system in action is embedded after the break.

Continue reading “A Simple LED Flashlight Composed Of A Relay And A Magnet”

The Face-Tracking Confectionery Cannon!

A team of mechanical and electrical engineering students at Olin College came up with a very fun semester project — a pneumatic powered marshmallow cannon that can track faces, and aim for the mouth!

The device — dubbed the Confectionery Canon — is an impressive mechanical build which required many of Olin College’s manufacturing resources such as the laser cutter, the mill, and the lathe. The majority of the device was made out of acrylic, which was chosen for easy laser cutting, and affordability. Specific aluminum pieces provide strength and were made using mostly scrap found in the shop.

Four servos, a webcam, a solenoid and an Arduino Uno make up the electrical system, which uses Python and OpenCV to track faces (GitHub). A PVC tank is used as the pneumatic reservoir, charged with a safety release valve at 30PSI. To fire the cannon, a sprinkler valve is controlled by a beefy solenoid. It currently only has a magazine capacity of 4 large marshmallows, but the team is planning on upgrading soon.

They have put together a great website with tons of information on the project, and following the break is a fun promo video they made for the project — they even got the VP of  the college to try it!

Continue reading “The Face-Tracking Confectionery Cannon!”

Saving $20,000 USD With A Single LED

carrier

[N8Mcnasty] is a HVAC tech who works on some big machines. One of his charges is a Carrier 19EX Chiller, rated at 1350 tons of cooling. 1 ton of cooling = 12,000 BTU. This particular chiller contained an odd LCD screen. It used a fiber optic bundle and a halogen light for backlight illumination. The system worked fine for over a decade. Now though, the halogen bulb has begun melting the glue on the fiber bundle, causing a dim display. The display in question shows some very important operating parameters, such as oil temperature, current draw, and process temperatures. Since they couldn’t easily see the display, the machine’s operators weren’t running the machine, placing stress on the other chillers in the building’s physical plant. [N8Mcnasty] tried repairing the bundle, however the glue kept melting.

A replacement display was no longer available, meaning that the entire chiller control system would have to be upgraded to a newer system. The new control system uses different sensors than the old one. This is where things start getting expensive. Replacing the sensors would also require draining the 15-20 gallons of oil, 4500 lbs of R134a refrigerant, and bringing the whole system down for almost two weeks, a $20,000 job. Rather than go this route, [N8Mcnasty] found an alternative. LED’s have come a long way since 1996, when the chiller was built. He simply replaced the halogen bulb with an LED and appropriate resistor. [N8Mcnasty] was even able to reuse the halogen bulb bracket. A bit of heat shrink tube later, and the fix looks like it was a factory option. He’s documented his fix here on reddit.

Automated Decanting Machine Pairs Wine With Pi

[Logi.cals], a German software company focused on process, automation, and facilities planning has devised an automated wine decanting machine to demonstrate its logi.CAD 3 PLC programming tool. Sommeliers use these simple machines to handle heavy, expensive bottles of wine. [Logi.cals] added sensors and a stepper motor to a very nice looking specimen and automated the decanting process with a Raspberry Pi.

The outstanding feature of this design is the built-in redundancy. A pair of micro switches detect the presence of both a bottle and a glass. Failing these, a load cell is there to weigh the bottle, reporting naturally whether one is present. The load cell also plays a part in monitoring the liquid level in the bottle, as do capacitive sensors that register the wine flow. The design also includes strain gauges that measure the weight in the glass as well as the liquid level. To bring it full circle, they also verify that a glass is present.

[Logi.cals] used two expansion boards, the Quick2Wire interface with an I²C analogue board and the PiFace. The I²C analogue board takes information from the strain gauges over its ADC, and the Quick2Wire communicates with the load cell’s measurement amplifier over the serial connection. The PiFace handles the remaining sensors and the stepper motor, and provides high voltage protection for the Pi.

If you’re fresh out of heavy, expensive bottles of wine but have some cheap ones lying around, you could use a Pi to make them dance.

Continue reading “Automated Decanting Machine Pairs Wine With Pi”