My problem is that my total on the remote computer is more high than the total on the electromechanical counter : for 100 pulse, around 4 pulse differences.
Here’s the java code of my IO Listener :
// Register a listener to handle the samples received by the local device.
localDevice.addIOSampleListener(new IIOSampleReceiveListener() { @Override
public void ioSampleReceived(RemoteXBeeDevice remoteDevice, IOSample ioSample) {
state=ioSample.getDigitalValue(IOLine.DIO4_AD4).getName();
Date dNow=new Date();
//delta_time=actual_time-previous_time;
if (previous_state==“Low” && state==“High”) {// && delta_time>5000) {
totalQty++;
To help narrow down where the issue is, I would suggest using a port sniffer application and set some triggers in your app to indicate when it receives the frames. Then compare it to the port sniffer log to see where the issue is.
I verified today my input signal when counting.
Signal is okay. But on the same closet there’s an other drilling machine and I discovered that the perturbation comes from this machine. When pushing the command button of this machine, I increment …(around 40% of the time). But my IO is linked to the ground with the last resistance of the tension devider (220K) so the pin should not toggle … ?
You had better read over the product manual again and pay attention to the Max input voltage of the ADC and DIO lines as on this product line, the max input is 1.2V.
The XBEE S2 module you listed is not an 802.15.4 module but an XBee ZB module which supports 0 - 1.2V max. What is the actual part number of the modules you are working with? With that info, I can use that to clear it up exactly what it is you are working with.
you are right for the model and voltage for analog input.
But for digital input the spec say : VLmax=0.2VCC and VHmin=0.8xVCC =2.4V (if VCC=3V) So I understand that 2.4V
It sounds like you are introducing noise on the line from the other machine. What happens if you place some metal between the line and the other machine?
to avoid to make a calibration every (to take into account ambiant luminosity) o r false mesure I have some put some rubber tape around my sensor and LED.
My remote totalizer is now working well !