Posts with «featured» label

Arduino and industrial distance sensor communicate via RS-485

After obtaining an industrial distance sensor, TUENHIDIY decided to use it as the basis for an interesting visual indicator.

The device communicates with an Arduino Uno via an RS-485 module, and outputs distance values in the form of a 9 x 14 pixel display made out of discreet LEDs soldered onto an LoL Shield.

As shown in the video be low, it does a good job of sensing how far an object is from it on a table, and the 126 LEDs provide a nice brilliant display. 

Code for the build can be found on GitHub if you’d like to make something similar. Seeing as though the sensor used here will set you back close to $1,000, you may want to also consider alternatives like an HC-SR04 ultrasonic module instead! 

Test your limit switches with this automated rig

When you buy—or even salvage—limit switches for electronics projects, you expect them to work again and again, producing normally open (NO) and normally closed (NC) signals as needed. Generally, they do work quite well, but if you want to test this functionality for extra assurance, you might want to check out this project by Mr Innovative.

The automated device spins a NEMA17 stepper motor however many times you choose with a rotary encoder, registering the NO and NC signals that are sent to its Arduino Nano controller in response. The unit then gives a pass or fail output via a small OLED screen to let you know if things are operating properly.

This monitor will let you know if your CPAP mask comes off at night

If you wear a CPAP (Continuous Positive Airway Pressure) mask to treat obstructive sleep apnea, you may wake up to find that you’ve flung the mask off during the night or adjusted it to the point that there’s a large air leak. To help with this problem, Bin Sun has developed a CPAP monitor that measures air pressure via an MPXV7002DP sensor—often also used to determine the airspeed of RC models.

The device is controlled by an Arduino Nano, and when it detects improper pressure readings in alarm mode, it activates a small buzzer, displaying a “check mask” message. It can also be set up to run in manometer mode in order to observe pressure changes. 

More information—including required parts, print files, and code to make it run—can be found here.

Arduino Blog 01 Aug 19:37

This display reminds makerspace members to wear hearing protection

While members of the Oshman Engineering Design Kitchen makerspace at Rice University generally do a good job with wearing proper eye protection and gloves, hearing safety has lagged behind. In order to make it obvious when students need to apply the protective equipment, the “Ring the Decibels” team there has come up with an excellent sound display, laser cut out of wood and acrylic.

Their system uses an analog sound sensor to detect noise passing data on to an Arduino Uno. In response, the Uno controls two LED strips, one of which indicates levels in the form of a VU meter, while the second strip flashes red under an acrylic headphones cutout when dangerous levels are present. 

Build details are available here, and you can check out the demo below to see how it works! 

Mover3D is a 3D-printed moving light for your desk

LEDs are fun, and RGB(W)s adds a new element to things, but what if you want a light that can also move by itself? The Mover3D does just that as a pan/tilt system controlled by the DMX512 communication protocol. You simply feed instructions in via any standard lighting console, and it dances around under your commands.

The 3D-printed device uses an Arduino Uno inside the fixture’s base to send signals to an RGBW LED, as well as control a pair of servo motors that pan and tilt the light turret. While light output is limited for now, a second version featuring a 14,000 lumen output with stepper motors and slip rings for 360° rotation is in the works, and should be quite impressive when it’s done! 

Setup and programming instructions can be found in the project’s write-up, and needed print files are up on Thingiverse.

Why we chose to build the Arduino Nano 33 BLE core on Mbed OS

This post is from Martino Facchin, who is in charge of the firmware development team at Arduino. Hopefully this is the first of a series of posts describing the inner workings of what we do.

The new, shiny and tiny Nano 33 BLE and Nano 33 BLE Sense are on their way to becoming a serious threat to any hacker’s summer vacation. (I’d recommend spending a couple of days at the lake or beach anyway despite the board’s awesomeness!)

Quoting Sir Isaac Newton (who walked the same streets of Cambridge, UK that the Arm engineers use to get to work everyday), starting from scratch is not always a clever idea. Tens of thousands of man-hours have been spent since the beginning of computer science to reinvent the wheel, sometimes with great results, other times just bringing more fragmentation and confusion.

Since we didn’t have an official Arduino core for the Nordic nRF52840 Cortex-M4 microcontroller, which the Nano 33 BLE and Nano BLE Sense are based upon, we took a look at the various alternatives:

  • Using Nordic softdevice infrastructure
  • Writing a core from scratch
  • Using Mbed OS as a foundation

Option one looks juicy but clashes with a cornerstone of Arduino: open-source software. In fact, softdevice’s closed source approach limits the user’s freedom.

Option two would take a lot of burden on our shoulders for a single board, making the core not very reusable.

So, we went to option three: basing the core on Mbed OS foundation, sharing its drivers and libraries.

As many of you may know, Mbed is a fully preemptive RTOS (real-time operating system), meaning you can run multiple “programs” (more specifically, threads) at the same time, much like what happens in your notebook or smartphone. At Arduino, we have been looking for an RTOS to use on our more advanced boards for a long time but we never found something we liked until we started working with the Mbed OS. Programming an RTOS is usually quite complicated (every university grade course on operating systems will be full of frightening terms like ‘mutex’ and ‘starvation’), but you don’t have to worry if you just want to use it as an Arduino; setup() and loop() are in their usual place, and nobody will mess with your program while it’s running.

But if you want to do MORE, all Mbed infrastructure is there, hidden under the mbed:: namespace. As a side effect of reusing its drivers, we can now support every Mbed board in Arduino with minimal to no effort. Plus, the structure of the core allows any Mbed developer to use Arduino functions and libraries, simply by prepending arduino:: before the actual function call.

Mbed also supports tickless mode; in this way, every time you write delay() in your code, the board will try to go in low power modes, knowing exactly when to wake up for the next scheduled event (or any external interrupt). We are able to achieve an impressive 4.5uA of lower consumption while running a plain old Blink on the Nano 33 BLE (a minimal hardware modification is needed to obtain this value but another blog post is coming). As for Bluetooth support, you can start creating your BLE devices today using the wonderful https://github.com/arduino-libraries/ArduinoBLE but we support plain Cordio APIs as well, in case you need features not yet available in Arduino BLE.

And of course, it’s all open-source! 

If you just want to make awesome projects with its plethora of onboard sensors, fire up your Arduino IDE, open the board manager and search for Nano 33 BLE; one click and you are ready to go! 

If you want to hack the core, add another Mbed board or merely take a look, your next entry point is the GitHub repo. Don’t be shy if you find a bug or have a suggestion; we love our community, and will try to be as responsive as possible. 

Arduino selects Auth0 as standardized login for ecosystem

We are excited to announce that we’ve selected Auth0 as the identity management platform of choice for Arduino. We will replace our own Single Sign On solution with Auth0 for all public facing web properties, including Arduino Create and other apps.

We discovered that our own homegrown authentication solution would not scale to meet the rapidly developing needs of the growing global community and decided to reach out to Auth0. In addition to Single Sign On, Arduino will take advantage of Auth0’s new Universal Login, which enables developers to completely customise their branded authentication experiences quickly, and Device Flow for browserless or input-constrained devices.

“We wanted a robust platform to replace our SSO solution but also give us the flexibility to do cool, new things in the device authentication space. Auth0 is a brand we admire, and their API-based approach makes it easy to migrate our login data in a way that’s completely transparent for the customer. We are excited to welcome them to our global community.” – Gianluca Varisco, Arduino CISO

We plan to leverage the power of both communities and events, and explore a technical partnership in the IoT domain. Auth0 currently secures more than 2.5 billion logins per month for 21 million users.

“I have been using Arduino for years as the brain for my personal projects, so working with them in a business capacity is really rewarding. When you empower the developer with simple, powerful tools, the whole business benefits. We are excited by the reach of the Arduino community and aligned in our mission to help the developer in their journey to innovate.” – Eugenio Pace, Auth0 CEO and co-founder 

Arduino Blog 28 Jul 11:13

Plywood printer uses a unique mix of manufacturing methods

Sure, we’ve seen low-cost DIY 3D printers with wooden frames before, but not a 3D printer that actually ‘prints’ wood. That’s exactly what Shane Wighton and his Formlabs hackathon team have done. (Although probably more along the lines of a hybrid additive/subtractive CNC machine that makes parts out of 3/4″ plywood.)

The device first cuts each layer out with a router, applies glue automatically, and then feeds subsequent layers onto a stack to be cut in the same manner. The result of these combined layers is a block of wood with a very large “benchy” inside, revealed with a bit of manual cutting.

Motion control is handled by an Arduino Due, which interfaces with a number of stepper drivers to move the router, while an off-the-shelf relay board triggers the pneumatics, lights, and even a horn to indicate when a job is complete.

More details on the build are available in Wighton’s write-up here and you can see it in action below!

Low-quality wireless audio transmission with Arduino

After considering the price of helmet-mounted headsets for motorcycle or moped use, YouTuber GreatScott! decided to try making his own. His walkie-talkie prototype consisted of two Arduino Nano boards, using nRF24L01+ transceivers and a small speaker for PWM audio output.

After a test demonstrating wireless transmission, the design was transferred to custom PCBs, programming their ATmega328P with an Uno acting as an ISP. The audio results are, at this point, barely intelligible. Nevertheless, it’s an interesting experiment, showing that this type of communication is possible using the RF24Audio library with an Arduino-based system. 

If you think you could do things better, or that he’s missed something obvious, the PCB design is available here, so be sure to chime in on the video’s comments if you have an idea!

Arduino Blog 25 Jul 22:00

Visualizing magnetic fields in three dimensions with an Arduino magnetometer

As humans, we can’t detect magnetic fields, but we take advantage of this phenomenon every day in the form of motors and various sensors. Even electrical wire produces a field when current flows through it. You can sense magnetism with a compass, but if you want to visualize it in three dimensions, maker ‘amamitof7’ has a solution in the form of this Arduino magnetometer.

The device uses a trio of analog Hall effect sensors to measure the strength of the magnetic field. This data is fed to a MKR WiFi 1010 (or Uno), which generates an isometric representation of the field on a small TFT display. 

One could see this used in a variety of diagnostic applications, or perhaps as an excellent physics teaching tool.