...sorry Richard, didn't try your code by now - still in office.... 😬
...sorry Richard, didn't try your code by now - still in office.... 😬
Roger
Richard,
I've connected my YHDC sensor one pin to ground and the other to RA5. Got readings (see hereunder).
Because I'm not sure what I'm doing right now with the current sensor, I tried to add a 1Mohms resistor and a 100nF polarized cap between GND and RA5. Same readings.
Just for info, my multimeter shows 0.157mVAC - I'm measuring a 230VAC 42W light bulb for now.
I get readings on my serial monitor but the values don't make too much sense to me, for now - there's going to be some kinf of scaling to do, no?
This is what I get for now with bulb "ON":
And bulb "OFF":
![]()
Roger
It can't work wired the way you described. The ac signal must be biased by vcc/2 and be less than vcc peak to peak.
If the serial baud rate is too low it will ruin the sample rate.
If the burden resistance is incorrect extremely high voltage may be possible
Post code and schematic
Last edited by richard; - 1st December 2025 at 22:14.
Warning I'm not a teacher
Have you connected your CT as shown in your first post? That is, the bottom to 2.5V (or VRef/2) and the top to input pin AND - VERY IMPORTANT - a load resistor shown as 33ohms in diagram? You must have a load resistor or the output voltage across the secondary of the CT can get very high, possibly damaging the ADC input.
Then, your CT produces 50mA with a 100A primary current. 1A primary give 0.5mA and so yout 42W load gives about 100uA secondary current. Keep that in mind when selecting the load resistor.
EDIT: OK, Richard beat me to it while I was typing.
You might want to specify the model number of the sensor since there are a number of different types, and the circuit shown may not even apply
adjust resister to for the mid current used incase of some nonlinearity... shotkey diode has .3 volt drop
![]()
Sorry guys for not reponding earlier - I'm still waiting for 20A:50mA current sensor to arrive; my 100A:50mA are far too low and "out of range" for what I intend to measure.
BUT I could grab a 5A:1V one from a friend today so I'm back on my workbench.
To have "better" values -measures with FLUKE 177- , I now use my 230VAC hairdryer:
Pos 1: fan only = YHDC:54mVAC - FLUKE: 1.1A
Pos 2: fan + low heating = YHDC: 170mVAC - FLUKE: 3.5A
Pos 3: fan + high heating = YHDC: 320mVAC - FLUKE: 6.6A
Since I now use a voltage output type sensor, I leave the burden resistor out, right?
And here are my readings:
OFF:
Pos 1:
Pos 2:
Pos 3:
I can't still figure out what I'm reading.
Last edited by flotulopex; - 7th December 2025 at 21:43.
Roger
you cannot use a current transformer that way without a burden resistor.
by voltage sensor do you mean ACS712 or similar ?
if so that circuit is incorrect, typical use
![]()
Warning I'm not a teacher
Bookmarks