I would like to come up with arduino that performs as a simple weighing machine by using load cell.
Load cell gives off its mVoltage as a digital signal from some displacement and my idea is to use arduino to process those signal and display digits on LCD according to the intensity of mVoltage.
But, I am having difficulty figuring out how to program arduino to process those signals and do the things that normal weighing machine does.
Also, I hope I could possibly fit in a rotary encoder to this kind of weighing system and make the weighed object to be designated on a specific location such as drop 1, drop 2 or drop 3 etc, just like a sorting machine performs.
Please guide me how to do this and your guidance will be highly appreciated.
Thank you.
Could you post more specific data on how the load cell sends digital data ?
In the playground there are information on interfacing rotary encodeers:
http://www.arduino.cc/playground/Main/RotaryEncoders
and LCD's
http://www.arduino.cc/playground/Code/LCD
MikMo
Thank you for your comment. It's been highly appreciated.
A load cell is typically an electronic device (transducer) that is used to convert a force into an electrical signal. This conversion is indirect and happens in two stages. Through a mechanical arrangement, the force being sensed deforms a strain gauge. The strain gauge converts the deformation (strain) to electrical signals. Normally, a load cell consists of four strain gauges in a wheatstone bridge configuration, but is also available with one or two strain gauges. The electrical signal output is normally in the order of a few millivolts and requires amplification by an instrumentation amplifier before it can be used. The output of the transducer is plugged into an algorithm to calculate the force applied to the transducer.
How can I possibly utilize such signal from load cell and display it on LCD screen?
I hope I can get your comment again.
Thank you.
hi
note sure about the multiple Arduino scenario, but am sure that you need a pramplifier circuit (likely an opamp) for the load cell. Arduino does not have a current loop input, just plain old 0-5V. You therefore need a current to voltage converter between the cell and the Arduino that puts out 5V full scale.
D
Do you need to send data (e.g. a number) or just a yes/no to the other Arduino's?
If its just a yes/no kind of thing then simply use a digital output for each Arduino. If its yes then pull it high for a few milliseconds and the other Arduino just has to listen for it.
But, I wonder how the first arduino(header) should be programmed so that it could send off signals that the rest of the other arduinos could understand and trigger solenoids?
Easiest way:
if (weight < 200g)
{
digitalWrite(1, HIGH);
delay(10);
digitalWrite(1, LOW);
} elseif (weight < 300g) {
digitalWrite(2, HIGH);
delay(10);
digitalWrite(2, LOW);
}
Thats the simplest you can get it for two Arduinos. Just extend it for more.
They just have to listen for the pulse coming in.
Alternatively you could go more complex with SPI or even a unidirectional serial 'network' (tie TX to all the other arduino's RX and use a protocol to direct the signals).
Simpler is better though I think in this instance.
how can I expend the number of digital output pins?
Easiest way is with a 74HC595 chip. Three of them would use only 3 pins on the 'master' arduino and would allow you to control 24 extra outputs.
Also, could you please teach me the sequence as well as the way of how to connect electric wires between each arduinos for communication so that they could do their job according to the program you taught me?
Pick a pin number on the 'slave' arduinos. Say pin 3 for example.
Set it to INPUT and in loop() continually check it until it goes high. Then do whatever you want it to do.
On the Master arduino rig up the 595's together (there is a article on the playground) and then use ShiftOut to set the pin you want to high for 10ms or so.
You have mentioned the above sentence. Could you please be more specific about your word "continually check it until it goes high"? It's hard for me to understand as I am new to use arduino. Please understand.
Think of it as a light bulb which someone else will turn on at some time and you need to figure out when its turned on. ![]()
void loop()
{
while (digitialRead(3) == LOW) // 3 is the pin you selected
{
delay(1);
}
// Do whatever code you want done here
delay(10); // Prevent it from executing twice since pin 3 goes high for 10ms.
}
[quote]Also, if you could be more specific with "595" and "shiftout", i will be greatful.[/quote]
595 is a abbreviation for the 74HC595 chip. Its a common shift register which should be pretty cheap.
ShiftOut is the Arduino function which talks to the chip.
http://www.arduino.cc/en/Tutorial/ShiftOut
That has schematics and sample code for both ShiftOut and the 595.
Hello, guys. I am trying to connect electric wires between each arduinos and with digital indicator.
When it comes to making electric connections with pins on arduino platform, is it necessary to put resistors, or just making simple pin to pin connection without any other electric accessories is fine?
I am thinking of potential surge and it worries me.
I hope I could get some advise in this regard.
Wiring it up directly is fine. Surges only come from heavy loads like motors.
As always, thank you very much for your help.
Then, what should I do if I want to put motors connected to arduino?
Could you please tell me what kind of electric accessory do I have to put on in such case and also let me know where should I put it on?
And, also, when I want to connect motors to arduino which can be driven by 220V AC or 380V AC, what kind of electric components are required?
I hope I could get your reply.
If your asking questions about mains voltage, its a good indicator that you shouldnt do it.
You'll get a nasty surprise if you dont have enough experience. ![]()
Thank you for your advise. I shall be very careful.
you can use a solid-state relay to control a 220V motor... but...
rule one of learning about electronics is not to hook things up to 120, 220, or 380 V until you have a few years experience, or you get some professional help. 308 is industrial voltage, and is easily lethal. (So is 220 for that matter.) AFAIK, only electricians make 380 connections.
Sounds like it might be a good idea to get some help with the Ac component of your project, and to stay away form 380, which is sometimes multi-phase and very very very dangerous. (So is 220 for that matter.)
Since you asked, the way people get electrocuted is that once a current path is formed between any two limbs and passing through the heart, they get temporarily paralyzed. During this time, two things happen. The first is that you get a second or two to contemplate what a spectacularly bad idea it was to get into this situation.
The second is that as your nervous system is paralyzed, you can't move or call out for help, and the current is cooking the skin off your hands or wherever you happen to make contact. In the meantime, the nice fleshy underside of the skin gets exposed, and it has a lower resistance, so more current flows, and then hey, what do you know, you're dead, and also partially cooked on the inside. ![]()
D
sounds extremly scary and horrible...
Thank you very much for your advise.
Hello, I hope you are well.
I've realized that when it comes to measuring and controlling the distance of movement, I need encoder.
And, I am hopfully trying to sychronize the master arduino with a rotary encoder so that the master arduino can understand the input signal from an encoder as well as from the load cell and send some voltage to a designated arduino(where a solenoid is installed to trigger the weighed object) when the master arduino process the corrosponding weight value and assignment.
In this case, how can I write the program for this kind of process to be executed?
Easiest way:
if (weight < 200g)
{
digitalWrite(1, HIGH);
delay(10);
digitalWrite(1, LOW);
} elseif (weight < 300g) {
digitalWrite(2, HIGH);
delay(10);
digitalWrite(2, LOW);
}
Thankfully, I could learn how to program the master arduino to understand the voltage from the load cell but I also want the master arduino to understand the signal from the encoder so that it can assign the weighed object to be designated the a certain arduino's precise location.
Could you please advise me?
Incorporating encoder's function is very difficult. I hope i could get some advise on this part. All kinds of advise is welcomed!!!
Hello. I would like to ask you about below quoted programming.
Do I need to put below programming language in void loop()?
I mean, do I need to put void loop() above if (weight<200g)?
Also, I wonder whether arduino could understand the meaning of "weight" and "g".
I thought arduino could only understand from 0V to 5V input.
How could I set the definition for the input voltage from the digital indicator?
Currently, I am trying to establish 10 weight assignment using 10 slave arduinos.
In this case, how can I define(writing the program) language for the input voltage from the digital indicator and for the multiple output signal for 10 arduino assignments.
I hope I could get some answer from you.
Easiest way:
if (weight < 200g)
{
digitalWrite(1, HIGH);
delay(10);
digitalWrite(1, LOW);
} elseif (weight < 300g) {
digitalWrite(2, HIGH);
delay(10);
digitalWrite(2, LOW);
}
Do I need to put below programming language in void loop()?
I mean, do I need to put void loop() above if (weight<200g)?
Also, I wonder whether arduino could understand the meaning of "weight" and "g".
I thought arduino could only understand from 0V to 5V input.
I just put the 'g' in so it was easier for you. ![]()
Its invalid code.
In this case, how can I define(writing the program) language for the input voltage from the digital indicator and for the multiple output signal for 10 arduino assignments.
I hope I could get some answer from you.
Digital I/O pins can only output a HIGH or a LOW. They cannot output individual voltages.
Thats why you should use two 595 chips together which gives you over 10 output pins, one pin per slave.
Thank you for your reply.
Then, what kind of code should I use instead of "weight"?
I thought the code "weight" was representing the weighed object.
Also, I want to know whether I should put 5V output from the digital indicator to one of the digital inputpin of arduino or to one of the analog input of arduino in order for the master arduino to understand the input voltage of digital indicator.
Sorry for asking too many questions. I am new with eletronics. Please understand.
Writing a program is really difficult.