Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/yasir-shahzad/cs5530_adc_arduino_library

CS5530 Weight scale sensor
https://github.com/yasir-shahzad/cs5530_adc_arduino_library

arduino cs5530 esp32 esp8266 load-cell weight

Last synced: about 6 hours ago
JSON representation

CS5530 Weight scale sensor

Awesome Lists containing this project

README

        

# Arduino CS5530
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)
[![Installation instructions](https://www.ardu-badge.com/badge/CS5530.svg?)](https://www.ardu-badge.com/CS5530)
[![Commits since latest](https://img.shields.io/github/commits-since/yasir-shahzad/CS5530/latest)](https://github.com/yasir-shahzad/CS5530/commits/master)
[![Build Status](https://github.com/yasir-shahzad/CS5530/workflows/LibraryBuild/badge.svg)](https://github.com/yasir-shahzad/CS5530/actions)
![Hit Counter](https://visitor-badge.laobi.icu/badge?page_id=yasir-shahzad_CS5530)

An [Arduino](https://arduino.cc/) library for sending and receiving data using [Cirrus logic CS5530](https://www.lora-alliance.org/) .

## Compatible Hardware

* [CS5530](https://www.cirrus.com/products/cs5530/) based boards including:
* [CS5530 Shield v1.0](https://www.aliexpress.com/item/1005002054335619.html)
* [CS5530 Sheild v2.0](https://www.aliexpress.com/item/1005002394037116.html)

### Cirrus logic CS5530 wiring

| Cirrus logic CS5530 | Arduino |
| :---------------------: | :------:|
| VCC | 5.0V |
| GND | GND |
| SCK | SCK |
| SDO | MISO |
| SDI | MOSI |
| NSS | 10 |

`NSS` pin can be changed by using `cell.setPin(ss)`.

**NOTES**:
* Some boards (like the Arduino Nano), cannot supply enough current for the CS5530 in TX mode. This will cause lockups when sending, be sure to use an external 3.3V supply that can provide at least 120mA's when using these boards.
* If your Arduino board operates at 5V or 3.3V, no need to use a level converter for the wiring to the Cirrus logic CS5530 module.

## Installation

### Using the Arduino IDE Library Manager

1. Choose `Sketch` -> `Include Library` -> `Manage Libraries...`
2. Type `CS5530` into the search box.
3. Click the row to select the library.
4. Click the `Install` button to install the library.

### Using Git

```sh
cd ~/Documents/Arduino/libraries/
git clone https://github.com/yasir-shahzad/CS5530
```

## API

See [API.md](API.md).

## Examples

See [examples](examples) folder.

## FAQ

**1) Initializing the CS5530 is failing**

Please check the wiring you are using matches what's listed in [Cirrus logic CS5530](# Cirrus logic CS5530-wiring). You can also use `cell.setPins(ss)` to change the default pins used. You can call `cell.setSPIFrequency(frequency)` to lower the SPI frequency used by the library. Both API's must be called before `cell.begin(...)`.

**2) Is CS5530 MSBFIRST or LSBFIRST?**

If we see in the data sheet we can clearly see the CS5530 is MSBFIRST.

**3) Which SPI mode does CS5530 uses?**

if we see at Cpoles and Cphases in data-sheet, we can clearly analize from graphs that it's SPI_MODE0.

**4) Does it SPI works on fixed frequency?**

No, It's SPI work on different frequency ranges.

**5) Can this library be used for CS5532 or CS5534?**

Yes, It's SPI communication works on all the cirrus logic chips. But you have to change register configurations.

## License

This libary is [licensed](LICENSE) under the [MIT Licence](https://en.wikipedia.org/wiki/MIT_License).