Posts with «arduino» label

DIY Arduino Due TEA5767 FM Radio

Older hackers will remember that a crystal set radio receiver was often one of the first projects attempted.  Times have changed, but there’s still something magical about gathering invisible signals from the air and listening to the radio on a homemade receiver. [mircemk] has brought the idea right up to date by building an FM radio with an OLED display, controlled with a rotary encoder.

The design is fairly straightforward, based as it is on another project that [mircemk] found on a Chinese site, but the build looks very slick and would take pride of place on any hacker’s workbench. An Arduino Due forms the heart of the project, controlling a TEA5767 module, an SH1106 128×64 pixel OLED display and a rotary encoder. The sound signal is passed through an LM4811 headphone amplifier for private listening, and a PAM8403 Class D audio amplifier for the built-in loudspeaker. The enclosure is made from PVC panels, and accented with colored adhesive tape for style.

It’s easier than ever before to quickly put together projects like this by connecting pre-built modules and downloading code from the Internet, but that doesn’t mean it’s not a worthwhile way to improve your skills and make some useful devices like this one. There are so many resources available to us these days and standing on the shoulders of giants has always been a great way to see farther.

We’ve shown some other radio projects using Arduinos and the TEA5767 IC in the past, such as this one on a tidy custom PCB, and this one built into an old radio case.

Hack a Day 09 Oct 06:00

Building a Tessellated NeoPixel Clock

Anyone can buy a clock, but building your own lets you express your creative flair along the way. [Edison Science Corner] did just that with this neat sci-fi looking design.

The build relies on an Arduino Pro Mini to run the show, paired with a DS3231 real-time clock module. The latter part is of great importance, as without it, the Arduino would not keep accurate time. The 3D printed enclosure looks nondescript from the outside. However, inside, it’s got a neat triangular structure which allows the time to be displayed in that attractive tessellated triangular fashion. There’s a black plastic separator between all the segments which stop unattractive bleed-through and really help with the final effect. The individual triangles are each lit by a NeoPixel LED, which are both addressable and capable of lighting up in RGB colors. It makes for an attractive and colorful display.

If you want to try something more traditional yet challenging, consider whipping up your own 7-segment displays. Video after the break.

Hack a Day 02 Oct 00:00

Arduino IDE 2.0 is Here

Arduino have released the latest version of their Integrated Development Environment (IDE), Version 2.0 and it is a big step up from the previous release, boasting plenty of new features to help you to develop your code more easily.

As the de-facto way for beginners to get into programming hardware, more experienced users have sometimes complained about what they see as the over-simplistic IDE — even lacking relatively basic features such as autocomplete. The new version provides this, and much more besides.

The press-release from Arduino offers a few clues to the main features, but the real detail is tucked away in a range of new tutorials, designed to get you up to speed with the new look.

The main screen is organised differently, to show off the new capabilities and to make development faster and easier. The new “Remote Sketchbook” has been integrated closely with the Arduino Cloud, to allow for easy switching between computers during development. V2.0 will pick up any Cloud sketches automatically, while computers using the previous versions of the IDE can still access the sketches via the Web Editor as before.

The Serial Plotter can now be used at the same time as the text Serial Monitor, rather than having to choose one or the other. In addition, there is a host of new Debug functionality for those devices that support it. This works with the usual In-Circuit Emulators (such as the Atmel ICE), but also natively with newer Arduino boards like the Arduino Zero without any additional hardware. The debugger gives you access to powerful features like Breakpoints, Step-Into and Step-Over to really understand what your code is doing.

Installation is straightforward, and will automatically pull in any libraries and sketches that you created in previous versions of the Arduino software to ease the transition.

There’s a lot to like in the new IDE, but we expect it will take a little while to discover and use all the new features effectively.  Some of them are carry-overs from the “Arduino Pro IDE” that we covered a few years ago, but it’s great to see the software evolve and improve over time.

Have you tried new new IDE yet?  What are your thoughts on how it compares to the older version, or other development environments?  Let us know in the comments.

Thanks to [cardboardBaron] for the tip.

Robotic Platform Is Open Sourced And User Friendly

Having a 3D printer or a CNC machine available for projects is almost like magic. Designing parts in software and having them appear on the workbench is definitely a luxury. But for a lot of us, these tools aren’t easily available and projects that use them can be out-of-reach. That’s why one of the major design goals of this robotics platform was to use as many off-the-shelf components as possible.

The robot is called the OpenScout and, as its name implies, intends to be a fully open-source robotics platform for a wide range of use cases. It uses readily-available aluminum extrusion as a frame, which bolts together without any other specialized tools like welders. The body of the robot is articulating, helping it navigate uneven terrain outdoors. The specifications also call for using an Arduino to drive the robot, although there is plenty of space in the robot body to house any robotics platform you happen to have on hand.

For anyone looking to get right into the useful work of what robots can do, rather than spending time building up a platform from scratch, this is an excellent project. It’s straightforward and easy to build without many specialized tools. The unique articulating body design should make it effective in plenty of environments. If you do have a 3D printer, though, that opens up a lot of options for robotics platforms.

Trojans Can Lurk Inside AVR Bootloaders

If there’s one thing we’ve learned over the years, it’s that if it’s got a silicon chip inside, it could be carrying a virus. Research by one group focused on hiding a trojan inside an AVR Arduino bootloader, proving even our little hobbyist microcontrollers aren’t safe.

The specific aim of the research was to hide a trojan inside the bootloader of an AVR chip itself. This would allow the trojan to remain present on something like a 3D printer even if the main firmware itself was reinstalled. The trojan would still be able to have an effect on the printer’s performance from its dastardly hiding place, but would be more difficult to notice and remove.

The target of the work was the ATmega328P, commonly used in 3D printers, in particular those using the Marlin firmware. For the full technical details, you can dive in and read the research paper for yourself. In basic terms, though, the modified bootloader was able to use the chip’s IVSEL register to allow bootloader execution after boot via interrupt. When an interrupt is called, execution passes to the trojan-infected bootloader’s special code, before then returning to the program’s own interrupt to avoid raising suspicion. The trojan can also execute after the program’s interrupt code too, increasing the flexibility of the attack.

Simply reflashing a program to an affected chip won’t flush out the trojan. The chip instead must have its bootloader specifically rewritten a clean version to remove the offending code.

It’s not a super dangerous hack, overall. Typically, flashing a malicious bootloader would require physical access to the chip. Furthermore, there’s not heaps to be gained by sneaking code onto the average 3D printer out there. However, it’s nonetheless a good example of what bootloaders can really do, and a reminder of what we should all be careful of when operating in security-conscious domains. Stay safe out there!

Hack a Day 22 Sep 03:00

Announcing Arduino IDE 2.0

After a long period of development, we’re really happy to pass on the announcement that version 2.0.0 of the Arduino IDE is now available. Not only is it a more usable and practical development environment, there’s also some new features such as seamless cloud integration (which you are not forced to used) which makes moving between machines easy. From the arduino website:

We’re pleased to announce that as of today Arduino IDE 2.0 has moved to stable and is available for download. Since the launch of the Beta version back in Spring 2021, the feedback received from the active Arduino community has enabled us to focus on what’s meaningful to the widest user-base. It carries a modern editor and provides a better overall user experience thanks to a responsive interface and faster compilation time.

Over and above the core features (we’ll get into those in more details later) the IDE 2.0 benefits from a number of enhancements and additional support. The Serial Monitor and Plotter can be used together, enabling users to have two viewports onto their data output. Before you had to choose between text and graphs, whereas now you can have both.

As well as the refreshed User Interface that provides a more intuitive experience whilst using Arduino IDE 2.0, speed is of the essence. An Arduino-optimized code-completion and code-assist within the language server, help you write code quickly and spot errors as you type. The enormous amount of user feedback allowed us to identify the weakest spots such as code assist and completion, serial output, loading and compilation time.
We made it all better now.

A special mention goes out to Paul Stoffregen who has provided enormous feedback to the IDE development team and been actively developing the initial support for advanced third-party platforms such as Teensy for IDE 2.0 (currently experimental).

If you haven’t already given the new IDE 2.0 a try, here are just a few of the key features… 

Autocomplete during sketch editing

While typing, the editor can suggest the autocompletion of variables and functions according to your code and the libraries you included:

When right-clicking on a variable or a function, a contextual menu will provide navigation shortcuts to jump to the line (and file) where they are declared:

Dark Mode

If your eyes are feeling the strain you can quickly change settings and switch to Dark Mode.
Some of you may have used this during the Beta, but our design team has reworked the entire Dark Theme to make it more consistent, beautiful and easy on the eye. 

Never lose a sketch keeping them safely at Arduino Cloud 

For people who work on multiple computers or want to store their Sketches securely in the Cloud, the Remote Sketchbook integration is a really useful feature.

For now, all the sketches you have in Arduino Cloud and Arduino Web Editor can be edited in IDE 2.0 .

Easily switch from one computer to another and keep working. If you don’t have Arduino IDE 2.0 installed on all your machines, just open the Arduino Web Editor and you can code from your browser in the online IDE with access to all your sketches and libraries. There’s no need to worry about losing your sketches either, with Remote Sketchbook you only need one click and they will be pushed securely to the Arduino Cloud. 

Work offline and sync later, simply bring your sketch down from the Cloud, edit offline and when you are back online click on “Push” and all your changes will be uploaded, meaning all your sketches will always be up-to-date and ready to use. 

Serial Plotter

The IDE 2.0 features a richer Serial Plotter that is a versatile tool for tracking different data and variables which are received from your Arduino board. The Serial Plotter is a really useful visual tool that will help you to understand and compare your data points better. It can be used for testing and calibrating sensors, comparing values and other similar scenarios.

In-app updates

Our users have always been accustomed to receiving notifications when new boards’ support or libraries updates were available, and IDE 2.0 is no exception.
As a plus, the IDE can now itself be updated when a new version is available, so no need to head to the downloads page anymore: click the button and get the latest and greatest.

The new IDE is based on the Eclipse Theia framework, which is an open source project based on the same architecture as VS Code (language server protocol, extensions, debugger). The front-end is written in TypeScript, while most of the backend is written in Golang.

Click here to download the new IDE for your system now. Time certainly flies along, it feels like yesterday when we switched from the old Arduino IDE to version 1.0. Kudos to everyone at the Arduino team and all the beta testers for the works and effort.

If you’re interested in Arduino and want to get started – please purchase a copy of Arduino Workshop, 2nd Edition – a hands-on introduction to electronics and Arduino with 65 projects. It’s written for the complete beginner – you won’t need any other book or website, and by the end you’ll have the knowledge and skills to turn a wide range of ideas into life.

And as always, have fun and make something.

Tronixstuff 15 Sep 00:28
arduino  

Arduino Nano Powers Reverse Polish Notation Calculator

There’s something about Reverse Polish Notation (RPN) and the calculators that use it. It calls to mind a time when a calculator was a serious tool, and not just a throwaway toy. Created in the legacy of such calculators by HP and Texas Instruments, [Simon Boak] shows off his SB116, sporting an Arduino Nano under the hood. It’s a fully custom design, with a hand-built metal case, a custom PCB for the keyboard, and a tiny OLED display for maximum retro green goodness.

The impetus for this build was to replace a particular calculator, a well-used TI Programmer, that’s useful for working with 6502 assembly. The SB116 supports binary, octal, decimal, and hex; and boasts some downright useful functions — AND, NOT, OR, XOR, and bitshifts. The source code is available, but you’re on your own for the case and keyboard. And for maximized retro faux-nostalgia, [Simon] designed a box that would have looked right at home on an 80s store shelf.

Stick around for more retro-modern takes on calculators, or tales of repairing a genuine vintage model.

Hackaday Links: September 11, 2022

Good news out of Mars from the little lunchbox that could — in the seven times that MOXIE has run since it arrived in February 2021, it has reached its target production of six grams of oxygen per hour, which is in line with the output of a modest tree here on Earth. The research team which includes MOXIE engineers report that although the solid oxide electrolysis machine has shown it can produce oxygen at almost any time or day of the Martian scale, they have not shown what MOXIE can do at dawn or dusk, when the temperature changes are substantial, but they say they have ‘an ace up (their) sleeve’ that will let them do that. We can’t wait to see what they mean.

In other, somewhat funnier space news — early last Sunday morning, the ESA’s Solar Orbiter was cruising by Venus as part of a gravity-assist maneuver to get the Orbiter closer to the Sun. Two days before the Orbiter was to reach its closest point to the spacious star, it spat a coronal mass ejection in the general direction of both Venus and the Orbiter (dibs on that band name), as if to say ‘boo’. Fortunately, the spacecraft is designed to withstand such slights, but the same cannot be said for Venus — these events have their way with Venus’ atmosphere, depleting it of gasses.

Is this not the most Hackaday-esque thing you’ve ever heard of? A solar-powered, Arduino-driven cockroach. Not a robot, an actual cockroach with a backpack. Why? Cyborg insects for urban search and rescue missions, obviously. We’d make some quip like ‘all it needs is a Nixie tube’, but in all seriousness, that would just weigh them down needlessly.

So anyway, here’s (an ‘Arduino guitar device’ playing) Wonderwall.

 

Ethersweep: An Easy-To-Deploy Ethernet Connected Stepper Controller

[Neumi] over on Hackaday.IO wanted a simple-to-use way to drive stepper motors, which could be quickly deployed in a wide variety of applications yet to be determined. The solution is named Ethersweep, and is a small PCB stack that sits on the rear of the common NEMA17-format stepper motor. The only physical connectivity, beside the motor, are ethernet and a power supply via the user friendly XT30 connector. The system can be closed loop, with both an end-stop input as well as an on-board AMS AS5600 magnetic rotary encoder (which senses the rotating magnetic field on the rear side of the motor assembly – clever!) giving the necessary feedback. Leveraging the Trinamic TMC2208 stepper motor driver gives Ethersweep silky smooth and quiet motor control, which could be very important for some applications. A rear-facing OLED display shows some useful debug information as well as the all important IP address that was assigned to the unit.

Control is performed with the ubiquitous ATMega328 microcontroller, with the Arduino software stack deployed, making uploading firmware a breeze. To that end, a USB port is also provided, hooked up to the uC with the cheap CP2102 USB bridge chip as per most Arduino-like designs. The thing that makes this build a little unusual is the ethernet port. The hardware side of things is taken care of with the Wiznet WS500 ethernet chip, which implements the MAC and PHY in a single device, needing only a few passives and a magjack to operate. The chip also handles the whole TCP/IP stack internally, so only needs an external SPI interface to talk to the host device.

Talking about firmware for a moment, to ease deployment, the network configuration is handled by DHCP, although some control over MAC address assignment is promised for the future. All control is via UDP over ethernet, and again the basic functionality is there, but some niceties such as motor synchronisation and state querying are again subject to further releases. Hardware design is implemented in KiCAD and FreeCAD, with Arduino covering the firmware and host control side in python. You can read all about it on the Ethersweep project GitHub, what is there not to like?

If you thought you’d seen this stepper-mounted driver setup before, you’d be correct, here’s a Hackaday Prize 2017 Entry for a CANBUS controlled driver. We also saw this on Dummy: the obscenely well made robot arm by [Zhihui Jun], which if you missed it, then do circle back and take a look, you won’t regret it!

The Ease of Wireless Charging, Without the Wait

Historically, there have been a few cases of useful wireless power transmission over great distances, like a team at MIT that was able to light up a 60 W bulb at several meters, and of course Nikola Tesla had grand dreams of drawing energy from the atmosphere. But for most of us wireless power is limited to small, short-range devices like cellphone chargers. While it’s not a lot of work to plug in a phone when it needs a charge, even this small task can be automated.

This build begins with a 3D printed cradle for the smartphone to sit in. When the device detects that the phone has been placed in the cradle, it uses a linear actuator to drive a custom-built charging cable into the phone’s USB port. Similarly, when the phone is lifted from the cradle the cable is automatically removed. It appears that there is some play in the phone’s position that lets the charger be plugged in smoothly, and the project’s creator [Larpushka] points out that the linear actuator is not particularly strong so we don’t imagine the risk of damage is very high.

While wireless charging still may have the edge when it comes to keeping debris out of the port, we still really enjoy a project like this that seems to be done for its own sake. There are some improvements that [Larpushka] plans to make, but for now we’re delighted by this build. For anyone looking to add true wireless charging to any phone that doesn’t have it, though, it’s not too difficult to accomplish either.