Hall Effect Sensors in parallel

Hi Guys

Can someone advise me how to calculate the value of the resistor ‘R’ (and ‘Rp’ if needed) in the attached sketch?

I want to connect the outputs of two A1104 hall effect sensors together such that if either of them are activated, the input to the Arduino pin goes low

I suppose the answer to my question also hinges on whether I use the internal pullup resistor on the pin (which is what I currently do when using just one sensor) or whether I add an external one (Rp in the diagram). Which arrangement is best do you think, and what’s the best value for ‘Rp’ if used?

Thanks in advance


The A1104's ouput is open-drain. It's rather misleading that the datasheet labels the output "VOUT" (should be just "OUT") ... see their website page here.

In your circuit, you won't need the diodes and pulldown resistor R.
Just simply connect the pin 3 connections togeather (wired-OR). The pullup resistor should be sized so that the 25mA limitation on the output is not exceeded. A value of 1K connected to 5V will provide about 5 mA sink current and should give a strong signal.

EDIT: I wouldn't recommend using the internal pullup of an Arduino (typically around 50K) as your input would be more prone to picking up noise. A maximum of 10K external pullup resistor (0.5 mA sink) should work, but I would check the signal quality with an oscilloscope.

Many thanks for that dlloyd :slight_smile:

That's great news, as it means I can modify my existing circuit without having to get the pcb remade. I'll amend the sketch to not invoke the internal pull up resistor and I'll just add Vcc and a pull up resistor to the input pin. Interference shouldn't be too much of a problem as the distance of the switches to the processor is relatively short (around 50mm for one and 200mm for the other) and its not designed to be used in an electrically noisy environment, but having said that, better safe than sorry!

Thanks again


You put the diodes and resistor in the wrong way round and in the wrong place anyway,
but as pointed out you don't need diodes with open-drain outputs.