Waveform Generator
AHT21, MAX6675 Thermometer
USB Input Output
CH376 USB Picture Frame
SD FAT32 Player PIC12F1822
W25Q64 Flash Recorder
Picture Frame PIC16F690
Color OLED Picture Frame
SD FAT32 TFT Display
Doorbell with SD/EEPROM
SD Talking Clock
SD Sound Recorder
SD FAT32 wav Player
SD Arduino Recorder
Arduino Picture Frame
AD9833 Waveform Generator
Chrome Browser Counter
Arduino LED MAX7219 Counter
LCD Accurate Counter
OLED Accurate Counter
MilliHertz Counter
PIC Counter For Android
MAX7219 LED Counter
WiFi Frequency Counter
Frequency Generator
OLED Counter PIC12F629
Talking Frequency Counter
TFT Counter PIC16F628A
SSD1306 Counter PIC16F628A
SSD1331 Counter PIC16F628A
Arduino Counter for PC
OLED Arduino Counter
OLED Frequency Counter
TFT 10MHz Counter
PC Counter
LED Counter
Scope Screen Counter
LCD 16 x 2 Counter
LCD Arduino Counter
6MHz Android Counter
NIXIE Android Counter
Bluetooth Counters
USB Counter
OBD2 RPM meter PIC16F876A
OBD2 Engine Rev Counter
OBD2 Diagnostic app
Logic Analyzer
PIC12F1822 Scope for PC
Arduino Oscilloscope for PC
Arduino OLED Oscilloscope
Android Oscilloscope
TFT Oscilloscope
USB Oscilloscope
Thermocouple 1023 Deg
Thermometer For Browser
OLED Thermometer PIC12F629
OLED Room Thermostat
TFT Clock and Thermometer
LED Thermometer
USB Thermometer
Serial Thermometer
Serial Thermostat
USB DS18B20 Sensor
Cuckoo Clock
Real Time Clock DS3231
LED TM1637 Timer
OLED Timer Thermometer
TFT Timer Thermometer
LED Timer
LCD Timer
Clock Thermometer
Talking Clock PIC16F628A
Android Talking Clock
WiFi, Ethernet
WiFi Thermometer
WiFi ESP8266
IO for Chrome Browser
USB 16x2 LCD
USB TFT display BMP
USB Meter
USB Input-Output
USB Input-Output Android
Analogue to USB (CH341)
MCP3201 on Serial Port
PC Analog Input (USB-UART)
Serial TFT Text
Serial Inputs Outputs
Serial Port LCD
Analogue Signal to Serial
HC-SR04 Sensor
OLED Amp Meter
PC digital I/O (no coding)
Analogue Signal to LPT
LCD Display on LPT
Water Softener
3.7V to 5V
Solar Charger
PIC Music
Code Lock
  Technical Tips  


OLED display, 128x64, 0.96", SSD1306, I2C with PIC12F675. OLED is driven by software (bit banging) I2C. Code includes functions for reading the sensor. Moving the decimal point can be done in software only.
R is calculated for 5V drop at max AC current, R = 5 / I secondary. Trim 10K pot to desired reading. The voltage drop on the diodes doesn't cause an error because the transformer is a current source.
Ebay CT:
You are free to use the circuit diagram and the software with no limitations.

ct currentcurrent

Circuit Description
See also Technical Tips

Current transformer is normally 5 Amp primary to 10 mA secondary, in that case R is 500 ohm metal film resistor.
10K pot is to trim the PIC input to about 5V peak when the Aac is max.
Caps are for smoothing the rectified current.
470R are for reducing 5V to 3.3V input of the SSD1306.



The circuit is a high efficiency charger, it is useful for charging 6 to 12V batteries using small number of solar cells. The solar cells can be connected in series or parallel to generate 1 to 12V , cells voltage has to be lower than battery voltage. When the mosfet is on it charges the coil with energy from the solar cells, and when the mosfet is off that energy is discharged into the battery.

Circuit Description
See also Technical Tips

The 6 inverters CMOS are used as a free running oscillator.
The MOSFET charges the coil when it's on, and when it's off the coil dumps its charge via the diode into the battery.
BS170 can be replaced by equivalent MOSFET. The MOSFET and the diode are capable of charge currents up to 50mA, for higher currents they can be replaced by higher current components.


Comments and questions

Copy the number from the picture It stops net-robots from adding comments.

23.05.2022 - 09:24
Name: Moty
Comment: Hi Djalltra, The 10 bit ADC reads 0-1023 * by 5 = 5115. To get readings of 5000 use the trimmer. The PIC12F675 doesn't have enough RAM to calculate a float number so we use only integers.

22.05.2022 - 12:49
Name: djalltra
Comment: hello moty please i want to ask in this line of the code count=((ADRESH << 8) + ADRESL)*5 where the 5 comes from

05.05.2022 - 12:56
Name: Moty
Comment: Hi Djalltra, You can find the formula to calculate R in the project description above. R=5/secondary current, 208 ohm.

04.05.2022 - 16:21
Name: Djalltra
Comment: Hi moty thanks I'm going to be using your approach I also have another CT with 60A/24mA how do I calculate the resistor for this thanks

03.05.2022 - 12:24
Name: Moty
Comment: Hi Djalltra, Your circuit looks at the AC and my circuit convert it to DC before the MCU input. There are many ways to read CT by MCU, I chose my circuit because I tested it and it works.

03.05.2022 - 07:28
Name: Djalltra
Comment: Link

03.05.2022 - 07:27
Name: Djalltra
Comment: Hi moty thanks for the response please have a lookbat this link it is an inverter using a current transformer but as you can see the way it's connected is quite different from yours the also used two equal resistors to create an offset of 2.5v please am still yet to understand how to use the configuration any help would be appreciated.

01.05.2022 - 19:40
Name: Moty
Comment: Hi Djalltra, For your CT you need burden resistor of 100 ohm. It will give 5V at 50A. To read 50.00 instead of 5.000 swap the x value of the decimal point with x value of the second digit.

01.05.2022 - 18:05
Name: Djalltra
Comment: Hi moty how did you calculate the value of your burden resistor and can this method be implemented for any current transformer for instance I have a CT of 50A/50mA and I want to be able to read the AC current from my appliances

15.01.2020 - 22:30
Name: rc555n
Comment: Thanks

21.11.2017 - 12:59
Name: Suresh
Comment: I need some details about 30 watt solar panel and which type of batteries can choose for solar panel. My mail id is

17.02.2016 - 11:25
Name: Moty
Comment: Hi Seed. There are many discussions on this subject in this forum, you'll be able to get help there.

16.02.2016 - 16:12
Name: seed
Comment: I need soalr 12V 5W to 220V

20.11.2015 - 22:17
Name: David
Comment: interesting projects I love electronics

05.07.2015 - 23:25
Comment: GOOD

31.12.2012 - 19:54
Name: Moty
Comment: Hi Helal, For 12V battery charged at 20 mA you can use the circuit in the project with no changes.

31.12.2012 - 12:41
Name: helal
Comment: ineed 20 am 12v SOLAR BATTERY CHARGER

Name: Nick Mercury
Comment: What efficiency would you expect from this circuit? I need a 3.3 to 3.6V battery voltage (which chemical type battery would work best). I've sourced some cheap 3.6V 0.2W cells from ebay. I want to run a trial for a few months to see how it goes. Thanks Nick

Name: Moty
Comment: Hi Nick The efficiency of the charger is about 90% when the charge current is 50mA. You can use either NiCad or NiMH cells. You will find that solar cells give the full output on a bright sunny day and on cloudy day the output drops to about 5%. The efficiency of converting sun energy to electrical energy by solar cells is about 0.1%. The cmos 4049B will work at supply voltage of 3.3v but you will need to replace the mosfet with one that has a lower threshold gate voltage, i.e. RFD14N05 Hope you get the results you want.

Name: Santhosh
Comment: Hi I have a 2V 80mA solar cell and I need to charge a 7.2V 1200mAH Ni-Mh battery pack.Do I need to make any changes to this circuit.

Name: Moty
Comment: Hi Santhosh, You don't need to make any changes to this circuit for your application. When the cells source 80mA the charge current will be about 20mA.

Comment: Can I use 220uH inductor instead of 100uH

Comment: Can I use 220uH inductor instead of 100uH

Comment: Can I use 220uH inductor instead of 100uH

Name: Moty
Comment: Hi Santosh, You can either put 2 coils of 220 in parallel to get 110uH, or change the 100K resistor to 220K to adopt the frequency to the coil.

iconFlag  2008-2024