meta data for this page
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| sensor:ina219 [2026/02/13 15:34] – vamsan | sensor:ina219 [2026/02/13 15:58] (current) – [I²C topics on lamaPLC] vamsan | ||
|---|---|---|---|
| Line 16: | Line 16: | ||
| * **Multi-Function Reporting: | * **Multi-Function Reporting: | ||
| * **Programmability: | * **Programmability: | ||
| - | * **Daisy-Chaining: | + | * **Daisy-Chaining: |
| **Safety & Limitations** | **Safety & Limitations** | ||
| Line 23: | Line 23: | ||
| * **Inductive Loads:** Users should be cautious with large motors, as //" | * **Inductive Loads:** Users should be cautious with large motors, as //" | ||
| + | ====== CJMCU-219 Pinout ====== | ||
| + | {{ : | ||
| + | **Logic and Power Pins** | ||
| + | |||
| + | These pins connect to your microcontroller (e.g., Arduino or Raspberry Pi) to power the sensor and transmit data. | ||
| + | |||
| + | * **VCC:** Supply voltage for the module (**3.0V to 5.5V**). | ||
| + | * **GND:** Common ground for both power and logic. | ||
| + | * **SCL:** I²C serial clock line. | ||
| + | * **SDA:** I²C serial data line. | ||
| + | |||
| + | **Measurement (Load) Pins** | ||
| + | |||
| + | These pins are placed in series with the positive side (high-side) of the circuit you want to monitor. | ||
| + | |||
| + | * **Vin+:** Connect to the positive terminal of your power source (e.g., battery). | ||
| + | * **Vin-:** Connect to the positive terminal of your load (the device being powered). | ||
| + | |||
| + | **I²C addressing Pins (A0 & A1)** | ||
| + | |||
| + | Some versions of the CJMCU-219 include solder pads labeled **A0** and **A1**. By default, these are connected to GND, setting the I2C address to **0x40**. | ||
| + | |||
| + | Bridging these pads to VCC allows you to set the address to any of 16 values (**0x4F**), enabling multiple sensors on the same I²C bus. | ||
| + | |||
| + | <color red> | ||
| ==== Arduino wiring ==== | ==== Arduino wiring ==== | ||
| * VCC → Arduino 5V (o 3.3V). | * VCC → Arduino 5V (o 3.3V). | ||
| Line 32: | Line 57: | ||
| ==== Arduino code ==== | ==== Arduino code ==== | ||
| - | To begin using the CJMCU-219 with Arduino, the easiest | + | To begin using the CJMCU-219 with Arduino, the easiest |
| - | This example code sets up the sensor and outputs voltage, current, and power readings to the Serial Monitor at 115200 baud. | + | This example code sets up the sensor and outputs voltage, current, and power readings to the Serial Monitor at **115200 baud**. |
| A simple example with the Adafruit_INA219 library involves initializing the sensor and repeatedly reading and displaying bus voltage, shunt voltage, load voltage, current, and power. The complete code is available in the provided source document. | A simple example with the Adafruit_INA219 library involves initializing the sensor and repeatedly reading and displaying bus voltage, shunt voltage, load voltage, current, and power. The complete code is available in the provided source document. | ||
| Line 102: | Line 127: | ||
| * **setCalibration_16V_400mA(): | * **setCalibration_16V_400mA(): | ||
| - | ==== Example codes ==== | ||
| - | none | ||
| ===== I²C topics on lamaPLC ===== | ===== I²C topics on lamaPLC ===== | ||
| {{topic> | {{topic> | ||
| Line 110: | Line 133: | ||
| \\ | \\ | ||
| - | {{tag>ENS160 ScioSense gas-quality | + | {{tag>CJMCU-219 INA-219 INA219 breakout_board |
| This page has been accessed for: Today: {{counter|today}}, | This page has been accessed for: Today: {{counter|today}}, | ||