Hi there,
After trying to find it on google with no result I'll try to formulate my question here:
I can't connect to my AS5600 encoder, I tried many wiring diagrams but the same issue persists, it doesn't connect or receive anything.
First run the I2C scan program and see if its address shows up. Also post a simple schematic showing exactly how it is wired up, we cannot see what you do. We have no clue as to what Arduino you are using. It also appears the code is secret, without the code we cannot help with that.
//
// FILE: AS5600_position.ino
// AUTHOR: Rob Tillaart
// PURPOSE: demo
// DATE: 2022-12-20
#include "AS5600.h"
#include "Wire.h"
AS5600 as5600; // use default Wire
void setup()
{
Serial.begin(115200);
Serial.println(__FILE__);
Serial.print("AS5600_LIB_VERSION: ");
Serial.println(AS5600_LIB_VERSION);
// ESP32
// as5600.begin(14, 15);
// AVR
as5600.begin(4); // set direction pin.
as5600.setDirection(AS5600_CLOCK_WISE); // default, just be explicit.
Serial.println(as5600.getAddress());
int b = as5600.isConnected();
Serial.print("Connect: ");
Serial.println(b);
delay(1000);
}
void loop()
{
static uint32_t lastTime = 0;
Serial.print("test");
// set initial position
as5600.getCumulativePosition();
// update every 100 ms
// should be enough up to ~200 RPM
if (millis() - lastTime >= 100)
{
lastTime = millis();
Serial.print(as5600.getCumulativePosition());
Serial.print("\t");
Serial.println(as5600.getRevolutions());
}
// just to show how reset can be used
if (as5600.getRevolutions() >= 10)
{
as5600.resetPosition();
}
}
// -- END OF FILE --
I am not familiar with the part but it appears it is connected properly. Rob Tillaart is a genius with the arduino libraries and I have yet to have a problem with any of his libraries. The data sheet at: https://www.mouser.com/pdfdocs/AMS_AS5600_Datasheet_EN.PDF shows how to set it up in figure 24, have you followed that? I would assume the library works and you may have a bad part.
I do not know either. If you can try something else that uses the I2C system and be sure your pull up resistors are in the 3-4K range for 5V. I have seen 10K pull up resistors behave a bit flakey on some setups.
Not exactly but probably yes. You need to connect them between the 5V (assuming the processor runs at 5V) one to SCL and another to SDA. Can you post a link to your exact unit, I am finding 5V and 3.5 volt units. The pull up cannot exceed the chips operating voltage so if the arduino and the AS5600 are at 5 volts great. Check this link, I think this is what you have.