ich habe gestern einen ADNS3080 optical Flow Sensor gekauft und wollte
die dx/dy Werte rauslesen. (siehe Anhang)
Um die Werte auszulesen benutze ich den Mikrocontroller Arduino Uno.
Wenn der Sensor mit einer Spannung versorgt wird, sollte eine kleine
Leuchte auf der Platine leuchten. Normalerweise sollte der Sensor
mittels 5V Betriebsspannung betrieben werden. Doch wenn ich den 5V Pin
mit meinem Mikrocontroller verbinde, leuchtet die Leuchte nicht.
Seltsamerweise leuchtet Sie mit 3,3V.
Den Code habe ich aus dem Internet übernommen, um zu gucken ob überhaupt
der Sensor funktioniert.
Doch irgendwie bekomme ich immer, dass mein Sensor nicht initialisiert
ist. Das heißt ich habe keine Kommunikation zu dem Sensor. Woran könnte
das liegen?
Habe den Code jetzt mit einen Mega und Uno versucht. Bei beidem die
selben Fehler...
Aber ich bekomme trotz allem keine richtige Kommunikation zum Sensor. Der ID-Wert des Sensor muss laut dem Register 0x17 23 sein, bei mir kommt immer 0 raus. Habe hier nochmal einen aktuelle Code von mir.
Der Sensor ist mir unbekannt, aber ich möchte nochmal auf #1 verweisen:
DrDiettrich:
Ob der an einem 5V Controller funktioniert, würde ich erst mal bezweifeln.
Einen Sensor mit 3,3 V an einen UNO/Mega mit 5 V auf den Datenleitungen zu verbinden, ist grundsätzlich keine gute Idee. Da sollte für SPI eine Pegelwandlung vorgesehen werden.
Verwendest Du das nackte IC oder eine Platine? Bei Platinen habe ich einen 5V-Pin neben GND gesehen. Hier könnte ein Link zur verwendeten Hardware nützlich sein, Dir zu helfen.
Ein "nichtleuchten" einer LED hört sich
zunächst mal nach kein Saft, oder zu viel Saft gehabt an.
Nur, weil ich interesse halber Deinem Link gefolgt bin...
(Siehe Anhang)
After weeks of going nuts over this sensor I could not get this sensor to work. I recruited many friends to look at this and still couldnt get it to work. I ended up giving up and buying another flow sensor.
I was using this same code from Neumi, Simon Winder and Lazalus and digging through the datasheet.
I believe I got it to work. So in all the examples the jumper cables are attached to the actual header pins 10,11,12,13 etc. These DO NOT work for some reason as indicated in this video :
I got this code to work by hooking up the serial pins(MOSI,MISO,SCK,RST,VCC,GND) to the ICSP header pins in the orientation as described in the image at the bottom of in this link; SPI - Arduino Reference
I have never encountered an issue with serial com in the digital pins on the side but for some reason this does not work.
I moved the CS pin to pin 10 and RST to pin 9 in my code that worked. I dont know if those need to be in any particular header also.
There are a lot of comments about this same issue around the web but I could not find a solution
After weeks of going nuts over this sensor I could not get this sensor to work. I recruited many friends to look at this and still couldnt get it to work. I ended up giving up and buying another flow sensor.
I was using this same code from Neumi and Simon Winder and also spent a lot of time digging through the datasheet.
I believe I got it to work. So in all the examples the jumper cables are attached to the actual header pins 10,11,12,13 etc. These DO NOT work for some reason contrary to whats indicated in this video :
I got this code example code above to work by hooking up the serial pins(MOSI,MISO,SCK,RST,VCC,GND) to the ICSP header pins in the orientation as described in the image at the bottom of in this link; SPI - Arduino Reference
I have never encountered an issue with serial com in the digital pins headers VS ICSP but for some reason this does not work with this serial communication.
I moved the CS pin to pin 10 and RST to pin 9 in my code that worked. I dont know if those need to be in any particular header also.