Wunwakat

Hello everyone,

I was wondering if I could get some advice before I start my first scratch project - I'm a complete noob so apologies in advance for my obvious lack of technical knowledge.

I want to be able to control a scratch game using weight for a science outreach stand. During the game the player adds or removes marbles (which represent a hormone) from a bowl which is sitting on a weighing scale linked to a Raspberry Pi and the aim is to correct the hormone imbalance of a character/sprite on the screen who changes as you add/remove marbles (the character has already been animated by someone else).

I have a load cell connected to a HX711 and I'm using the python script from https://github.com/aguegu/ardulibs/tree/master/hx711 which is running and producing the correct weight measurements. My question is,how can I set up the loadcell/hx711 to send commands to my scratch program?

At the moment I'm thinking that I could try following the instructions for communicating to Scratch via Python (https://en.scratch-wiki.info/wiki/Communicating_to_Scratch_via_Python). Would this work or is there a better or more efficient way to do this?

I have some programmers at work that can help me out, but as none of us are are familiar with scratch, it would be great to get some suggestions and a point in the right direction.

Thanks in advance.

DipLeChip

Wunwakat wrote:

Hello everyone,

I was wondering if I could get some advice before I start my first scratch project - I'm a complete noob so apologies in advance for my obvious lack of technical knowledge.

I want to be able to control a scratch game using weight for a science outreach stand. During the game the player adds or removes marbles (which represent a hormone) from a bowl which is sitting on a weighing scale linked to a Raspberry Pi and the aim is to correct the hormone imbalance of a character/sprite on the screen who changes as you add/remove marbles (the character has already been animated by someone else).

I have a load cell connected to a HX711 and I'm using the python script from https://github.com/aguegu/ardulibs/tree/master/hx711 which is running and producing the correct weight measurements. My question is,how can I set up the loadcell/hx711 to send commands to my scratch program?

At the moment I'm thinking that I could try following the instructions for communicating to Scratch via Python (https://en.scratch-wiki.info/wiki/Communicating_to_Scratch_via_Python). Would this work or is there a better or more efficient way to do this?

I have some programmers at work that can help me out, but as none of us are are familiar with scratch, it would be great to get some suggestions and a point in the right direction.

Thanks in advance.
with connecting the python to Scratch, basically just have python connect to the scales, have them measure the seperate scales, have python run a command that changes a variable in the Scratch project and have Scratch figure out when it receives a variable change and check if it is the correct value (best to probably range the value in case the scale measure 3.34 g instead of 3 g). So connect your little HX711 with a cord into the computer and have the python run into the computer to launch the variable change, scratch detects it, scratch checks to see if it is at a range for a certain value to change the sprite, if it is correct make it broadcast a message to the sprite to change form. Hope I was at least somewhat helpful.

opsanders3

You can also use ScratchX which i believe has a direct interface with arduino removing the need for python.

Curious to see what your group comes up with!

loadcellengineer

Has this project been completed? Did you create a video of it?

loadcellengineer

Where did you get your load cells from?
My application requires the resources of different organizations. I utilized donated load cells from Transducer Techniques, LLC https://www.transducertechniques.com/load-cell.aspx and calculation tools provided by Engineering Inspiration in the UK. Now to actually measure the force requires mods to heavy equipment provide by Wagner Caterpillar, Aurora, Colorado.

larryramp

loadcellengineer wrote:

Where did you get your load cells from?
My application requires the resources of different organizations. I utilized donated load cells from Transducer Techniques, LLC https://www.transducertechniques.com/load-cell.aspx and calculation tools provided by Engineering Inspiration in the UK. Now to actually measure the force requires mods to heavy equipment provide by Wagner Caterpillar, Aurora, Colorado.
That’s cool, there are other companies that will donate electronics too.
Futek, Spark Fun and others. They will also give great student discounts on load cells.

PetePhar

larryramp wrote:

loadcellengineer wrote:

Where did you get your load cells from?
My application requires the resources of different organizations. I utilized donated from Transducer Techniques and calculation tools provided by Engineering Inspiration in the UK. Now to actually measure the force requires mods to heavy equipment provide by Wagner Caterpillar, Aurora, Colorado.
That’s cool, there are other companies that will donate electronics too.
Futek, Spark Fun and others. They will also give great student discounts on load cells.
Spark fun for the controller boards for sure.

loadcellengineer

Hey PetePhar,
I see you have used the Spark Fun products. What about the Load Cell Amplifier - HX711 and connecting it to some higher end load cells, again my preference are US made SLB Series Load Cell. be aware there is a four wire Wheatstone Bridge configuration

PetePhar

loadcellengineer wrote:

Hey PetePhar,
I see you have used the Spark Fun products. What about the Load Cell Amplifier - HX711 and connecting it to some higher end load cells, again my preference are US made SLB Series Load Cell. be aware there is a four wire Wheatstone Bridge configuration
I used some less costly load cells. They aren’t real accurate though. I was also having trouble connecting to the board but it all worked out.