load cell and motor voltage readings using basic stamp
team.s
Posts: 13
Hi again,
The main aim of my project is to take voltage readings from a motor and load cell simultaneously and save the data on a USB stick which I can later access·using excel to plot a graph of voltage from load cell against voltage from motor. The stamp should also really control the start and stop of the motor. Again I am extremely new to programming i.e this is the first program I've ever written, and have no idea where to start and whether·I can actually do it or not. Can someone please help me out with writing the program and tell me where to start.
I've got the datalogger and the BS2 module along with the basic 2 carrier board.
Thanx
The main aim of my project is to take voltage readings from a motor and load cell simultaneously and save the data on a USB stick which I can later access·using excel to plot a graph of voltage from load cell against voltage from motor. The stamp should also really control the start and stop of the motor. Again I am extremely new to programming i.e this is the first program I've ever written, and have no idea where to start and whether·I can actually do it or not. Can someone please help me out with writing the program and tell me where to start.
I've got the datalogger and the BS2 module along with the basic 2 carrier board.
Thanx
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
Can this be reasonable achieved?
Can't find a specific value for its output voltage.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
SelmaWare Solutions - StampPlot GUI for controllers, XBee and Propeller Application Boards
Southern Illinois University Carbondale, Electronic Systems Technologies
American Technical Educator's Assoc. Conference·- April, Biloxi, MS. -- PROPELLER WORKSHOP!
Its the "FSG and FSL Series force sensors" under "Catalog Information" at
http://sensing.honeywell.com/index.cfm?ci_id=140264&defId=117625
The load cell you have is designed to measure the force and give an analog output that is proportional to the force applied. Will any force start the motor, or will it be 10grams, 100grams or what. This will determine the accuracy of the circuit needed to convert the voltage output into a signal that can be read by the basic stamp.
You might look at the LTC1298 analog to digital converter. This has a resolution of 1.22 mv and is described at:
http://www.parallax.com/Portals/0/Downloads/docs/prod/appkit/ltc1298.pdf
This will give you a digital signal that tells you the amount of force being applied to the force cell (the sample code is in the link). With an appropriate voltage divider, this same type of device can measure the voltage across the motor.
Also, can you post some kind of sketch to show the relation of the load cell to the motor?
Post Edited (MSDTech) : 3/4/2008 11:36:57 PM GMT
Ideally, I wanted the motor to start as soon as the load cell sent an output, but it seems to be producing so much static noise, it would probably be a good idea to have it initiate the motor at 10 grams load.
The load cell sits beneath the motor so that as the motor retracts into the body of a case, it compresses a spring which presses up against the load cell. Sorry for the pretty pathetic diagram!
········· Force applied to top of motor
······· · /
······· /
···· _ll_
·····l···l·· <-- motor
···· l·· l
····l-o-l·· <-- load cell
· l··· /·· l
· l·· ·\·· l
· l·· ·/·· l·· <-- casing
· l·· ·\· ·l
· l·· ·/ <
spring
· l
l
////////////
Post Edited (team.s) : 3/5/2008 1:32:46 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
SelmaWare Solutions - StampPlot GUI for controllers, XBee and Propeller Application Boards
Southern Illinois University Carbondale, Electronic Systems Technologies
American Technical Educator's Assoc. Conference·- April, Biloxi, MS. -- PROPELLER WORKSHOP!
http://search.digikey.com/scripts/DkSearch/dksus.dll?Detail?name=AD623ANZ-ND
On page 14 of the data sheet http://www.analog.com/UploadedFiles/Data_Sheets/516895375AD623_c.pdf it shows a sample bridge circuit used with it.
This will still give you an analog voltage out, so you will need to use the ADC discussed above or the ADC0831 (see the Process Control text for examples).
-Martin
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
SelmaWare Solutions - StampPlot GUI for controllers, XBee and Propeller Application Boards
Southern Illinois University Carbondale, Electronic Systems Technologies
American Technical Educator's Assoc. Conference·- April, Biloxi, MS. -- PROPELLER WORKSHOP!
I've done a little testing, and the load cell output voltage is 0.0114V at no load, and 0.498V at my max load (1Kg). The motor will be running at 18V (i.e. from 2x 9V batteries). Can anybody suggest an op amp suitable for this purpose and a corresponding ADC to out put into the BS2? and a suitable ADC for the motor too. I've apent all morning pouring over data sheets and i'm a little lost and confused.
The AD623 described above - It seems like the min input voltage is 2.7V - Am I reading this correctly?? It seems quite a high value.
Thanks,
Jon.
The data sheet for the AD7705 states clocks between 500KHz and 5MHz should be used, so I was wondering if it matters what value? I was going to get a 4MHz resonator, as they seem to be widely available and cheap. Is this suitable? Also, does it matter what resistance it has?
Post Edited (team.s) : 3/6/2008 1:18:51 PM GMT
Which resistance are you referring to?
I'm hoping to get the code functional in my weather station this weekend. I'm having some problems re-synching with the AD7705 after reading the other instruments. Looks like its back to reading the datasheet VERY Carefully to find the resync options.
Post Edited (MSDTech) : 3/7/2008 3:20:10 AM GMT
Sorry to be a pain in the neck, but what's the "step routine" and why would the resonance need to be divided by 2?
Thanks.
I suspect you may be burning the midnight oil. What you read as "step routine" is actually "setup routine". Check the post to verify that, as I'm burning some of the same
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Programming can't be all that difficult, it's nothing but 1's and 0's
I got your PM and have been able to sort out the problems. I've attached the code for both controllers and the FPU I use to perform the calculations. The FPU handles the 16 bit output a little easier than the stamp, and since I was running short on program space for the stamp, the ability to store the calculation as a function in the FPU saves a lot of program space.
You should be able to locate the subroutines that set up the AD7705 and read it in the external module code and the processing in the internal module code and FPU code (its a text file used by the FPU IDE), you can download info on the FPU at http://www.parallax.com/Store/Components/AllIntegratedCircuits/tabid/154/CategoryID/31/List/0/SortField/0/catpageindex/3/Level/a/ProductID/244/Default.aspx
I've also included a layout diagram for the card holding the AD7705. It's not well labeled (I'm still working on the project notebook). The rectangle on the right is a 10K precision potentiameter I use to set the reference voltage. I'm currently running with a 2v reference. The strain gage uses the standard color code for the wiring with red/black being the exitation voltage and green/white being the output.
Hope this helps with your project.