Posts with «oled» label

Motorized welding turntable with Arduino UNO

Building a motorized welding turntable solves a common problem: welding around circular or cylindrical objects without walking around the workpiece. Greenhill Forge’s project creates a large motorized lazy Susan with adjustable speed and a modest budget. The table rotates the piece under the torch, so the welder stays still and both hands are free to guide the arc.

The heart of the system is a stepper motor mounted under the table surface. Rotation passes through a gear reducer and a standard spider coupling, which transmits motion to the top plate. The reducer increases torque and lowers speed, so the table moves smoothly even with heavy parts. Everything is controlled by an Arduino UNO Rev3 board, which drives the motor and reads user commands.

Speed control and user interface

The user adjusts rotation speed with a rotary encoder. The knob is comfortable to use even with welding gloves. A small OLED screen shows the set speed, so control is immediate and precise. The firmware on the Arduino UNO reads the encoder, updates the display, and drives the stepper motor with the correct pulse frequency.

For those who want to replicate the project, choosing components is straightforward. A Uno R3 with ATmega328 is the same board used in the original project. A NEMA 17 stepper motor rated at 1.2 A has the right torque for a table of this size, which rotates through a reducer anyway. A 12 mm rotary encoder with knob connects directly to digital pins and can be turned even with welding gloves. Finally, a 128×64 OLED display shows parameters clearly.

  • Stepper motor with gear reducer for torque
  • Spider coupling to connect shaft and table
  • Lazy Susan bearing for rotating support
  • Rotary encoder for adjustment
  • OLED display for visual feedback

Grounding through the shaft

An important detail is grounding management. In welding, current must return to the generator through the workpiece. If the turntable is not grounded, current passes through the lazy Susan bearings, causing arcs that damage them quickly. Greenhill Forge solves the problem with a ground strap that runs through the motor shaft.

The strap maintains conductivity between the table surface and the workpiece. This way, welding current has a dedicated path and the bearings stay protected. The strap is a wear item, but with normal use it should last a long time. Also, replacement cost is minimal, so maintenance stays economical.

The project is documented in a Greenhill Forge video, which follows the entire process: cutting and welding the frame, mounting the motor under the table, and grounding. At the end, the table is shown in action during a real weld, with speed adjusted on the fly.

Why build a turntable

This project appeals to both beginners and experienced welders. Construction is simple and requires few tools. Moreover, electronic control with Arduino UNO opens the door to future modifications, such as programmed rotation or foot pedal control. The modest cost makes the project accessible to many makers.

The welding turntable is an example of how a stepper motor, an encoder, and an OLED display can turn a simple support into a professional tool. Well-designed grounding protects components and ensures quality welds. Finally, adjustable speed lets you adapt rotation to any type of work.

Source: https://youtu.be/WQSzLMcc9zQ?si=DB7dDrRwHsfXU1OI

Related products

The post Motorized welding turntable with Arduino UNO appeared first on Open Electronics.

Arduino UNO R4 WiFi: A Guide to Sensors and Displays

We bring the connections of the STEMMA QT/Qwiic connector available on the Arduino UNO R4 WiFi to the outside, using a board that can host I²C-Bus devices and can be daisy-chained with others of the same type.

Among the new features introduced by the Arduino UNO R4, the WiFi version stands out with a small interface connector called STEMMA QT/Qwiic. For form-factor compatibility reasons, this connection did not find a place in the traditional headers compatible with UNO boards, but it is located on the left side of the ICSP.

The connector makes an I²C-Bus accessible according to the pinout shown in Fig. 1, which can be used to manage external devices such as displays, sensors, etc., as long as they support I²C communication.

Fig. 1 Position of the STEMMA QT/Qwiic connector on the Arduino R4 WiFi board.

The SCL and SDA lines, unlike what happens in previous Arduino boards based on Atmel processors (where they were shared with pins A4 and A5 of the standard Arduino header), are connected to a second (secondary) I²C bus. In fact, the Renesas chip used in the R4 makes two distinct I²C buses available. The second one must be managed, however, by calling the specific object Wire1, as will be explained later in this article. The connection was introduced in the Arduino R4 (only in the WiFi version) to quickly connect Sparkfun standard breakout boards to it, since the connector used, a 4-pin single-in-line PCB connector, is the one adopted by Sparkfun boards. Qwiic is an ecosystem of breakout modules and development boards equipped with a so-called Qwiic connector, and it combines the flexibility of I²C with the ease of use of ready-made compatible cables available on the market, making it simple to manage a chain of I²C-Bus devices through a single cable. In practice, this means that wiring Qwiic devices is as simple as connecting them in series, and that’s it. To facilitate the connection and provide physical support for the breakout boards, instead of leaving them “flying,” we thought of designing and proposing a small adapter board that has two connectors compatible with the STEMMA QT/Qwiic standard, creating a pass-through connection that allows interfacing devices on the board itself, but also using the I²C bus to connect other devices. The I²C-Bus connections are distributed on our board in rows of pads where you can insert strips to connect and mechanically support breakout boards. Everything will be clearer by analyzing the project’s electrical schematic, which you can find on this page.

Electrical schematic

Electrical schematic of the adapter board.

As you can see, it is something very simple, which in fact has no electronics but simply creates a series of electrical interconnections, making a pass-through I²C-Bus connection between input and output through the two 4-pin Sparkfun-type connectors, and which has four rows of four pads at 2.54 mm pitch, ready for soldering female strips or pin strips for sensors and various devices. Note that the layout on the printed circuit board provides that the rows of pads have contacts arranged differently from one side to the opposite one: we wanted this to allow mounting boards and especially displays (since the problem occurs, for example, with small OLEDs) that have a different arrangement of Vcc and GND, as well as SDA and SCL. Through the STEMMA QT/Qwiic connector, the power needed for the breakout boards to operate is taken from the Arduino UNO R4 board, thus achieving independent operation of the devices connected to Arduino. As you can see, the circuit is essential and basically only serves to carry connections. The nice thing is that having two JST connectors makes it possible to daisy-chain numerous I²C-Bus interface devices on multiple boards, since the one connected to the Arduino R4 can in turn be connected to a second board, the latter to a third, and so on, to host more elements. For the interconnection between the Arduino R4 and our board, and between multiple adapter boards, you can use a pre-wired cable with a 4-pin JST connector at each end, 1 mm pitch, available at Futura Elettronica. The adapter board we propose here can also be purchased ready-made from [Futura Elettronica](www.futurashop.it) with product code FT1732M.

Construction and use

Photo of the adapter board.

The small adapter board described here can be easily prepared by photoengraving once you have the two copper-side traces, however, given its really low cost, it is possible and convenient to buy it ready-made. To explain how to use it, we propose a basic application that involves acquiring information from a breakout board for barometric pressure and ambient temperature sensors, then displaying it on a small 0.96″ monochrome OLED display based on the SSD1306 controller; clearly, we are referring to two devices equipped with an I²C-Bus interface. The Arduino R4 WiFi connector to use is the one detailed in Fig. 2. To use a Bosch BME280 sensor on a breakout board with the Arduino R4 and the STEMMA standard, you must mount the small breakout board using the appropriate pin strips and following the intended orientation (Fig. 3 can help you, where you can also see in which position to mount it); be careful that if you do not respect the indicated position and orientation, the small board can be irreparably damaged.

Fig. 2 The JST connector for the Qwiic STEMMA connection to be used to connect our board.
Fig. 3 The adapter with an I²C BME280 sensor on a breakout board.

This is because, as mentioned, the rows of I²C-Bus pads inside the printed circuit board are arranged differently depending on which side they are on, to allow mounting all breakout boards available on the market, equipped with 2.54 mm pitch strip connections. On a second FT1732M adapter board, you must mount the small OLED display, which is a standard type and, more precisely, the one sold by Futura Elettronica with the code OLEDGVSCSD; the device must be applied as shown in Fig. 4 after soldering a 4-pin pin-strip to it and using the row of pads whose contacts are arranged as follows: GND, VCC, SCL, SDA.

Fig. 4 The STEMMA QT/Qwiic adapter with the 0.96-inch display module attached.

To implement communication with the BME280 breakout, you must first load the Adafruit_BME280 library into the Arduino IDE; to do this, open the IDE, go to the Sketch menu, and issue the Include Library > Manage Libraries… command. At this point, search for “Adafruit BME280” in the search bar and install the corresponding library. Installation can also be done from a .zip file containing the library, using the appropriate menu command. Then, from the File menu, you can issue the Examples command and load the “BME280_I2C” example; once the sketch is displayed, load it onto the board (the IDE must already have the UNO R4 WiFi among the boards available in the Tools > Board… submenu) and run it, opening the Serial Monitor to view the pressure and temperature data read by the sensor. Note that the Arduino UNO R4 WiFi has two I²C buses and that the Qwiic connector is connected to the secondary one, so you must use Wire1. In most cases, you will be able to select the Wire1 object during library initialization with this code snippet:

Wire1.begin();
libraryName.begin( Wire1 );

Our test sketch

To test the adapter board and the STEMMA Qwiic connection, we wrote for you the simple sketch proposed in Listing 1, which, in association with the breakout board based on BME280 and the OLED display, implements an essential weather station capable of displaying atmospheric pressure and ambient temperature.

To work, the sketch includes the Wire.h, Adafruit Sensor.h, BME280.h, GFX.h, and SSD1306.h libraries, as well as ArduinoGraphics.h and Arduino_LED_Matrix.h to manage the display; in particular, SSD1306.h handles the controller integrated into the OLED display module. In the Setup, the Serial Monitor is initialized for communication at 115200 baud, and then commands are issued to use Wire1, with the instructions:

// Qwiic
Wire1.begin();
Wire1.setClock(100000);
Wire1.setTimeout(1000);

that will be used to make the Arduino UNO R4 communicate with the display and the BPM280 sensor through the Qwiic / STEMMA interface. Once this is done, the I²C-Bus OLED display and the sensor are initialized, then you start acquiring samples of the quantities detected by the latter, sending the result to the display at the corresponding I²C-Bus address. These two operations are repeated in a loop, with a delay time of 20 ms. Note that using the I²C-Bus implies defining the address of the two peripherals in the firmware; in this regard, it should be said that the BME280 breakout typically has address 0x76, which is the default in our sketch; if the query fails and no data appears on the display, it is advisable to change the I²C address in the following line of code:

uint8_t BME_ADDR = 0x76;

replacing 0x76 with 0x77, because breakouts with this preset address also exist. As for the OLED display used in this example, it has an I²C-Bus address of 0x3C, which is fixed and does not vary from manufacturer to manufacturer, because it is defined in the controller chip.

Conclusions

Well, with this we have finished and we leave you to your practical experiments with the Arduino UNO R4 and its Qwiic connection. The application proposed here is one of the many examples of use and employs one board for each I²C-Bus device; however, each one can host, depending on size, multiple breakouts, and remember that the STEMMA/Qwiic connector also supports more than two adapter boards, depending on the current that can be supplied to the bus.

The post Arduino UNO R4 WiFi: A Guide to Sensors and Displays appeared first on Open Electronics.

Smooth Animations, Slick Bar Graphs, but No Custom Characters on This 16×2 OLED

Sometimes, finding new ways to use old hardware requires awesome feats of reverse engineering, software sleight of hand, and a healthy dose of good fortune. Other times, though, it’s just as simple as reading the data sheet and paying attention to details.

Not that we’re knocking [upir]’s accomplishment with these tricked-out 16×2 OLED displays. Far from it, in fact — the smoothly animated bar graph displays alphanumerics look fantastic. What’s cool about this is that he accomplished all this without resorting to custom characters. We’ve seen him use this approach before; this time around, the hack involves carefully shopping for a 16×2 OLED display with the right driver chip — a US2066 chip. You’ll still need a few tricks to get things working, like extra pull-up resistors to get the I2C display talking to an Arduino, plus a little luck that you got a display with the right character ROM.

Once all that is taken care of, getting the display to do what you want is mainly a matter of coding. In the video below, [upir] does a great job of walking through the finer points, and the results look great. The bar graphs in particular look fantastic, with silky-smooth animations.

Hack a Day 27 Apr 21:00
16x2  animation  arduino  display  led hacks  oled  rom  us2066  

The Great Resistor Embiggens the Smallest Value

With surface-mount components quickly becoming the norm, even for homebrew hardware, the resistor color-code can sometimes feel a bit old-hat. However, anybody who has ever tried to identify a random through-hole resistor from a pile of assorted values will know that it’s still a handy skill to have up your sleeve. With this in mind, [j] decided to super-size the color-code with “The Great Resistor”.

How the resistor color-code bands work

At the heart of the project is an Arduino Nano clone and a potential divider that measures the resistance of the test resistor against a known fixed value. Using the 16-bit ADC, the range of measurable values is theoretically 0 Ω to 15 MΩ, but there are some remaining issues with electrical noise that currently limit the practical range to between 100 Ω and 2 MΩ.

[j] is measuring the supply voltage to help counteract the noise, but intends to move to an oversampling/averaging method to improve the results in the next iteration.

The measured value is shown on the OLED display at the front, and in resistor color-code on an enormous symbolic resistor lit by WS2812 RGB LEDs behind.

Inside The Great Resistor, the LEDs and baffle plates make the magic work

Precision aside, the project looks very impressive and we like the way the giant resistor has been constructed. It would look great at a science show or a demonstration. We’re sure that the noise issues can be ironed out, and we’d encourage any readers with experience in this area to offer [j] some tips in the comments below. There’s a video after the break of The Great Resistor being put through its paces!

If you want to know more about the history of the resistor color code bands, then we have you covered.  Alternatively, how about reading the color code directly with computer vision?

DIY Arduino Hearing Test Device

Hearing loss is a common problem for many – especially those who may have attended too many loud concerts in their youth. [mircemk] had recently been for a hearing test, and noticed that the procedure was actually quite straightforward. Armed with this knowledge, he decided to build his own test system and document it for others to use.

Resultant audiogram from the device showing each ear in a different color

By using an Arduino to produce tones of various stepped frequencies, and gradually increasing the volume until the test subject can detect the tone, it is possible to plot an audiogram of hearing threshold sensitivity.  Testing each ear individually allows a comparison between one side and the other.

[mircemk] has built a nice miniature cabinet that holds an 8×8 matrix of WS2812 addressable RGB LEDs.  A 128×64 pixel OLED display provides user instructions, and a rotary encoder with push-button serves as the user input.

Of course, this is not a calibrated professional piece of test equipment, and a lot will depend on the quality of the earpiece used.  However, as a way to check for gross hearing issues, and as an interesting experiment, it holds a lot of promise.

There is even an extension, including a Class D audio amplifier, that allows the use of bone-conduction earpieces to help narrow down the cause of hearing loss further.

There’s some more information on bone conduction here, and we’ve covered an intriguing optical stimulation cochlear implant, too.

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

Pocket Radio Powered By Tiny Microcontroller

Before the days of MP3 players and smartphones, and even before portable CD players, those of us of a certain age remember that our cassette players were about the only way to take music on-the-go. If we were lucky, they also had a built-in radio for when the single tape exhausted both of its sides. Compared to then, it’s much easier to build a portable radio even though cassettes are largely forgotten, as [wagiminator] shows us with this radio design based on an ATtiny.

The build is about as compact as possible, with the aforementioned ATtiny 402/412 as its core, it also makes use of an integrated circuit FM tuner,  an integrated audio amplifier with its own single speaker, and a small OLED display. The unit also boasts its own lithium-polymer battery charger and its user interface consists of only three buttons, plenty for browsing radio stations and controlling volume.

The entire build fits easily in the palm of a hand and is quite capable for a mobile radio, plus all of the schematics and code is available on the project page. While it doesn’t include AM capability, just the fact that FM is this accessible nowadays when a few decades ago it was cutting-edge technology is quite remarkable. If you’re looking for an even smaller FM receiver without some of the bells and whistles of this one, take a look at this project too.

Hack a Day 06 Jul 21:00
arduino  attiny  audio  code  fm  oled  radio  radio hacks  schematics  speaker  

DIY Handheld Game Puts its Brains on a Removable Cart

Over the years we’ve seen plenty of homebrew handheld game systems that combine an AVR microcontroller, a few buttons, and an small OLED display. We’ve even seen some of them turned into commercial products, such as the Arduboy. They’re simple, cheap, and with the right software, a lot of fun. But being based on an MCU, most of them share the same limitation of only being able to hold a single game at any one time.

But not the Game Card, by [Dylan Turner]. This handheld was specifically designed so that games could be easily swapped out using physical cartridges. But rather than trying to get the system’s microcontroller to boot code from an external flash chip, the system relocates the MCU to the removable cartridge. That might seem a bit overkill, but given how cheap the ATTINY84A on each cartridge is, it’s not exactly going to break the bank.

With the microcontroller on the cartridge, the only hardware that stays behind on the Game Card is the SSD1306 128×64 OLED display, buttons, and the battery. That means the handheld is effectively non-functional unless a game is slotted in, but that could be said of most early cartridge-based game systems as well. On the other hand, it also opens up the possibility of producing cartridges with more powerful microcontrollers down the line.

Using a different microcontroller for each game is a neat hack, but it’s not the only solution to the problem. We previously saw a community effort to add expandable storage to the Arduboy in the form of a DIY cartridge, which ultimately led to the development of an official flash chip upgrade for the handheld.

Assembling the Pro Mini OLED clock shield kit

Customers complained about the lack of documentation on the Pro Mini OLED clock kit.

I listened and I agree. Even though the silkscreen should provide the necessary directions for soldering the parts on the shield itself, adding the Pro Mini board and the OLED display are still ambiguous, especially because there are multiple options.

Here is a quick, but hopefully adequate, step-by-step guide on one way to assemble this clock kit.

1. Make sure you source the correct Pro Mini board, that looks similar to the one in the photos below. It features an ATmega328 clocked at 16MHz.


Note that SCL and SDA (A5, A4 respectively) are broken out. Also, the FTDI connects directly to the side of the Pro Mini board.


2. Program the board itself with the OLED Clock sketch. In Tools/Board, select "Arduino Duemilanove w/ ATmega328". Upload using the FTDI adapter. This step is important because you want to make sure your Pro Mini works before you mount/solder it.

3. Make sure you source the correct I2C 128x64 OLED display, like the one shown below.


The pins at the top must be in the order (left to right) VCC-GND-SCL-SDA or VCC-GND-SDA-SCL.

In case your display has a different arrangement of the pins, e.g. GND-VCC-SCL-SDA, you will need to swap the leftmost two pins, by rewiring the traces (cut, then reconnect) on the shield's PCB (not on the display, which remains untouched), as explained in Step 6.

4. Solder the DS1307, paying attention to the correct orientation (notch up), then the 2 resistors and the crystal.

5. Solder the 2 jumper bridges according to the OLED display you are going to use.


If your OLED has pin 3 and 4 configured as SCL and SDA respectively, then solder the right bridge of the left jumper and the left bridge of the right jumper (see the photo below).


6. Only if necessary
Remember, the Pro Mini OLED shield was designed for I2C OLED displays that have pin 1 as VCC and pin 2 as GND. If that is not the case (as in the photo below),

those first 2 pins must be rewired, as shown (after the traces had been cut and pins isolated).


7. Solder the Pro Mini board on top and close to the OLED shield, using machined male pins (included in the kit). Only the relevant pins, highlighted in the photo below, need to be soldered.


Pay attention, since this is a hard-to-reverse move. Fixing a mistake here involves de-soldering. Also, the parts underneath cannot be (easily) accessed anymore.

8. Solder the 4-pin female header, the 2 buttons and the battery holder, then insert the CR1225 battery, with the correct polarity (+ on top).


9. Insert the OLED display.

10. Power the clock through the FTDI breakout (observe the correct orientation) or by directly wiring VCC and GND to a 5V or battery source.
Any of the 5 clock faces can be selected by pushing simultaneously the 2 buttons.
Pressing each button individually will increment either the hours or the minutes.


 

Enclosure ideas for WiFiChron and other clocks

It turns out that most electronics, even prototypes, can be easily enclosed with Lego. And that means no screws, no glue, no fasteners, zero tools, just the bricks and some imagination.

This is the HDSP clock variant with 1" displays driven by HT16K33 (introduced here). The board was cut and filed (0.5mm on each side) to fit snug between the walls (see this).


Next is a HDSP clock variant with two Adafruit Quad Alphanumeric displays.


Similarly, the PCB was cut and filed a bit. The assembly fits solidly between the bricks (no movement when shaken). As in the previous build, the exposed PCB is kind-of-required to allow access to the two buttons (set hours, set minutes).

Both of the above can be mounted on a Lego wall (as found in schools) or they can desk-stand on their own.

Here is an example of a Lego-encapsulated WifiChron.


The PCB was also filed about 0.5mm on each side to fit between the lateral brick walls. It did not have to be fastened in any other way. The ESP8266 module fits inside nicely. The 3 buttons and the USB mini B connector are all easily accessible from the back.

Below is the Lego version of the Axiris clock.



Since it does not have any buttons, the time is set through Bluetooth (command "SET TIME=hh:mm", sent from Terminal app while BT paired).

And finally, a couple of OLED clocks, both running the same software on similar hardware: pro-mini + OLED shield and wsduino + 2.42" OLED shield, respectively.



Note that this is the prototype version, using a LiPo battery with charger (similar to the one shown here).


Again, all the above enclosures feel solid: nothing moves or rattles when upside down or even shaken. I did not try dropping them though :)

And lastly, the WiFiChron with Adafruit quad 0.56" displays from the previous post, sandwiched between scrap plexiglass plates: