Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 11:56 13 Nov 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Using a Load Cell "Click" module with Explore 100 board.

Author Message
Bowden_P
Senior Member

Joined: 20/03/2019
Location: United Kingdom
Posts: 162
Posted: 11:05pm 30 Oct 2019
Copy link to clipboard 
Print this post

Hi everyone,
I am wondering if anyone has tried using Mikroelektronika's Load Cell "Click" module with the Micromite Plus Explore 100 board? I am using the Micromite Plus and a 5" LCD mounted as a "backpack" to it.

I have the Click module plugged into Socket 1, and can read back measurements made by the Click board from a connected Load Cell. However, the l.s. byte value looks like it was generated by a random number generator!

Is this to be expected from the HX711 chip on the module, or is/are there other reasons to cause this effect? I should like to see at least some of the l.s. byte bits being more consistent if at all possible.

Any comments or experience on using this Click module would be appreciated.

I have written some code to do statistical analysis of a set of readings, to give me some indications as to whether any changes I make are having a beneficial effect.

With best regards, Paul.

p.s. I have just read "Shoots" thread from 8-Oct-19 about the problem he had with noise and the LCD. If the screen power was drawn directly from the incoming 5V supply, rather than the on-board 3.3V rail, there is 1.7V of headroom for a substantial filter and separate regulator just for the screen.
Nothing so constant as change.
 
Bowden_P
Senior Member

Joined: 20/03/2019
Location: United Kingdom
Posts: 162
Posted: 11:44pm 30 Oct 2019
Copy link to clipboard 
Print this post

Hi Shoots,
Thanks for your request in your post. Is that supply modulation varying with the screen backlight mark/space setting on your scope traces?. Looking at your 'scope traces it suggests that you may have this set at about 70% if I understand them? I have noticed that rail modulation effects are greatly reduced with a backlight 0% or 100% setting, which may help my problem - although the former is not too helpful!

In my case, a spike occurs when the screen backlight switches on, and this load causes either rail - 5V or the 3.3V - to drop. The 5V rail drops about 150mV, with the spike about 280mV below this; the 3.3V rail drops about 50mV, with the spike 140mV below. The period is about 8ms. ( My 5V rail comes from a mains plugtop supply.)

There is also another +ve going artifact of about 17ms. period moving through this modulation , about 10mV high, and 1.5ms. wide. I'm afraid my 'scope struggles with both these signals, so most of these readings are not very accurate.

If anyone can offer insights into using the Click module, I would be most grateful.

With best regards, Paul.
Nothing so constant as change.
 
SimpleSafeName

Guru

Joined: 28/07/2019
Location: United States
Posts: 351
Posted: 03:46am 31 Oct 2019
Copy link to clipboard 
Print this post

I just happen to have pertinent, timely knowledge on this, owing to the fact that I just finished building a scale using HX711s. :)

This is the library that I used: https://github.com/bogde/HX711  It's Arduini-based, and works well. Thus my experience with the HX711 is Arduino-based as well.

You library needs to shoot out from 23 - 25 pulses on the clock line, and the data line will respond based of what you told your HX711 to do.

The HX711 does not power the load cell(s) continuously, a pause in strobing the clock will put the cell into sleep mode. You can also do this manually.

Reading from the second channel is simple, set the gain to the HX711 to 32 first, and then take a reading.

The HX711 will run from 2.7 - 5 volts, a level shifter is not required if you match voltages.

I had to separate the grounds betweens the two ground pins at my level shifter, the Adafruit Feather didn't like it and would shutdown.

Not all I/O pins are created equal, I'm reading four cells via two HX711s, and the second set of I/O that I chose worked on the breadboard, but not on the finished board. (Bodge time!)

Noise shouldn't be a major problem (it isn't with me) the transitions of the signals are pretty sharp on my board.

I can take some shots of a working trace and post them tomorrow if you like.

The data line will be held high until it starts sending data.
Edited 2019-10-31 13:51 by SimpleSafeName
 
shoots

Newbie

Joined: 31/07/2011
Location: Australia
Posts: 32
Posted: 05:57am 31 Oct 2019
Copy link to clipboard 
Print this post

I found the noise did not vary whether the backlight was set very low or high. I did not try and analyse the mark-space ratio of the pulse.
I do recall the artefact moving across the pulse cycle but can't recall its frequency.

Have you tried putting a choke in line with the supply to the boost cct and a cap across the output?

One option for trouble shooting is to run it without the screen attached and output the data via the serial line to your computer and see if the random nature of the ls byte cleans up.

I would expect some jitter on the least significant bit or two but not the whole byte.

The  exponential smoothing I implemented on the data input also improved things.

Cheers
Peter
 
Bowden_P
Senior Member

Joined: 20/03/2019
Location: United Kingdom
Posts: 162
Posted: 02:10pm 31 Oct 2019
Copy link to clipboard 
Print this post

Hi SimpleSafeName and Shoots,
Many thanks for your replies. SimpleSafeName, initially I had an intermittent problem with reading from the HX711, where the data was all 1's. I now check DOUT twice for a LOW with a short pause in between, before applying clocks, which seems to have cured that. Setting gains seems to work well with the extra read pulses.

The Avia datasheet is quite good considering it's from a far eastern company, but I guess that the American influence in Taiwan means that English is well taught there.

I intend to try a number of ideas Shoots, including your screen filtering, over the next few days. I get the Micromite to do the data analysis and plot histograms etc., so disconnecting the screen will be a tad awkward! I don't know how I might do that on the PC.

I suspect that to get the best out of the load cell I will have to do multiple measures and average the result anyway, but getting a good set of results will help significantly.

With best regards, Paul.
Nothing so constant as change.
 
shoots

Newbie

Joined: 31/07/2011
Location: Australia
Posts: 32
Posted: 02:50am 01 Nov 2019
Copy link to clipboard 
Print this post

I sent data out to Megunolink (www.megunolink.com)  via a serial output of the MM and used their plotting function. They have a free trial. Was really quite straightforward once I set up. Megunolink was running on the laptop at the same time as the MMedit. So you need two of the serial- USB adapters. It was worth the time to load and set up and proved a great debugging tool.
e.g. to set up for the data stream to Megunolink:
 open "com2: 115200, 64" as #6   'comms for communication with megunolink for plotting
and then to send the data:
    print #6 , "{TIMEPLOT:|data|cmH2O|T|",cmH2O,"}" 'for average testing
Multiple plots are possible too, e.g.:
    print #6 , "{TIMEPLOT:|data|autoSpeed|T|",autoSpeed,"}"


I also send data back to MMedit and can monitor it in the second window that comes up after downloading the program to the MM. You don't need a second serial-USB convertor for this.

e.g. one line I used was:   print "instantCmH20=", instantCmH20  This will see the data stream in the window print a line with the text instantCmH20= followed by the value of the variable instantCmH20  (the pressure I am reading)

You can then go through the data stream and get an idea how it is varying. It could also be feasible to copy and paste into excel for analysis, but a bit fiddly.

This could let you run without the touchscreen and see if that LSbyte settles down.

Regards,
Peter
 
Bowden_P
Senior Member

Joined: 20/03/2019
Location: United Kingdom
Posts: 162
Posted: 09:01pm 03 Nov 2019
Copy link to clipboard 
Print this post

Hi Shoots,
Among a number of supply variations, I have tried your filter on the LCD 3.3V supply, and found that it helped a little. I did not have a suitable low ESR 1000uF cap, but used 2 x 470uF very low ESR caps (<0.1 Ohms) with a 38uH coil between. 47uF tantalum caps were put across the 470uF ones.

I used a separate unregulated "9V" supply to a 7805 regulator for the screen, with the 3.3V regulator following. Also not having a T0220 3.3V regulator, I used a small TO92 1700-3302E, plus a TIP42A and 30 Ohm resistor in the classic current boost arrangement. ( 1700-3302E is the small 3.3V voltage source used on the standard Micromite Backpack board.)

Removing the need to supply the screen from the Explore 100 board 3.3V rail gives the Explore 100 a quiet rail, and also benefits the 5V rail too. The mikroBUS sockets then get quiet rails as well, so this arrangement benefits any Click boards used.

I now get consistent HX711 values except for the 6 to 7 l.s.b.'s, which I will have to live with. I can make a rolling average to improve this slightly. (The 7 l.s.b. count at 127 represents just over 1 gram of weight - a count of 110.5.)

One thing I found that surprised me was how well the 1700-33-2E plus current boost worked! A 7805 or TC1264-3.3V regulator showed 50mV drop due to the backlight loading, yet the current boost arrangement showed at least a x10 improvement, at <5mV drop. There are reduced spikes and ripples too.

For my project I shall arrange a separate supply for the LCD. I am thinking of using a 9V plugtop supply, feeding a 5v linear regulator for the Explore board, and a 3.3V regulator to the LCD, leaving the backlight filter in place.

With best regards, Paul.
Nothing so constant as change.
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025