Products > Test Equipment

Fluke 87IV please whisper in my IR :P

<< < (6/10) > >>

AintBigAintClever:
Well I guess this explains why the IR189USB cable I bodged together this evening works with my 189 but results in not so much as a flicker of IR with my 89 IV. At least it didn't cost me anything to build as the bits had already been scavenged :)

I take it your Arduino code is just for 87 IV and 89 IV and won't work on 18x/28x series?

This has inspired me to finally start dabbling with Arduino. As far as I can see it shouldn't be too difficult to extend the code to use additional pins to select between 8xIV and 18x mode (another interrupt which would switch the main interrupts to point at two different pairs of routines?) and rising/falling trigger mode.

 :-+ :-DMM

frenky:
Yes it would be easy to add some code to just pass trough all incoming serial data to IR TX and RX leds.
And add a switch of jumper to select desired mode...

AintBigAintClever:
My Arduino arrived today. After a bit of poking and prodding (and failing to read the mode switch with an interrupt, possibly due to switch bouncing)... it works! :)

The code below expects an SPDT switch connected to pins D10 (pulled high by the Nano), D11 (wiping contact) and D12 (pulled low). This is used as a mode selector, with the Nano's LED indicating the mode; off for 87/89 IV, on for 187/189 mode (and presumably 287/289 as well). Of course you could do it with the switch connected to Vcc, D11 and Ground, but doing it with D10 and D12 allows a three-pin toggle switch to directly mount to the board.

In 87/89 IV mode it uses Frenky's interrupts. In 187/189 mode it disables the interrupts and uses my quick-and-dirty loop which just keeps reading the Tx and IrTx inputs and copying them to the IrRx and Rx outputs. The two modes can be switched at any time, no need to reset the Arduino.


--- Code: ---#include "DigitalIO.h"
const uint8_t interruptPinIrRx = 3;
const uint8_t interruptPinRX = 2;
const uint8_t PINIrTx = 7;
const uint8_t PINSerialTX = 1;
const uint8_t ModeSelHigh = 10;
const uint8_t ModeSel = 11;
const uint8_t ModeSelLow = 12;
const uint8_t LED = 13;

void setup() {
  fastPinMode(LED, OUTPUT); //Mode indicator LED
  fastPinMode(ModeSelHigh, OUTPUT); //High side of mode selector switch
  fastDigitalWrite(ModeSelHigh, HIGH); //Keep high
  fastPinMode(ModeSelLow, OUTPUT); //High side of mode selector switch
  fastDigitalWrite(ModeSelLow, LOW); //Keep low
  pinMode(ModeSel, INPUT);
  fastPinMode(PINSerialTX, OUTPUT);
  fastDigitalWrite(PINSerialTX, HIGH);
  pinMode(interruptPinIrRx, INPUT_PULLUP);
  fastPinMode(PINIrTx, OUTPUT);
  pinMode(interruptPinRX, INPUT_PULLUP);
}

void IrDA_RX() { //Receive IrDA from Fluke 8xIV
  fastDigitalWrite(PINSerialTX, LOW);
  delayMicroseconds(105);
  fastDigitalToggle(PINSerialTX);
}

void IrDA_TX() { //Transmit IrDA to Fluke 8xIV
  delayMicroseconds(46);
  while (digitalRead(interruptPinRX)==LOW){
    fastDigitalWrite(PINIrTx, HIGH);
    delayMicroseconds(20);
    fastDigitalToggle(PINIrTx);
    delayMicroseconds(85);
  }
}

void loop() {
  if (digitalRead(ModeSel) == 0)
  { //Switch is off, select 87IV/89IV (IrDA) mode
    attachInterrupt(digitalPinToInterrupt(interruptPinIrRx), IrDA_RX, FALLING);
    attachInterrupt(digitalPinToInterrupt(interruptPinRX), IrDA_TX, FALLING);
    fastDigitalWrite(LED, LOW); //Turn off mode LED
    while (digitalRead(ModeSel) == 0)
    {
    }
  }
  if (digitalRead(ModeSel) == 1)
  { //Switch is on, select 187/189/287/289 (IR passthrough) mode
    detachInterrupt(digitalPinToInterrupt(interruptPinIrRx));
    detachInterrupt(digitalPinToInterrupt(interruptPinRX));
    fastDigitalWrite(LED, HIGH); //Turn on mode LED
    while (digitalRead(ModeSel) == 1)
    {
      fastDigitalWrite(PINSerialTX, digitalRead(interruptPinIrRx));
      fastDigitalWrite(PINIrTx, 1-digitalRead(interruptPinRX));
    }
  }
}
--- End code ---

I just need to tidy it up a bit now.

frenky:
Fantastic!  :-+

Tim5000:
This is excellent - nice work!
I was looking to buy the cable as I want to update the 289 to v1.16, but I have a few arduino's kicking around so might give this a go, especially as I've got a 87-IV, 189 and 289 so this would be a great all-in-one solution.

Which IR components did you go for in the end please?
Is there a blog page/update schematic to have a look at?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod