I’ve had a great time writing some code which uses the K8055 to control and respond to a VC++ app. To finish it I want to use the analogue input to take a reading from a digital scale, but my knowledge of electronics is letting me down.
There are 3 ICs on my scale’s circuit.
93AA66A eeprom (8pin)
HT48R30A-1 i/o type MCU (28 pin), which I think is just translating to the scale’s LCD(???)
PC324 QUAD OPERATIONAL AMPLIFIER (14 pin)
its using 6v.
I thought I would need to find the correct 2 pins (through trial and error) off one of the above ICs and connect them to A1 and GND on the K8055 but all I seem to get is a constant output which doesn’t vary when the scales have more weight put on.
I feel like I’m doing something fundamentally stupid here. Should one of these pins be varying in voltage with the change in pressure on the scale? If it should; I can’t find it.
Could someone tell me I am doing something fundamentally stupid, or maybe to stop messing around with stuff I don’t understand before I kill someone…I’d be grateful… or maybe I should read my Electronics for Dummies book a bit quicker.
Interesting project, indeed.
It is very difficult to help you without a circuit diagram of your digital scales. I think you haven’t it.
Strange that there in the microcontroller is no A/D converter. It should take the weight data in some digital format instead.
The PC324 is quite strange part name for an op-amp. Maybe it is uPC324.
The datasheets can be found from: datasheetcatalog.com/datasheets_pdf/
If you have a DVM you may measure the voltages of pins 1, 7, 8 and 14 of the ?PC324 and check if there happens some change when you add the weight.
I couldn’t see a changing signal with my DVM. You’re correct I don’t have a circuit diagram, I guess Salter don’t want to encourage taking their kit apart?
But, I did find these documents relating to the IC’s.
As there is no ADC on the micro, it’s unlikely there is a convenient voltage anywhere.
On the basis of this Circuit Cellar article, the micro is probably timing or counting a pulse signal generated by the analog part. Try using a scope to look for a pulsed signal.
It’s possible the EEPROM contains calibration data that you might need to process the raw signal.
As donotdespisethesnake wrote you should try to find a PWM signal proportional to the weight on the PCB. This may be difficult if you haven’t an oscilloscope.
If you anyhow find it, then you have to filter the PWM signal with a simple RC circuit to get DC proportional to the weight. Then this DC signal can be fed to the K8055 card’s analog input.
You may use the K8055 card as a target device when studying to use the oscilloscope.
When the K8055 demo software is running adjust the sliders DA1 and DA2 and you see how the LEDs LD9 (PWM1) and LD10 (PWM2) start to light up.
Now you can use the oscilloscope to measure the pulsed PWM signal from pin 12 or 13 of IC3.
If you succeed to get the time scale and voltage scales properly adjusted you should see a pulsed waveform. The duty cycle of the signal varies if you adjust the sliders DA1 or DA2.
Next you have to try to search something similar from your scales circuit board.
If you succeed to find that kind of signal then you may use similar circuit as used on the K8055 card to convert PWM signal to DC. There R12 and C3 together with op-amp IC1D form the circuit that converts PWM signal to DAC1 DC voltage.
OK, so I have the PWM signal. Please forgive again the beginners electronics… do I just need a resistor and a capacitor, if so, how do I know what sizes? and then an op amp, will a standard 741 be OK? If there is a circuit diagram somewhere that would be great.
Also, do i need to take only the single PWM connection from my scales or a ground too?
Nice that you found the PWM signal from the scales.
Now you have to connect the scales GND to the GND terminal of the SK1 connector of the K8055.
Then remove the jumper from pin headers SK2 and turn trimmer RV1 (ATT1) to max position clockwise.
Connect the PWM signal via a 10kohm resistor from the scales to terminal A1 of SK1 connector. You do not need any additional op-amp.
Now you must select proper value for the capacitor to filter the PWM signal. To get good filtering result the time constant R x C must be five times the period of the PWM signal. Connect the capacitor between A1 terminal and GND terminal of SK1.
What is the frequency of the PWM signal you found?
If the frequency is about 10kHz then proper capacitor value is 47nF.
If 1kHz then use 470nF, if 100kHz then 4.7nF etc.
My nice ,square PWM signal has changed. Instead of 90 degree angles I have a vertical peak, then a curved drop, then a vertical drop (lower than starting point, the a shorter curve back to the start. Similar to this image->
I soldered a connection to my scales to make the final stages easier…I’ve damaged the scale’s board I guess? Or perhaps I changed something by leaving too much solder on the connection…. Any idea? I’ve taken my connection off and the altered signal remains.
Should this matter in terms of filtering? The scales still seem to work as they did stand alone. Should I get a new set of scales?
Also, according to my scope the frequency at rest is 37Hz rather than Khz, does this mean I need a different resistor and capacitor combination. I’m measuring frequency as the length of the pulse……its just occurred to me that maybe I should be measuring the gap between pulses….
I feel like I’m so close to getting what I want to achieve, I’m sorry I’m such an amateur, I feel I’ve learned a lot in a few weeks but have many miles to go. Thanks for all the advice so far.
I think there is nothing wrong with the scales because they seem to work OK.
Are you sure that you are not measuring the PWM signal with the AC coupling setting of the scope?
At as low frequency as 37Hz the image may look like that if AC coupling is used.
My scope readings are 136ms / 7.35Hz between pulses at rest, using the markers at the begining of one pulse to the beginning of the next.
V= -.1
Vmax = 1.1
Vmin = -.037
I think this means I need a capacitor of 68µF (47µF or 100µF) mine are 25V
Unless I use a different resistor, which I’ve tried a few lower.
The measurements on my multimeter give 0.55V and 0.75ma between the PWM and GND outs from my scales. I;m taking GND off the return in the battery compartment…?!
I’m making connections on a breadboard:
group 1
PWM output + 10K resistor
-> connects to
group 2
A1 K8055 & +ve of 100µF electrolytic capacitor
-> connects to
group 3
GND K8055 & GND of scales & -ve of 100µF electrolytic capacitor
all this seems to do is decrease the sensitivity of the scales.
I’ve tried a few different resistor / capacitor combinations.
I can see a pulse on the K8055 for example with a 1000K resistor and a 47nF cap…but I’m guessing in the dark.
Am I doing something fundamentally wrong.
There’s no sign on the K8055 at all apart from when I remove the capacitor and I get a blip…
Sorry, but it seems that the output voltage from the scales is too low (1.1V). Maybe also the pulse width change proportional to the weight is too low to get any measurable DC voltage change to the K8055 analog input.
You can not use as high as 1000k resistor connected to the K8055 input. The potentiometer RV1 of 100k together with your input resistor form a voltage divider that attenuates the input voltage to one tenth of the input value in that case.
Also it seems that you can not load the scales PWM signal not even with a resistor of 10k if the scales sensitivity seems to change due to that.
Sorry that there is no easy solution to solve this problem.
is it feasible instead to translate the signal that goes to the LCD?
You said there’s no easy way. Whats the difficult way.
The circuit cellar article mentions: “The signal’s low period is directly proportional to the applied weight. (This is conveniently labeled T3 on the DW-36XP scale’s circuit board.) The low pulse is approximately 20 ms wide with no load. It increases by about 2 ms per pound of force. This signal…”
Is my problem that he has 5V? The PWM with seems the same…
If the PWM signal amplitude is 5V that is OK.
You may continue.
Based on your description your connection is OK:
You connect the signal via a 10k resistor to terminal A1 of the K8055 and put 47uF or 100uF between A1 and GND. Also GND of the scales is connected to the GND of the K8055.
Next step:
Measure with your multimeter what is the DC voltage between A1 terminal and the GND terminal of the K8055?
Does this DC value change if you put weight on the scales?
Are you sure: 0.4V only!
Have you checked the scope probe that it is not 10x. Most probes are that type (attenuate by 10) or they have a switch to select 1x or 10x mode.
Please check the probe by measuring a known DC voltage.