MAX30205 temperature sensor and Arduino YUN 2wei

I made a PCB of MAX30205 by myself.I put a LD1117AL#33 to let 5V down to 3.3V.

This is my circuit.

I also use the I2C scanner to scanning of I2C bus.It is at addr 55.

But now I have a problem.

When I use PCB to connect the pin of 5V in Arduino YUN,YUN will have no power immediately.

These are the code what I used.

The first one is max30205demo.ino.

#include <Wire.h>
#include "ClosedCube_MAX30205.h"

ClosedCube_MAX30205 max30205;

void setup()
{
	Serial.begin(9600);
	Serial.println("ClosedCube MAX30205 Arduino Demo");

	max30205.begin(0x55);
}

void loop()
{
	Serial.print("T=");
	Serial.print(max30205.readTemperature());
	Serial.println("C");
	delay(300);
}

Second is ClosedCube_MAX30205.h.

#ifndef _CLOSEDCUBE_MAX30205_h

#define _CLOSEDCUBE_MAX30205_h
#include <Arduino.h>

typedef enum {
	TEMPERATURE = 0x00,
	CONFIGURATION = 0x01,
	T_HYST = 0x02,
	T_OS = 0x03,
} MAX30205_Registers;

class ClosedCube_MAX30205 {
public:
	ClosedCube_MAX30205();

	void begin(uint8_t address);

	float readTemperature();
	float readT(); // short-cut for readTemperature

private:
	uint8_t _address;
	uint16_t readData(uint8_t pointer);
};

#endif

The last one is ClosedCube_MAX30205.cpp.

#include <Wire.h>
#include "ClosedCube_MAX30205.h"

ClosedCube_MAX30205::ClosedCube_MAX30205()
{
}

void ClosedCube_MAX30205::begin(uint8_t address) {
	_address = address;
	Wire.begin();

    /*
	Wire.beginTransmission(_address);
	Wire.write(CONFIGURATION);
	Wire.write(0x0);
	Wire.endTransmission();
    */
}

float ClosedCube_MAX30205::readT() {
	return readTemperature();
}

float ClosedCube_MAX30205::readTemperature() {
	uint16_t rawT = readData(TEMPERATURE);
	return (rawT * 0.00390625);
}

uint16_t ClosedCube_MAX30205::readData(uint8_t pointer) {
	Wire.beginTransmission(_address);
	Wire.write(pointer);
	Wire.endTransmission();

	delay(10);
	Wire.requestFrom(_address, (uint8_t)2);

	byte msb = Wire.read();
	byte lsb = Wire.read();

	return msb << 8 | lsb;
}

Can anybody help me with this?Thank you veery much. :slight_smile:

Sounds like a power issue.

What is the purpose of R4 and R5?

Why is one of the MAX30205 powered by 5v and the other by 3.3v?

Maybe,but I'm not sure.I'm trying not to blow up my YUN.

The purpose of R4 and R5 is for adjust output voltage.

Because the I2C of MAX30205 needs to work in 3.3V. if I don't pull down 5V to 3.3V,I2C will be compel work at 5V by YUN.So I put the LD1117AL#33.

Those blocks left and right connect to something else? How is this connected to your Yun?

According to the special sheet your regulator has a fixed output.

Those blocks left and right is the point that I connect wires,than I use wires to connect to my YUN.

I use the part of "LD1117A adjustable: application note" in LD1117A datasheet.