Page 1 of 1

Issues using pin A4 on Etherten (input)

Posted: Thu Aug 28, 2014 9:37 pm
by sumnerboy
Hi,

I am using the Etherten with the EmonTX Arduino shield from OpenEnergyMonitor (http://openenergymonitor.org/emon/emontxshield/smt). This shield has 5 analog inputs, 1 voltage sensor, and 4 current sensors. They are assigned to pins A0-4 respectively.

The schematics can be found here; http://solderpad.com/openenergymon/emontx-shield-smt/

I have connected everything up and it all seems to be fine aside from the 4th CT sensor (on pin A4). This sensor is reading a much lower value than the others. I have tested different sensors with the same result - thereby eliminating the CT sensor as the problem. I also tested different input pins (i.e. A1, 2, and 3) using the same sensor, on the same load, and A4 gives a much lower reading than the others.

There is a voltage divider, R25 and R27 in the CT4 circuit (2x470K), which drops the 5V rail down for use with the CT sensor. Measuring the voltage at the middle of the voltage divider gives 5V. For the other CT circuits the voltage measured is 2.5V.

So something is pulling up the A4 pin I think?

Is there anything else on the Etherten using A4? Should I be able to use it as an analog input? I can't reassign the pin since the EmonTX shield is hardwired to use these pins.

Here is a thread where I have been discussing this issue on the OpenEnergyMonitor forums (http://openenergymonitor.org/emon/node/5624).

I am no electronics expert so apologies for any mistakes or confusion above, I am learning a lot through this process!

Any help or suggestions would be great.

Kind regards,
Ben

Re: Issues using pin A4 on Etherten (input)

Posted: Thu Aug 28, 2014 11:15 pm
by sumnerboy
Just a note, I have been doing some reading and it looks like the Wire.h library will automatically set the internal pullup resistors on A4 and A5 (SDA/SCL) when you call Wire.begin().

However I am not using the Wire library. But I am wondering if something else is somehow enabling those pullups? Is there any way to tell?

The sketch I am using is attached in case it helps diagnose this...

Re: Issues using pin A4 on Etherten (input)

Posted: Fri Aug 29, 2014 4:26 am
by angusgr
Hi sumnerboy,

The latest revision of the EtherTen has i2c pullup resistors built-in to support the internal MAC address chip (that allows every board to receive a unique MAC address).

There are cut track jumpers on the back that allow you to easily disable these. You just won't be able to use the MAC address chip.

This page has a guide to the chip, and the second part of the page has a guide to disabling the pullups:

http://www.freetronics.com/pages/settin ... 24aa025e48

Regards,


Angus

Re: Issues using pin A4 on Etherten (input)

Posted: Fri Aug 29, 2014 5:09 am
by sumnerboy
Fantastic, thanks Angus.

Re: Issues using pin A4 on Etherten (input)

Posted: Fri Oct 21, 2016 4:27 am
by wrswrsnz
I just wasted about 30 minutes trying to find out why the A4 & A5 pins had an offset due to zero documentation easily visible for this board.

Maybe you guys should update the schematic to show the pullups are present and connected by default. It just might help others using this board not waste their time too. I really hate undocumented features - thanks Freetronics!!

Any other boards affected should have their documentation updated too...