I may have bricked an emonTX today, as I was trying to update the sketch. The emonTX is a v3.2.1 (those with defective RF that were in the store a few days ago).
To be short because I wasn't paying the necessary attention, and I may have connected the 5v and GND pins reversed from the Rapsberry PI GPIO to the emonTX uart. Did I fry the chip, or is any protection for this case?
After that the led doesn't blink at all when I connect the USB-UART programmer or batteries or AC-AC adapter and I get a "avrdude: stk500_recv(): programmer is not responding" when I try to upload a sketch. There seems to be some life in the board because avrdude returns this:
Using Port : /dev/ttyUSB1
Using Programmer : arduino
Overriding Baud Rate : 115200
AVR Part : ATMEGA328P
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PC2
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 65 20 4 0 no 1024 4 0 3600 3600 0xff 0xff
flash 65 6 128 0 yes 32768 128 256 4500 4500 0xff 0xff
lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
Programmer Type : Arduino
Description : Arduino
Hardware Version: 3
Firmware Version: 4.4
Vtarget : 0.3 V
Varef : 0.3 V
Oscillator : 28.800 kHz
SCK period : 3.3 us
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude: Device signature = 0x1e950f
avrdude: stk500_recv(): programmer is not responding
Is my emonTX bricked? Could it be a bootloader corruption that can be fixed with ISP programmer or USB-UART? If the chip is fried because of the reverse polarity, is it worth it to replace something on the board and what could that be?
Thank you,
Re: Bricked EmonTX?
After a few hours of frustration, I discovered, I can flash the sketch and it works when it is connected to the ACAC adapter and the jumper for ACAC power supply is closed. So it seems I burnt something on the UART 5V/battery power supply but at least it seems to work with ACAC power. I couldn't check the mini-USB connection because it has a strange mini-USB port, that I don't have a cable for, but I think it would be the same, as the UART and the batteries.
Re: Bricked EmonTX?
The schematic is on Github, so if you look at that you'll see that there's an XC6206P supplying the 3.3 V from the 5 or 6 V battery/USB/FTDI port/terminal block, and a MCP1754 supplying it from the ac adapter via JP2.
I think that gives you a pretty strong clue as to what has died. There's provision for a 7805 in parallel with U$6, the dead 6206. However the 6206 is low drop-out so a 7805 is not a good idea if you're using batteries.
If you have a non-standard USB connector that was fitted in error (see http://openenergymonitor.org/emon/node/5123 ) contact the shop.
Re: Bricked EmonTX?
Thanks for the answer. I have measured the voltage at the input of XC6206, at 3.25V and at the output at 1.2V, so I assume that's the problem. Just from curiosity, shouldn't the voltage at input be 5V, when I have connected the 5V and GND pins of the UART port?
Anyway, I won't push my luck further right now, since I am happy with it working from the ACAC, but if I understood correctly, if in the future I want to power it with 5V DC from USB or UART, it is enough to solder a 7805 at IC2 but if I want to power it with batteries, I should replace the XC6206?
Re: Bricked EmonTX?
I think I'd be inclined to remove the dead XC6206. The input should indeed be 5 V, assuming you have the correct programmer (there are 5 V and 3.3 V versions, as I understand it). Other than that, yes, that's pretty much it. But if you can source an XC6206 and replace it, you should then have a full-spec emonTx again.
Re: Bricked EmonTX?
To be clear, you mean, I should remove the dead XV6206, because it can cause problems?
Re: Bricked EmonTX?
Indeed. Its output is in parallel with the other regulator, and we have no idea what is happening inside it. It may well be open circuit and not causing a problem, but it might be putting an excessive load on it and distorting the voltage measurement.
Re: Bricked EmonTX?
Now that you mention it, how does a healty XC6206 like 3.3V up its clacker when it's otherwise unpowered? Does any voltage appear over on Vin when you're running off an AC adaptor? (on a non-fried one).
Re: Bricked EmonTX?
The block diagram on the data sheet shows a series pass fet, with a reverse parallel diode and reverse polarity protection diodes on input and output (i.e shorting to GND, which may be substrate rather than Vss) and a note says they might be parasitic. I'm measuring exactly the same on the 5 V rail as the 3.3 V with no 5 V rail input. Without lifting it off the pcb, I can't measure the reverse current into it.
Re: Bricked EmonTX?
I've seen a few Arduino designs now that use a 3-pin header for power selection. The middle pin goes to the Vcc rail and each of the outer pins comes from their respective regulator outputs. They provide the end-user with a 2-pin jumper sleeve, so they can connect Vcc to one regulator or the other, but never both. And in the case where they want to supply their own Vcc, they can just leave the jumper off.