SCL3300 Inclinometer

OP #6195133
Lesenswert?

Hat schon mal jemand den SCL3300 zum laufen gebracht?

https://www.murata.com/en-eu/products/sensor/inclinometer/scl3300

Datenblatt:

https://www.murata.com/-/media/webrenewal/products/sensor/pdf/datasheet/datasheet_scl3300-d01.ashx?la=en-gb

Das Teil ist im Vergleich zum Vorgänger recht kompliziert.

Schon das SPI Kommando WHOAMI ($40000091, Datenblatt S. 34) bringt nicht 
den erwünschten Rückgabewert ($1C). Die SPI Schnittstelle ist wohl in 
Ordnung, daran kann es eigentlich nicht liegen.

Habe hier einen Atmega88PA im Einsatz.

Ich könnte die Teile zur Verfügung stellen, wenn jemand auch 
Winkelmesser braucht und hier mithelfen möchte eine Lösung zu finden.
Angehängte Dateien:
#6195276
Lesenswert?

Rainer S. schrieb:
> Schon das SPI Kommando WHOAMI ($40000091, Datenblatt S. 34) bringt nicht
> den erwünschten Rückgabewert ($1C)

Was kommt denn zurück und stimmt der CRC davon?
erste Antwort hast du auch verworfen?
Hast du die timings aus dem Datenblatt beachtet (z.b. 10µS Pause)?
Hast du einen logic Analyzer und/oder digital Oszi und kannst du damit 
mal aufnehmen was auf dem Bus passiert??

Rainer S. schrieb:
> Ich könnte die Teile zur Verfügung stellen, wenn jemand auch
> Winkelmesser braucht und hier mithelfen möchte eine Lösung zu finden.
brauchen eher nein, aber wenns per Ferndiagnose nicht geht könnte man 
nochmals drüber sprechen.
OP #6195294
Lesenswert?

K. S. schrieb:
> Rainer S. schrieb:
>> Schon das SPI Kommando WHOAMI ($40000091, Datenblatt S. 34) bringt nicht
>> den erwünschten Rückgabewert ($1C)
>
> Was kommt denn zurück und stimmt der CRC davon?
Dezimal:       64,      192,       48,      145
Hex:          $40,      $C0,      $30,      $91
Binär    01000000, 11000000, 00110000, 10010001

Für CRC habe ich leider noch keine Funktion.
Das Programm ist in Mikropascal geschrieben.

> erste Antwort hast du auch verworfen?

Ja, ich sende permanent WHOAMI und werte jeweils die letzte Antwort aus.

> Hast du die timings aus dem Datenblatt beachtet (z.b. 10µS Pause)?

Ja, pro Sekunde wird einmal gesendet.

> Hast du einen logic Analyzer und/oder digital Oszi und kannst du damit
> mal aufnehmen was auf dem Bus passiert??

Leider nein.

> Rainer S. schrieb:
>> Ich könnte die Teile zur Verfügung stellen, wenn jemand auch
>> Winkelmesser braucht und hier mithelfen möchte eine Lösung zu finden.
> brauchen eher nein, aber wenns per Ferndiagnose nicht geht könnte man
> nochmals drüber sprechen.

Gut
#6195355
Lesenswert?

0    10000   00     , 11000000, 00110000, 10010001
R/W  Adress  Status   Data                CRC

Status sollte nicht 0b00 sein, das steht für Startup.

Der CRC ist auch derselbe der für die Anfrage gesendet wurde, der 
passende zur Antwort wäre denke ich 0xF8. Hast du vllt. nen Bug der den 
gesendeten CRC übernimmt oder auch mehr der gesendeten Daten, oder ist 
das nur Zufall?

Hast du die Start up Sequenz aus 4.2 / Tabelle 10 auch richtig 
implementiert? Wenn nicht erklärt das den Status und die unbrauchbaren 
Daten.

Das 0xC0 ist "not used", also der falsche Wert
Die ID ist das 0x30, aber solange der Status 0b00 ist bekommst du 
wahrscheinlich nur Müll als Daten.
#6292213
Lesenswert?

Hi Everyone,

I'm new to this forum and hope you can help me with my problem regarding 
the SCL3300 Inclinometer.

When I send WHOAMI I can get the values $43, $00, $C1, $35 which I think 
is okay because of $C1.

But $43 (or binary 0100 0011) might be causing a problem because the 
status is "11" which the manual says is an error. I've tried all means 
but I can't get an okay status of "01".

Because of this problem, I can't set and read the angles. However, I can 
read ACC_X but not ANG_X.

Could you kindly help me please?

Thank you very much.

Allan
#6292554
Lesenswert?

Hi Allan,
I don’t know if this will help exactly, but have you carefully read and 
implemented the startup procedure step by step described in chapter 4.2? 
Additionally there is a hint about a necessary delay in the SPI in 
Figure 9, chapter 5.1.2
Do you have a Logic Analyzer available. The cheapest versions are only a 
few bucks with free software. In can really highly recommend during 
debugging. Having the current szenario documented that way you can get 
in touch with Murata application engineers.
Moderator (Firma: Titel) Persönliche Seite #6292698
Lesenswert?

Allan C. schrieb:
> I've tried all means but I can't get an okay status of "01".
I confirm what Harald A. (embedded) wrote: implement exactly the init 
procedure from the data sheet.

> Because of this problem, I can't set and read the angles. However, I can
> read ACC_X but not ANG_X.
I had and you get that very problem without the correct init sequence.
#6295598
Lesenswert?

Hi Harald,
Thanks for your quick reply.
I have followed the start up sequence as per the datasheet.
1. Startup delay of 2 seconds for both the PIC micro and SCL3300.
2. Sent Status Summary 3 times.
3. Sent Enable Angles.
4. Then sent Read Angle X.
I assume that Mode 1 will be automatically selected by default as I 
didn't select it.
I have also made sure of the 10us delays in between the SPI transfers 
during the write commands.
I still can't read the Angle X.
Please let me know if I have missed anything.
Thanks,
Allan

Antwort schreiben

Bitte melde dich an, um einen Beitrag zu schreiben.

oder

Mit Google-Account einloggen

Die Registrierung ist kostenlos und dauert nur eine Minute.

Jetzt registrieren