Post by Green Dragon Racing on Feb 4, 2020 12:34:25 GMT
Hi, we're just going through the process of calibratimg our sensors and we've run into some trouble with the current sensor.
We've got to the stage where we're trying to get the voltage off pin A2 on the arduino for the calibration calcs but it just measures 0v. On the connection block there is 5v out to power the sensor, roughly 2.8v on pins 2 and 3, and obviously 0v on the ground pin. We'e had 5 amps going through the wire through the sensor that has been passed through 4 times.
We also have a correct voltage reading on the app but 0 for the current.
Glad to see you've started the fault finding process. Sounds like some logical first steps.
It sounds like you've got a problem with the op-amp circuit. This is the 8 pin chip on the PCB. Worth checking the resistors around this are correct vs the schematic in the documentation (maybe even using a multimeter when the board is off to check the values of these). Also check that the op-amp is inserted in the socket the correct way round, easy mistake to make!
Hi, it sounds like you might have a bad connection somewhere. If you take a look at the circuit schematic (https://docs.echook.uk/circuit-schematics For a larger image right click on it and 'open in new tab') you can start tracing the circuit back.
From A2, there should be continuity to one side of R24, and a resistance of 47k ohm between A2 and pin 1 on the op-amp chip. If this connection is good, check that the op-amp has power and a connection to the inputs from the current sensor, and that the resistors R20 and R21 are 4.7k, and R22, R23 are 10k.
When the board is powered on via the usb all those change apart from R23.
There is voltage difference across pins 2 and 3 of the current connector block and the corresponding pins on the op amp when the board is powered on with the current sensor plugged in but not measuring (no wire through the centre of the sensor). These voltages are:
Between Pin 2 of current sensor and Pin 2, 8, and 1 of op amp: 0.79V, 2.14V, and 2.47v respectively.
Between Pin 3 of current sensor and Pin 3, 4, and 1 of op amp: 0.79V, 2.47V, and 2.47v respectively.
I have also noticed now that there looks like there is some damage on the PCB where I have soldered one of the pins of R24. I tried to upload a picture but can't. But it feels like R24 seems to be the problem.
The current sensor (when working correctly) should only have a voltage difference between pins 2+3 (at the board) IF there is current flowing through it. With no current the difference between these 2 pins should be very small.
With fault finding it's always worth trying to bound the problem as much as we can, so I'd recommend a good next step would be to take out the wires from 2+3 on the connect, such that the sensor is just powered from the echook board but the echook board isn't loading the sensor outputs at all. In this condition use a multimeter to measure the sensor output voltages, I'd hope for ~2.5V on both of those wires, with reference to ground (pin 4 of connector). If not, then that points us at a dodgy current sensor, or wired incorrectly (check the sensor end, and, if you have them on there, remove the capacitors, it's not unknown for capacitors to fail short circuit!).
To determine if you have an R24 problem I'd recommend the following. Put your multimeter in to resistance measurement mode (echook OFF, always do resistance measurements with power off) and measure between pin 1 of the op amp and pin A2 of the Nano. This will 'take in to account' the soldering path of all the connectors, connector solder joints, PCB tracks and importantly the R24 resistor.
From what I can tell, the board checks out. All resistances are within their tolerances and you seem to have continuity between components. As there is the correct resistance between A2 and op amp pin 1 I don't think R24 is the issue.
A couple of the voltage readings feel off though.
The 0.79v between the sensor output and op amp input pins. Op Amps have a very high input resistance, to the point that you can (in theory) assume that the input current is 0. If there is zero current flowing, then according to ohm's law there should be no voltage drop across the input resistors. Those figures imply that there is 0.16mA (0.79/4700)... However that is just in theory and I'll have to check what voltages I get on my board this evening before saying you might have a dead op-amp.
The 2.14v between sensor pin 2 and op amp pin 8 - if pin 2 is a constant voltage the difference between it and ground and it and supply should add up to 5v, as they do for the pin3 measurements. I can't think what would cause that.
Silly question, but op-amp is definitely the right way around? Notch pointing away from the arduino...
Thanks for the understanding. Unfortunately the nature of it is nothing works first time 100% of the time! We'll get there though.
I'm going to check voltages on my board when I get home and see if they line up.
Another test you could do in the mean time is to put current through the current sensor again and check the voltages through the circuit and see if there is a difference with the op-amp plugged in and unplugged...
If there is a voltage difference between current sensor pins 2 and 3, but nothing on pin1 of the op-amp then it's pointing me towards a dud op-amp. If that's the case I'll see if I have one to send you.
Post by Green Dragon Racing on Feb 6, 2020 14:43:51 GMT
So, I've just checked resistance between A2 and pin 1 on op amp several times and I'm getting 36k ohm sometimes and 45.5k other times (with the power off). It seems if I leave it a minute or 2 the resistance changes?
I am getting 2.5 volts on wires 2+3 of the current sensor from ground.
Also, I'm in a group of 4 mechanical engineering students so I just grabbed a stray electrical engineer from the hallway to have a look and he thinks I managed to scuff the board when soldering R24 and shorted it to ground. He thinks I need a new PCB. If you agree, is there anyway we can get one by Monday??? or even Saturday??
Could be you've got unlucky there! Although a lot of the time using the multimeter on the pins (especially the soldered pins on the NANO) can be a bit difficult and you have to make sure you scratch through any ?oxidation? on the surface of the joint, worth making sure you're convinced you got good contact. With capacitors on the circuit (C5 in this case) you can also get some odd readings as you really have to make sure you wait for the small current source in your multimeter to charge that capacitor up before taking that reading!
New boards, I'll have to ask Rowan about, we make have some spares here that we can pop in the post, but re soldering all the parts from the previous board will be easier said than done!
Good news is that the 2.5volts makes it sound like your current sensor is working OK! That's the expensive part of the kit so good news
My recommendation: Remove (unsolder carefully!) R24. Check the resistance between ground and A2, if you have scuffed the board this may be shorting the PCB trace to ground so we need to be sure this isn't the case. You can then solder the resistor back in between pin 1 of the op amp and a2 of the echook, on the underside of the board. You may need some heatshrink to stop its legs shorting, and you may need a small section of wire to extend it if needed. A little blob hot glue to the PCB wouldn't hurt just to give it a good mechanical connection. If you still have problems I'd also remove C5! (i've seen this sort of thing done in professional product sold for ££££'s, so I wouldn't sorry about this in the echook!)
The variable resistance is interesting, and if you test continuity with the multimeter does it show a connection between A2 and ground?
When you say damaged the board, do you mean damaged the solder mask around the pin, then bridged to the ground plane with solder? It should be quite hard to damage the board enough to create a permanent short - normally if there is some damage it's possible to fix by removing the bridging solder, then carefully re-soldering any components.
If you're struggling with images here (I think you need to create more than a guest account - otherwise use a site like imgur and link to them) PM me or use the web chat in the docs and you can whatsapp me some images and we can work out the best way to fix it. Ian's solution will work presuming that the PCB is beyond saving.
A replacement board is possible - again, pm me, or use the web chat and we can sort that. Ian is right that transferring all the components between boards is a nightmare though.
The way the PCB is made (and designed) is that most tracks are surrounded (with a small gap) by a 'ground plane'. The idea of this ground plane is partly to reduce how much copper the PCB fabrication house needs to mill away during the build (the fresh boards start out as fully copper coated) but also we ground it to attempt to conduct any electrical noise to ground, rather than allow it to couple to the signal traces.
Unfortunately, this means if you slip with a soldering iron or scratch the board you may either disconnect the trace entirely, or, short it to the nearby ground plane area.
Easiest way to check this would be to use a multimeter between ground (any of the sensor ground pins or power in port ground will do, it's all the same ground) and both sides of the resistor. I'd recommend removing the Arduino and OpAmp for this test as it reduces your chances of measuring extra effects you don't want.
You may find that the meter takes a little while to get a good reading, due to the capacitor providing a path to ground while it charges up. If you want to really check this I'd remove it if you trust your soldering skills.
A photo of the affected area would help a lot. My email address is i dot cooper at ntlworld dot com (replace to dots, i'll at least try and avoid some spam )