CS1237 24-bit ADC, a potential HX711 alternative!
HTML-код
- Опубликовано: 27 ноя 2024
- In this video, I show you this small, but powerful 24-bit ADC. This chip could be a good replacement for the well-known HX711 chip, especially because it can achieve much higher sampling rates.
Please visit my website for more resources:
www.curioussci...
Join my channel membership: / @curiousscientist
Get the relevant components using my affiliate links:
curiousscienti...
A very detailed and interesting video, thank you!
I am happy to hear that you like it! Cheers!
It would be nice to see the PIO used for this application on the RP2040. I've written the reverse, a HX711 emulator on the RP2040 for a hardware in the loop test tool. It enables me to simulate a strain gauge input and demand whatever mass I need to perform a test. I use the Pico SDK which is excellent and well-documented.
I might look at it in the future, but right now I want to focus on other projects related to this ADC.
Hello , i just got the same exact module to test on a load cell , woul you recommend using on board voltage reference if my load cell works on 5v?
Hi! Yes, it should work.
Would you recommend it better than NAU 7802?
I don't have the complete comparison of these two I my head, so it is better that you read their datasheet. I have no idea what your requirements are. This one can reach higher sampling frequency than the NAU7802. But maybe sampling frequency is irrelevant for you.
Is the pinout diagram at 5:30 correct? It looks like reference is connected to an NC pin (or the 'cathode' pin, if the chip is rotated 180). Thanks for the video!
It should be correct, check how a shunt reference works. This is not an "IC-type" of reference.
Nice job! It's possible to conecte multi CS1237 to read multi load cells on the same arduino board?? for example, connecte 6 load cell to 6 CS1237 to one arduino Mega.
Thanks! Absolutely! You just need to define more DRDY_DOUT and SCLK pin pairs. and read them back accordingly.
One thing you can do if you use my code is to pass the pin numbers as parameters to the functions. Then you can generalize all functions and call them with the desired module you want to communicate with.
@@CuriousScientist thank you so much!! What I want to do is use a strain gauge (load cell) to read the deformation at different points under dynamic load, so I'm thinking of using this configuration with multiple channels and an SD module for data logging. Do you think I can get low noise and high sensitivity with this configuration at a high sample rate?
@@diogolopes5777 It depends on what is your acceptance level. Check the datasheet and test the hardware to get an actual idea about the performance.
@@CuriousScientist thank you, I'll check the data sheet, do some more research and run some tests.
Thanks again and keep up the excellent work!! 😃
@diogolopes5777 thanks! Have fun with the project!
One side of R1 is connected to AVDD can you tell where the other side of R1 is connected?
Hi! It goes to C3 which is then connected to DGND.
Very nice job! but isn' t it too noisy? 24 bits declared, but it seems that noise free are far way low than declared... or is it just because there is basically no filtering???
Thanks! Yes, noise is there for multiple reasons. PGA and sample rate also influence the noise, I didn't use any averaging, it was a bare PCB on a breadboard...etc. but I have further plans with this circuit where I will try to bring down the noise and understand the features better. Cheers!
Yes, even with the lowest sample rate of 10 Hz and PGA = 1, I'm noticing less than 15 bits of information from the ADC from the video. Very poor performance indeed!
I'm guessing you are using AGND for negative input, which should be fine if PGA = 1 or 2 according to the datasheet.
ADS1115 will be a better choice in many cases.
When operated at 5 V, the effective resolution (ENOB) can reach up to 20 bits, and when operated at 3.3 V, it should reach up to 19.5 bits, according to the datasheet. Since this ADC is not too much discussed on the internet, I will do a couple of more videos on it and will try to investigate its capabilities further. In fact, I bought the bare chips and the same voltage reference a while ago, so I am also planning to design a PCB for it.
The ADS1115 has similar capabilities when it comes to sampling speed and it has 1 more channel (but then, there's the CS1238!), however, it is only a "16-bit" ADC. But probably it has a better performance, I haven't compared them yet.
@@CuriousScientist Can't wait to see the results you get.
I have a few on order myself for testing. I hope they are good enough to use in a battery powered scale I'm currently designing where I need low duty cycle readings at 1Hz. The start-up times of this IC should be much faster than HX711.
From experience, I have learned that the data sheet may not always be super accurate from all manufacturers unfortunately.
They only cost 50 cent or so on jlcpcb, so it's worth testing :-)
Hi, I use arduino nano board with weighing sensor but the voltage is not stable. What's the problem? I can get weight data well with HX711.
Hi! It's hard to say anything without knowing more details about your circuit. Could be unstable power supply, dangling wires, noisy instruments nearby, lack of shielding...etc.
@@CuriousScientist If I want to get the data correctly, do I need external circuit support?
What do you mean by "external circuit support"?
Is it possible to dynamically change the reference voltage. Of this ADC ? Is it the AVDD pin ? If i apply to it different voltages. Would it be. The Vref ? If yes. What is the range of voltages i can apply to it
Hi! Have you tried watching the video and reading my article?
@@CuriousScientistyes. And im rewatching and rereading. There is alot of info to process But i just need a clear information right now. : can i apply any voltage i want to AVDD within a certain range. and this voltage would be the adc reference voltage or atleast. It would be proportional to it ?
You cannot apply voltage to the AVDD pin on the board because it is an output. There is an onboard voltage reference chip.
@@CuriousScientist how is AVDD an output. You have A+ and A- which are the differential inputs. Then you need to power them. With some vdd and gnd. logically thats. AVDD and AGND
I just explained how it is an output. Read my answer again.
If i test out your code on a fresh made project one error occurs<
setRegister' was not declared in this scope
I have changed nothing in your script
How can i fix this?
Apart from that great video!
You probably copied the code wrong. Probably a bracket is missing somewhere. You can see in the video that the code works.
Thanks@@CuriousScientist, The issue was:
I made the project on visual studio code using platformio which works different than the arduino enviroment
I needed to move the setRegister above the setup void, because setRegister was not in the scope!
Good to hear that you figured it out. I was sure that my code is fine. 😎
If you are comfortable with not using the original Arduino IDE and willing to spend a few bucks, I would recommend you to check out VisualMicro. It is a MS Visual Studio-based framework and it makes coding 1000x more efficient.
Can you make a video about hx as normal adc with esp32?
If you sponsor me, sure.
what is sampling frequency you read
I am pretty sure it is mentioned in the video.
@@CuriousScientist for changing sample rate is this way setRegistet(2, 1) for 40hz?
It is in the video and the source code. Take your time and read the information I provided. With all respect, I don't have the time to spoonfeed you, sorry.
@@CuriousScientist Thanks
Whats it's sample rate?
It is discussed in the video and the article I wrote.
You can set it by yourself, but it can't became higher than 1.28ksps (1280 measurements per second).
@@CuriousScientistWhy are ypu answering like that? You wanna waste time to "teach" them, but they aren't young! If not google, then they can ask ChatGPT questions like that. Reply with proper answer or don't waste time for reply and they (guys with stupid questions) will teach themself.
Why should I make an extra effort if it is carefully discussed in the video and in the very detailed article I wrote. I translated the Chinese datasheet, recorded and edited a video and wrote a thorough article. I won't spoonfeed anyone. It is not my fault if people cannot read or watch a video and listen. 🙃
@@CuriousScientist You are right, that's the point! Dumb questions are endless, not your time. Have a great day!