JonahTsai / Hempstick

https://www.hempstick.org
11 stars 6 forks source link

MLX90363 #1

Open bruprescott opened 4 years ago

bruprescott commented 4 years ago

Hi JonahTsai,

I wonder if you have implemented the MLX90363 sensor reading? Your project is wonderful, I haven't found anything like it in literature.

I tried to sign up for a forum, but it is blocked for new users.

I await your return. # # #

JonahTsai commented 4 years ago

@bruprescott

No, I have not implemented MLX90363. I lost part of the code during a HDD crash (I was at the point of able to read/write all the config registers. Milan, from MFG Crosswind is using MLX90363 and has a proprietary firmware for it though.

I have no plan in implementing anything new for Hempstick. However, I am planning to implement that in Raspberry Pi for my RudderCore and F16 TQS projects. But you shouldn't hold your breadth; might be months if not years before I get there.

There is however a C example code in MLX90363's application note, MLX90363 Getting Started Guide.

Regarding the Hempstick forum, unfortunately I was on the losing end against the Russian Spammers (obviously hired by some American SEO folx as the products being spammed are all American, from Nike to local house painters etc.). I spend way too much time "policing" and cleaning up the forum. Nobody uses the forum anyway. It's not worth the trouble.

bruprescott commented 4 years ago

It's a shame that you lost the codes!

I built the Hempstick, it works perfectly and is very accurate! Congratulations for dedicating your time to this project. I looked at the example code, but to program MLX90363 it is quite complex. Perhaps using the analog version could be an outlet to solve my problem. I won't be able to use all the available power, but I can test it.

If I ever decide to implement this code, I will be happy to know.

Have an excellent day.

JonahTsai commented 4 years ago

Glad to hear Hempstick works for you.

One of the reasons I am not very keen in reimplementing the MLX90363 code in Hempstick is precisely because I have the option of using MLX90333/316 (requiring a USD $1,500 PTC-04 programmer). And, as a direct Hall replacement for other USB controllers' POTS, MLX90333/316 actually works perfectly, which MLX90363 cannot do. I do have the PTC-04 programmer and always a couple of spare MLX90316/333 lying around. Contact me in private channels if you need some of those programmed.

For my RudderCore project, and other flight sim instrument stuff, I have decided to use RPi and MLX90363.

I am actually currently writing a libmlx90363 (since last week) -- for RPi (existing ones are too bare). I have already got to the point of reading/writing to the EEPROM and reboot the sensor for the EE write values to take effect, and reading stuff back, very reliably (much further than I did last time; but still much work to be done, like designing a pot enclosure to house my own MLX90363 PCB as a test rig required for test cases etc. etc.). And since this library is for *nix, it's much better organized than for embedded (no accommodating ASF's lower level .h file referencing higher level .h file stuff so it couldn't even be compiled into an .a library!).

Even though it's mainly written for RPi, the library is written with an abstraction that requires your version of spi_wrapper.c (I provide one for RPi using libbcm2835), which you can implement your own easily. You know, functions like spi_transfer(char buf, char r_buf, size_t len), etc.

It assumes some .h files and functions like usleep() from *nix but they are not too difficult to port to embedded platforms. Most likely equivalent functions already exists, you just have to find them and change it to call different functions.

In other words, most likely I won't port it to Hempstick myself...

bruprescott commented 4 years ago

@JonahTsai

I ordered some units of the MLX90333 to test.

If you can share the software with me, I thank you. bruno@prescott.com.br

I know about spi transmission.

About the library you are developing it is very good for developing dedicated hardware.

In my case, I'm using the hempstick to control an ROV. The answer is very precise. I am very happy with the results of your hardware.