Posts | Comments

Planet Arduino

Archive for the ‘Electronics’ Category

tebl on GitHub has built three projects to enhance radio-controlled cars using microcontrollers programmed in Arduino.

Module Description
RC Light System A functional light system for RCs. It’s big, bulky and does mostly what I want it to do.
RC Exhaust Controls an RGB LED mounted inside the exhaust pipe of an RC. On heavy throttle it starts glowing red, ease up on the throttle afterwards and you get flashing colours as it backfires.
RC Dashboard Connected to the receiver, it shows a digital throttle gauge on a small OLED-screen.

Check it all out on GitHub.

Boards Guide 2024: Boards Are Back

From Make: Vol. 87: New evolutions in dev boards make this a metamorphic period for Makers.

The post Boards Guide 2024: Boards Are Back appeared first on Make: DIY Projects and Ideas for Makers.

Smarter Serial Communications with WiSer

Surely you’ve been there: you need to capture serial output from a microcontroller or other device, so you reach for a PL2303 or CP210x or FT232RL-based USB-to-TTL serial cable (if you can remember where you put the damn thing after you last used it!) and…realize you don’t have the drivers installed on the computer you […]

The post Smarter Serial Communications with WiSer appeared first on Make: DIY Projects and Ideas for Makers.

If you search for ‘Arduino’ and ‘weighing’ you very quickly come across the HX711 board module and an associated world of strain gauges and load cells.

All this looked interesting with some learning along the way. The result is that I took a dive into the subject and ended up with some new knowledge and ideas for the future.

In this first part I cover the hardware requirements and in the next how to write software to implement a weighing system.

The HX711 ADC

The HX711 is a precision 24-bit Analog to Digital Converter (ADC) designed for weigh scales and industrial control applications. It readily obtainable from all the usual online marketplaces as ready-made modules implementing the standard datasheet circuit.

The IC interfaces directly with a up to two Wheatstone Bridge load cell’s differential outputs and incorporate signal amplifiers.

Channel A differential input can be programmed with a gain of 128 or 64. Channel B has a fixed gain of 32.

Large gains are needed to accommodate the small output signal from the sensor. When a 5V supply is used for the sensor, the gain corresponds to a full-scale differential input voltage of ±20mV with gain 128, ±40mV for 64 and ±80mV for 32.

Load Cells

Load cells come in various shapes and are rated from 0.1kg to over 1000kg full scale. They come in many different types of form factors but the two most common are bar and strain gauge types.

Bar-type Load Cells

Bar type load cells are straight bars with strain gauges attached to the point where it has maximum bending. A variant of straight bar is the S type cell design for tension (pulling) applications.

Each load cell has four strain gauges connected in a Wheatstone Bridge formation. The labeled colors correspond to the color-coding convention coding of load cells. Red, black, green and white wires are connected to the load cell’s strain gauge and yellow is an optional ground or shield wire to lessen EMI.

The direction of the force arrow labels on the load cells must match the direction of resultant force. If the resultant force is straight down (the usual in a weighing application) then the load cells must be installed so with the force arrow labels pointing down.

Strain Gauge Load Cells

Strain gauge load cells are commonly seen on the corners of bathroom scales and similar ‘platform’ type applications. Each load cell is a half Wheatstone bridge, as shown below.

This type of load cell must be combined into a circuit of 2 or 4 gauges to create the full Wheatstone bridge, with each side of the bridge including the strain resistors from two of the strain gauge load cells. The circuit for combining four strain gauges is illustrated below.

A simple way to combine the wiring is to create a Combinator Board. Here the wires from the individual strain gauge cells are joined in a hub arrangement, producing the required Wheatstone Bridge connections. Shown below is the hub connection for a four sensor configuration.

Module Wire Connections

The HX711 module’s A channel interfaces to the load cell through four wires labeled E+ (or RED), E- (BLK), A-(WHT), A+(GRN), and an optional shielding ground SD(YLW) on the circuit board.

The B Channel interfaces to a separate load cell through the E+, E- (common with Channel A) and B+, B- connections on the circuit board.

E+ and E- are the positive voltage and ground connections to load cell; the A+/A-, B+/B- the differential outputs from the load cell.

The module is connected to the processor’s power supply (Vcc and GND) and 2 additional processor digital input pins to the module’s DAT (or DT) and CLK (or SCK). These digital pins are used to manage the limited configuration options available and read the data from the HX711.

Hardware Control

Sampling Rate

The HX711 can sample at 10 samples per second (SPS or Hz) or 80Hz, set by the RATE pin on the IC.

Some module boards have a jumper on the reverse side of the board to set the rate, as shown below. Connecting RATE to 1 (Vcc) sets 80Hz and 0 (GND) is 10Hz.

Data Read and Gain Control

CLK is set by the processor, DAT is read by the processor. These two
digital signals make up the serial interface to the HX711.

CLK should be kept LOW by the processor unless clocking during a read cycle.

The data is read as 24 bits clocked out, one bit per clock cycle, from the HX711. Additional clock transitions (+1 to +3) are used to set the mode for the next read cycle according to the handshaking sequence below.

  • When an ADC reading is not available, DAT is set HIGH by the HX711. CLK is held LOW by the processor.
  • When DAT goes to LOW, the next ADC conversion can be read by the processor.
  • The processor sends 25 to 27 positive (transition LOW to HIGH) CLK pulses to shift the data out through DAT one bit per clock pulse, starting with the most significant bit (MSB), until all 24 data bits are shifted out.
  • The HX711 will then hold DAT HIGH for the remainder of the clock pulses.
  • Channel and Gain selection for the next read is controlled by the number of additional CLK pulses (+1 to +3) send to the HX711, for a total of 25 to 27 clock pulses as shown in the table below.
Clock PulsesInput ChannelGain
25A128
26B32
27A64

Fewer than 25 and more than 27 clock pulses in one communication cycle will cause a serial communication error requiring a HX711 reset.

Reset and Power Down Sequence

When power is first applied, the power-on circuitry will reset the IC.

The CLK output from the processor is also used to reset the HX711 IC.

When CLK is

  • LOW, the HX711 is in normal working mode.
  • changed from LOW to HIGH and stays HIGH for longer than 60μs, the HX711 is powered down. It remains in this state while the signal remains high.
  • changed from HIGH to LOW, the HX711 resets and restarts normal working mode.

Following a reset the hardware defaults to Channel A input, gain 128.


In Part 2 we’ll look at the software for this module and how to use the hardware/software to implement a weigh scale system.

If you search for ‘Arduino’ and ‘weighing’ you very quickly come across the HX711 board module and an associated world of strain gauges and load cells.

All this looked interesting with some learning along the way. The result is that I took a dive into the subject and ended up with some new knowledge and ideas for the future.

In this first part I cover the hardware requirements and in the next how to write software to implement a weighing system.

The HX711 ADC

The HX711 is a precision 24-bit Analog to Digital Converter (ADC) designed for weigh scales and industrial control applications. It readily obtainable from all the usual online marketplaces as ready-made modules implementing the standard datasheet circuit.

The IC interfaces directly with a up to two Wheatstone Bridge load cell’s differential outputs and incorporate signal amplifiers.

Channel A differential input can be programmed with a gain of 128 or 64. Channel B has a fixed gain of 32.

Large gains are needed to accommodate the small output signal from the sensor. When a 5V supply is used for the sensor, the gain corresponds to a full-scale differential input voltage of ±20mV with gain 128, ±40mV for 64 and ±80mV for 32.

Load Cells

Load cells come in various shapes and are rated from 0.1kg to over 1000kg full scale. They come in many different types of form factors but the two most common are bar and strain gauge types.

Bar-type Load Cells

Bar type load cells are straight bars with strain gauges attached to the point where it has maximum bending. A variant of straight bar is the S type cell design for tension (pulling) applications.

Each load cell has four strain gauges connected in a Wheatstone Bridge formation. The labeled colors correspond to the color-coding convention coding of load cells. Red, black, green and white wires are connected to the load cell’s strain gauge and yellow is an optional ground or shield wire to lessen EMI.

The direction of the force arrow labels on the load cells must match the direction of resultant force. If the resultant force is straight down (the usual in a weighing application) then the load cells must be installed so with the force arrow labels pointing down.

Strain Gauge Load Cells

Strain gauge load cells are commonly seen on the corners of bathroom scales and similar ‘platform’ type applications. Each load cell is a half Wheatstone bridge, as shown below.

This type of load cell must be combined into a circuit of 2 or 4 gauges to create the full Wheatstone bridge, with each side of the bridge including the strain resistors from two of the strain gauge load cells. The circuit for combining four strain gauges is illustrated below.

A simple way to combine the wiring is to create a Combinator Board. Here the wires from the individual strain gauge cells are joined in a hub arrangement, producing the required Wheatstone Bridge connections. Shown below is the hub connection for a four sensor configuration.

Module Wire Connections

The HX711 module’s A channel interfaces to the load cell through four wires labeled E+ (or RED), E- (BLK), A-(WHT), A+(GRN), and an optional shielding ground SD(YLW) on the circuit board.

The B Channel interfaces to a separate load cell through the E+, E- (common with Channel A) and B+, B- connections on the circuit board.

E+ and E- are the positive voltage and ground connections to load cell; the A+/A-, B+/B- the differential outputs from the load cell.

The module is connected to the processor’s power supply (Vcc and GND) and 2 additional processor digital input pins to the module’s DAT (or DT) and CLK (or SCK). These digital pins are used to manage the limited configuration options available and read the data from the HX711.

Hardware Control

Sampling Rate

The HX711 can sample at 10 samples per second (SPS or Hz) or 80Hz, set by the RATE pin on the IC.

Some module boards have a jumper on the reverse side of the board to set the rate, as shown below. Connecting RATE to 1 (Vcc) sets 80Hz and 0 (GND) is 10Hz.

Data Read and Gain Control

CLK is set by the processor, DAT is read by the processor. These two
digital signals make up the serial interface to the HX711.

CLK should be kept LOW by the processor unless clocking during a read cycle.

The data is read as 24 bits clocked out, one bit per clock cycle, from the HX711. Additional clock transitions (+1 to +3) are used to set the mode for the next read cycle according to the handshaking sequence below.

  • When an ADC reading is not available, DAT is set HIGH by the HX711. CLK is held LOW by the processor.
  • When DAT goes to LOW, the next ADC conversion can be read by the processor.
  • The processor sends 25 to 27 positive (transition LOW to HIGH) CLK pulses to shift the data out through DAT one bit per clock pulse, starting with the most significant bit (MSB), until all 24 data bits are shifted out.
  • The HX711 will then hold DAT HIGH for the remainder of the clock pulses.
  • Channel and Gain selection for the next read is controlled by the number of additional CLK pulses (+1 to +3) send to the HX711, for a total of 25 to 27 clock pulses as shown in the table below.
Clock PulsesInput ChannelGain
25A128
26B32
27A64

Fewer than 25 and more than 27 clock pulses in one communication cycle will cause a serial communication error requiring a HX711 reset.

Reset and Power Down Sequence

When power is first applied, the power-on circuitry will reset the IC.

The CLK output from the processor is also used to reset the HX711 IC.

When CLK is

  • LOW, the HX711 is in normal working mode.
  • changed from LOW to HIGH and stays HIGH for longer than 60μs, the HX711 is powered down. It remains in this state while the signal remains high.
  • changed from HIGH to LOW, the HX711 resets and restarts normal working mode.

Following a reset the hardware defaults to Channel A input, gain 128.


In Part 2 we’ll look at the software for this module and how to use the hardware/software to implement a weigh scale system.

Mega Arduino announcement has GIGA impact

As useful as the venerable Uno can be for many projects, when makers need more IO, more power, more…everything, they typically find themselves reaching for the beefier, connector-laden Arduino Mega. At least they might have…until the announcement of the new GIGI RE WiFi (sic), the most powerful Arduino board for makers. Built on the Mega’s […]

The post Mega Arduino announcement has GIGA impact appeared first on Make: DIY Projects and Ideas for Makers.

Embedded LEDs Make The Coolest Birthday Cake You’ve Ever Seen

Natasha Dzurny turned out this really cool project for Element 14. In short, she makes a birthday cake shaped display using flexible LED matrixes. Inspired by Lizzo’s birthday anthem, Natasha decided to make a whole party in the shape of a cake. She started with an Arduino Nano 33it and two LED matrixes and ended […]

The post Embedded LEDs Make The Coolest Birthday Cake You’ve Ever Seen appeared first on Make: DIY Projects and Ideas for Makers.

Who Stepped Up When the Chips Were Down?

It’s been another tumultuous year in the world of embedded electronics. Supply chain snags have scarcely relented, while new chips jostle for position as the maker’s go-to. Meanwhile, lots of exciting new boards, software, and other technologies let us continue to innovate. Let’s survey the maker landscape and see who stepped up when the chips were […]

The post Who Stepped Up When the Chips Were Down? appeared first on Make: DIY Projects and Ideas for Makers.

Who Stepped Up When the Chips Were Down?

We can’t hardly wait for the chip shortage to be over and dev boards to be abundant again, but instead of waiting for somebody to fix the supply chain, we’ve gathered a list of near substitutes and potential replacements for your next project. Unsatisfied with back-orders for your favorite Raspberry Pi or Arduino? Use the […]

The post Who Stepped Up When the Chips Were Down? appeared first on Make: DIY Projects and Ideas for Makers.

TinyCircuits Tiny TV 2 is a Teeny Televisual Triumph

TinyCircuits are no strangers to crowdfunding, with successful campaigns going back as far as 2015’s TinyDuino, and as recent as last year’s keychain-sized console Thumby. They have even offered a tiny TV before, so what makes their latest Kickstarter campaign unique? We went hands-on with a pre-production prototype to find out! The original Tiny TV […]

The post TinyCircuits Tiny TV 2 is a Teeny Televisual Triumph appeared first on Make: DIY Projects and Ideas for Makers.



  • Newsletter

    Sign up for the PlanetArduino Newsletter, which delivers the most popular articles via e-mail to your inbox every week. Just fill in the information below and submit.

  • Like Us on Facebook