Replies: 2 comments 1 reply
-
Hi,
I hope you manage or have already managed to get your problem under control. best regards |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hallo Jonas,
ich antworte mal auf Deutsch, da du, wie ich inzwischen gesehen habe, ja auch Deutscher bist.
Aber erst einmal vielen Dank für deine Nachricht und die nette Bibliothek für den Sensor + Dokumentation!
Ich habe den Sensor inzwischen zum Laufen gebracht. Deine aufgeführten Punkte 2 und 3 waren scheinbar nicht das Problem, sondern folgendes:
Der STM32 Nucleo-F401RE besitzt neben anderen Pinouts auch genau die gleichen wie der Arduino UNO. Das hat STM extra so gemacht, um den Microcontroller
möglichst einfach wie einen leistungsfähigeren Arduino UNO zu verwenden, außerdem passen so auch die Shields für den UNO auf den STM32.
Deshalb hatte ich den Sensor AS5147P so verkabelt, wie du es so ausführlich in deiner Dokumentation auf Github beschrieben hast, nämlich als wäre er an an einem UNO angeschlossen. Scheinbar funktioniert das nicht, obwohl ich eigentlich keinen Grund sehe, warum es nicht so funktionieren sollte. Man bekommt dann jedenfalls nur 0.00 auf dem seriellen Monitor angezeigt.
Ich habe dann noch einmal in das Datenblatt des Sensors geschaut (AS5147P eval kit) und ihn so verkabelt, wie es auf Seite 8 von 12 dargestellt ist.
Das heißt, der Sensor bekommt 3,3 Volt vom STM32 auf die Pins für 5V und 3.3V. Das funktioniert jetzt einwandfrei!
Das müsste auch identisch der Konfig sein, die du für die anderen Boards geschrieben hattest.
Noch einmal vielen Dank und alles Gute!
Lukas
…________________________________
Von: Jonas Merkle [JJM] ***@***.***>
Gesendet: Donnerstag, 10. Februar 2022 07:31
An: jonas-merkle/AS5047P ***@***.***>
Cc: Lukas319 ***@***.***>; Author ***@***.***>
Betreff: Re: [jonas-merkle/AS5047P] Can't connect to the AS5047P sensor! Please check the connection... (Discussion #36)
Hi,
unfortunately I don't have a STM Nucleo board handy to test the sensor in combination with this board.
Basically I see three possible problems:
1. There could be a problem, depending on how exactly you connected the sensor... For example if the sensor runs in 5V mode and the board with 3,3V.
2. I am not sure if the SPI library on the STM board is not fully compatible with the implementation on the AVR Arduino boards (like the Arduino Uno).
3. the error message can also occur if e.g. the STM chip initializes the sensor faster than it is even started. maybe a delay before initializing the sensor helps.
I hope you manage or have already managed to get your problem under control.
best regards
—
Reply to this email directly, view it on GitHub<#36 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AXF6JF22ETE7RI4UMPH6MU3U2PR5RANCNFSM5LM4ETRQ>.
Triage notifications on the go with GitHub Mobile for iOS<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
jonas-merkle
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi!
First thank you very much for your library!
I just started with STM32 Nucleo 64 and when I try to read from the encoder I get the message you can see in the title.
I double checked the connection but I can't find what's wrong with it. I am using the AS5047P-TS_EK_AB board by the way.
The connections for the pins are the same as in your readme. I also checked which pins on the Nucleo I have to use as if it were an Arduino UNO.
Thank you very much for help!
Beta Was this translation helpful? Give feedback.
All reactions