Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setup wreeks havok on oled & mag #7

Open
shaiss opened this issue May 1, 2018 · 8 comments
Open

setup wreeks havok on oled & mag #7

shaiss opened this issue May 1, 2018 · 8 comments

Comments

@shaiss
Copy link

shaiss commented May 1, 2018

I have a MatekF405 CTR and I've setup the wiring similar to what you've posted. I've uploaded the code provided to an Attiny85 and have it setup on a breadboard. When I have the SDA/SCL lfrom the attiny85 hooked up to the mateks sda/SLC the oled shows garbage characters and inav can't communicate with the mag. if I disconnect those 2 lines, it's fine.

I'm testing this with the HC-SR04 but will switch to the US100 when it gets here.

I'vepulling 3.3v directly off the matek to power the oled and rangefinder circuit. And pulling 5v just for the rangefinder with the regulator and capacitor like in your diagram.

I've tried changing the i2c address to 0xA2 and same thing. Any help would be appreciated and thank you for putting this together!

@DzikuVx
Copy link
Member

DzikuVx commented May 2, 2018

This looks like I2C issue. Shorten cables, lower I2C clock speed. To 100kHz. I2C is very sensitive for wiring quality. I'm successfully running this exact code on Omnibus F4 and Matek F722 with external HMC5883l and baro. But I keep all the wires nice and short

@shaiss
Copy link
Author

shaiss commented May 2, 2018 via email

@shaiss
Copy link
Author

shaiss commented May 2, 2018

I shortened the wires. Removed the oled and still no luck. I do notice when the attiny85 circuit is connected, the mag seems to go in and out. Inav configurator will show mag red for a split second then go back.

In Arduino I'm using the 1mghz clock in the pull down menu. Not sure what I'm missing.

I don't doubt that it works, just I'm doing something wrong probably

@shaiss
Copy link
Author

shaiss commented May 2, 2018

Sorry for the multiple posts. I got a bit closer after figuring out set i2c_speed = 100KHZ. mag seems happy now with attiny 85 connected. I enabled debug in the arduino sketch and added an LED and it lights up when my hand is next to it. in iNav configurator the sonar icon is blue, but when I go to sensors, the graph stays flat and doesn't change. So getting slightly closer. Thank you for the help!

@DzikuVx
Copy link
Member

DzikuVx commented May 3, 2018

If sensor is detected but no readouts, then problem is somewhere between sonar and ATtiny

@shaiss
Copy link
Author

shaiss commented May 3, 2018

Even if the debug led is working as expected? It only turns on when my hand is infront of it. Thx again for the help! I'm trying my best to figure out what I'm doing wrong here. ty!

@juanete2245
Copy link

Tengo un MatekF405 CTR y configuré el cableado de manera similar a lo que ha publicado. He subido el código proporcionado a un Attiny85 y lo he configurado en una placa. Cuando tengo el SDA / SCL del attiny85 conectado al mateks sda / SLC, el oled muestra caracteres basura e inav no puede comunicarse con el mag. si desconecto esas 2 líneas, está bien.

Estoy probando esto con el HC-SR04, pero cambiaré al US100 cuando llegue.

He sacado 3.3v directamente del matek para alimentar el circuito oled y el telémetro. Y tirando de 5v solo para el telémetro con el regulador y el capacitor como en su diagrama.

Intenté cambiar la dirección i2c a 0xA2 y lo mismo. ¡Cualquier ayuda será apreciada y gracias por armar esto!

hola amigo soy nuevo aqui , estoy tratando de ponerle el sonar f7 sin exito Ya prepare todo pero no puedo compilar el programa ;dice que faltan declarar bibliotecas y la verdad que no entiendo nada de programacion, podrias enviarme un a copia del codigo que pudiste subir , porque vengo intentando y no logro compilarlos.saludos y gracias

@juanete2245
Copy link

tenia un usbasp pero no pude ni quemar el attiny,compre un arduino uno r3 y al fin pude quemarlo.El problema es que no compila el inav_i2c_sonar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants