Posts with «arduino» label

Upgrade a sewing machine into an automatic embroidery rig

A needle and thread is extremely useful if you need to fasten a few pieces of fabric or sew on a button, and a sewing machine takes things up several notches in speed an accuracy. This venerable machine, however, can now be enhanced with a trio of stepper motors under Arduino Uno GRBL control to take things to an entirely new level.

The “Self-Made Embroidery Machine” employs a setup very similar to a 3D printer or CNC router. Two steppers move the fabric around, while a third actuates the needle. This allows the user to program in decorative shapes and patterns as shown in the video below, and the build process is well documented if you’d like to build your own!

Sewing machine part is any old or new sewing machine. Only change for original is stepper motor with synchronised pulley system (chain/belt drive) and more embroidery friendly presser foot. It is recommended to use older sewing machine, way more convenient to mount stepper motor to cast iron and prices are relatively cheap.

XY movement consists mainly 3D printed parts, 12 pcs and similar parts known from self build 3D printers. Both axes use GT2 belts, NEMA 17 steppers and both directions are fully scalable.

Synchronous movement comes from Arduino powered GRBL G-code interpreter, it is mouthful, but basically machine moves using G-code send to Arduino. It is not that complicated and it is only carrier like any other one when going from system to another one.

Now we have movement and code, but how to make nice shapes and export to G-code. It is nothing to do with medieval sorcery, it is a matter of downloading Inkscape and extension called Inkstitch.

Help and examples how to use Inkstitch extension can be found address above. End result should be really close to hobby level embroidery machines, just slower speed. After all, embroidery machine is nothing more than overgrown sewing machine.

Convert a Dremel tool into an Arduino-controlled CNC machine

3D printers get most of the attention in maker-fabrication news, but other computerized tools, like laser cutters and CNC routers, can also be extremely useful. In fact, Nikodem Bartnik decided to create his own Dremel-based machine constructed out of 3D-printed parts and aluminum profiles. 

Electronics include an Arduino Uno and CNC stepper shield running GRBL for control, along with some NEMA 17 steppers and motor drivers, a relay for the Dremel, and a 12V / 30A power supply.

As with many other projects, his build went through several iterations, but the final results—seen in the video below—are quite good. The machine, which only cost him around $300, is able to mill MDF and acrylic.

If you’d like to make your own, Bartnik outlines his design in the first video below, then shows how to use it in the second. 

Customize your coffee cups with the Mug-O-Matic!

In order to inspire the next generation of scientists and engineers, Michael Graham (AKA EngineerDog) has come up with a robot that automatically draws on coffee mugs with a marker—and potentially much more. 

In its nominal configuration, the Mug-O-Matic is controlled by an Arduino Nano with a custom TinyCNC board, and uses a trio of small servo motors for cup plotting.

Additionally, the device can be reconfigured into a wide variety of robotic forms, and features 60+ compatible parts with which to do so. 

Mug-O-Matic is a 3-axis drawing robot that can customize coffee mugs! This capable little robot can draw anything you want via manual control, Bluetooth, calculated algorithms, or even g-code. So you can enjoy your custom mug creation, then wipe it clean. You could make it totally different every day for a year, and not make the same thing twice!

Its little buddy, the Desktop Sentry, is a pan-tilt turret that guards your desk! Also controlled via joystick, Bluetooth, algorithms, or G-code, this device can automatically guard your space with a laser or a rubber band launcher, or be used for light writing.

The intent of this project is to produce fun and accessible educational tools. We want to encourage people to engage in tinkering and making things, because the creative process is a powerful way to learn.

If you’d like to get to work on your own Mug-O-Matic, more info can be found here, including a parts list for the build. It is also slated for a release on Crowd Supply, which will likely make things easier and less expensive if you’re willing to wait!

(Almost) autonomous kids’ vehicle with Arduino

While the world seems to be focusing on self-driving cars, maker Sieuwe Elferink has instead turned his attention to creating a semi-autonomous kids’ four-wheeler. As of now, the modified device can steer itself within a set of lines, and stop for pedestrians and inanimate objects.

The augmented vehicle uses an Arduino Nano for control, plus a pair of TCRT5000 sensors attached to tubing on the sides to pick up boundary lines. Obstacle avoidance is via an ultrasonic sensor on the front. Four relays are used to activate a former windshield wiper motor for steering through a chain and sprocket system, along with the vehicle’s original motor for propulsion.

The build process is documented here, while code and an electrical schematic is available on GitHub.

Creep out guests with an Arduino-controlled teddy bear

Halloween has become something of a hacker holiday, giving creative people the world over a chance to show off their spooky animatronic inventions outside without neighborhood scrutiny. This year, Instructables user “gocivici” created a display inspired by the doll in a rocking chair featured in the movie Anabelle, but decided to use an Arduino-infused teddy bear instead. 

The setup is simple but effective, using an Arduino Nano and solenoid to rock the chair. The bear’s head rotates using another Arduino board—an Uno this time—along with a second solenoid and 3D-printed assembly stuffed inside. Control is accomplished via a small wireless remote, though a motion sensor could also be employed.

Arduino PRO Gateway for LoRa now available for pre-order

We are very happy to announce the Arduino PRO Gateway for LoRa!

Combined with Arduino MKR WAN 1300 IoT nodes it makes an ideal solution for a wide range of applications, like smart agriculture, smart cities and building automation – and many other remote monitoring applications requiring long range, low power wireless connectivity.

The gateway can be used globally and enables multiple channel management. By supporting advanced features like Listen Before Talk (LBT), it allows users to transmit at higher power on the first free channel, achieving longer ranges than conventional gateways for LoRa. 

Arduino continues its mission of making complex technology easy enough for anyone to use. Customers of the Arduino PRO Gateway will be given exclusive beta access to the Arduino IoT Cloud, which makes installation, provisioning and remote management of the gateway incredibly simple through the popular Arduino Create cloud platform.

The gateway features the advanced Embit EMB-LR1301-mPCIe module, hosted by a Raspberry Pi 3 B+ SBC, in a rugged aluminum enclosure. The gateway comes pre-installed with an optimized packet forwarder and a carrier grade Network server for LoRa WAN that is running on the Arduino Cloud provided by A2A Smart City (part of the A2A Group).

Technical Specifications

  • Chipset: Semtech SX1301
  • Modulation: LoRa Spread Spectrum, FSK, GFSK 868MHz (EU) / 915MHz (US)
  • Number of Channels: 8 LoRa Channels
  • Operating Frequency: 868MHz (EU) / 915MHz (US)
  • Frequency Range: 860MHz to 1020MHz
  • Operating Temperature: -40°C to +85°C
  • RF Output Power: Up to +27dBm
  • Sensitivity: Up to -137dBm
  • Interfaces for the LoRa Module:  mPCIe (SPI / I2C / UART / GPIOs) :
  • Dimensions: 71x40x1mm
  • Operating Voltage: +5V
  • Additional Features:
    • Listen Before Talk (LBT) Capability (for improved transmission power management),
    • On-board uFL antenna connector
    • FPGA support for LoRa Spectral Scan

 

The Arduino Pro Gateway for LoRa (868 MHz , EU version) can be pre-ordered from the Arduino Store.

Arduino Blog 14 Nov 10:39

Dual Arduino “CNC” control

Generally when you work with CNC machinery, you program it on a computer, then allow a controller to automatically run through a cutting routine. Arduino boards have long been used for this kind of control through the grbl software package, but YouTuber Electronoobs decided to do things a bit differently.

His setup takes input from a potentiometer and several buttons, enabling manual control of his stepper motor-driven router. An Arduino Nano powers the motors through a pair of stepper drivers, while a second Nano is then used to output distance information on an LCD screen, letting him view exactly where his cutter is at a glance.

Why use 2 Arduinos? Well, if I use only one, the code would be very difficult with too much interruptions. We have to create pulses for the motors and print on the LCD at the same time. I’ve done that and each time I was printing on the LCD, there was a small pause in the motor rotation, and if the refresh rate is fast, the motors will have a pause each time and we don’t want that. That’s why I use 2 Arduinos. One will create the pulses for the motors and the other one will count the steps and print the distance and speed.

We have 2 step motors. I’ve used NEMA 17. Each with a A4988 driver. This driver needs 3 signals from the Arduino. Enable, direction and steps. The enable pin is connected to a toggle switch so we could start to stop the motors manually. The toggle switch is also connected to the Arduinos so we could know when the motors are enabled or not. To control speed we use a lineal potentiometer and to move axis and reset position, some push buttons with pulldowns. To print the distance, I’ve used an I2S LCD screen of 20×4 but you will have the code for the 16×2 version of LCD as well.

Besides adding a nice readout to the machine, this concept could certainly form the basis for all manner of other stepper-driven devices.

Arduino Gets a Command Line Interface

When using an Arduino, at least once you’ve made it past blinking LEDs, you might start making use of the serial connection to send and receive information from the microcontroller. Communicating with the board while it’s interacting with its environment is a crucial way to get information in real-time. Usually, that’s as far as it goes, but [Pieter] wanted to take it a step farther than that with his command line interpreter (CLI) for the Arduino.

The CLI allows the user to run Unix-like commands directly on the Arduino. This means control of GPIO and the rest of the features of the microcontroller via command line. The CLI communicates between the microcontroller and the ANSI/VT100 terminal emulator of your choosing on your computer, enabling a wealth of new methods of interacting with an Arduino.

The CLI requires a hex file to be loaded onto the Arduino that you can find at a separate site, also maintained by [Pieter]. Once that’s running, you can get all of that sweet command line goodness out of your Arduino. [Pieter] also has some examples on his project page, as well as the complete how-to to get this all set up and running. There’s a lot going on in the command line world, in Linux as well as windows. So there’s plenty to explore there as well.

Hack a Day 11 Nov 03:00
arduino  cli  command line  gpio  i2c  microcontrollers  serial  shell  unix  uno  

Digital Rain Cloud

 
 

Description

This is a very simple project that turns a Rainbow Cube Kit from Seeedstudio, into a digital rain cloud. It features a relaxing rain animation which is ruined by a not-so-relaxing yet somewhat realistic lightning effect. The animation has a very random pattern, and is quite satisfying to watch. The strategically placed cotton wool on the top of the cube makes all the difference to the project, and is sure to impress all of your friends. Luckily, I have done all of the hard work for you. You will find the full source code for the animation sequence below. You just have to provide the Rainbow Cube Kit and the cotton wool. Have fun !!

 
 

Debugging Arduino is Painful: This Can Help

If you are used to coding with almost any modern tool except the Arduino IDE, you are probably accustomed to having on-chip debugging. Sometimes having that visibility inside the code makes all the difference for squashing bugs. But for the Arduino, most of us resort to just printing print statements in our code to observe behavior. When the code works, we take the print statements out. [JoaoLopesF] wanted something better. So he created an Arduino library and a desktop application that lets you have a little better window into your program’s execution.

To be honest, it isn’t really a debugger in the way you normally think of it. But it does offer several nice features. The most rudimentary is to provide levels of messaging so you can filter out messages you don’t care about. This is sort of like a server’s log severity system. Some messages are warnings and some are informational, and some are verbose. You can select what messages to see.

In addition, the library timestamps the messages so you can tell how much time elapsed between messages and what function you were in during the message. It can also examine and set global variables that you preconfigure and set watches on variables. It is also possible to call functions from the serial monitor.

There’s a companion Java program (see video below) although you can use most of the features directly from the normal serial monitor, it just isn’t as pretty. The Java program can also read an Arduino program file and convert all the print calls in it to use the library, if you like.

As you might expect, this requires some cooperation from your program. You have to set up the library and the serial port. You also have to arrange for the main function to run frequently (for example, in the main loop). By default, the debugging is mostly suppressed (although you can change that). You have to issue a serial port command to turn on higher level logging and debug functions.

If you start with the examples that come with the library (use the simple one for an AVR-based Arduino and the advanced one for any others), you’ll see a few #defines you can use to control the library:

  • DEBUG_DISABLED – Set to true and the library compiles out with no overhead
  • DEBUG_DISABLE_DEBUGGER – Turn off everything but message logging
  • DEBUG_INITIAL_LEVEL – Starting level of debug messages
  • DEBUG_USE_FLASH_F – Store debug messages in flash memory

There’s really two versions of the code: one for 8-bit AVR processors and another for other Arduino types. We found problems building both of them. The files src/utility/Fields.cpp, src/utility/Vector.h, and
src/utility/Util.cpp refer to arduino.h. That works on computers that have case-insensitive file systems. In each case, for Linux, it needs to be Arduino.h. In addition, SerialDebug.cpp is lacking a stdarg.h include. We’ve reported both of these issues to the developer so they may be fixed by now.

You can explore the video and the documentation to see how it all works. Is it a full-blown debugger? No. You can’t stop execution (odd, because you certainly could technically), set breakpoints, or single step. But it still useful to have access to at least some of your program’s internal state.

Of course, Arduino has promised full debugging soon. We’ve even seen one Arduino debugging another via debugWIRE.

Hack a Day 08 Nov 06:00