Тёмный

DIY Arduino power/energy meter 

Electronoobs
Подписаться 578 тыс.
Просмотров 71 тыс.
50% 1

Best & Fast Prototype ($2 for 10 PCBs): www.jlcpcb.com
Thanks to JLCPCB for supporting this video.
Months back we have build a current meter. Now, the last emter tutorial, we calculate power and print it on an OLED display. This project will measure current, voltage, power and energy. I've used a shunt resistor for the curent measure. More info below.
my Q&A page: electronoobs.com/eng_preguntas...
Help me on Patreon : www.patreon.com/user?u=4854866
Canal en Español: / electronoobs en español
LINKS
________________________________________________________
Tutorial webpage: www.electronoobs.com/eng_ardui...
Part list: www.electronoobs.com/eng_ardui...
Schematic Shunt: www.electronoobs.com/eng_ardui...
Schematic MAX471: www.electronoobs.com/eng_ardui...
Adafruit_GFX library: www.electronoobs.com/eng_ardui...
Adafruit_SSD1306 library: www.electronoobs.com/eng_ardui...
Code Shunt: www.electronoobs.com/eng_ardui...
Code MAX471: www.electronoobs.com/eng_ardui...
VIDEOS
________________________________________________________
Current meter: • Arduino based current ...
Capacitance meter: • Arduino capacitane met...
Inductance meter: • Inductance meter with ...
Resistance meter: • Arduino resistance met...
COUPONS
________________________________________________________
NANO Oscilloscope: www.gearbest.com/testers-dete...
3D RepRap festival: www.gearbest.com/promotion-re...
Power supply: www.gearbest.com/other-instru...
LCD power supply: www.gearbest.com/power/pp_402...
Gearbest anniversary: www.gearbest.com/m-promotion-...
Electrical Tools: www.gearbest.com/promotion-el...
PRINTERS
-------------------------------------
Ender 3(167€): www.gearbest.com/3d-printers-...
SparkMaker SLA: www.gearbest.com/3d-printers-...
Crealitu CR10: www.gearbest.com/3d-printers-...
Coupon code: "11CR10EU" or "11CR10US"
ANET E10 (219$): www.gearbest.com/3d-printers-...
Coupon code: "Anete10us"
TEVO Tarantula (175$): www.gearbest.com/3d-printers-...
Coupon code: "Tarantulaus"
Creality CR10 MINI: www.gearbest.com/3d-printers-...
COUPON: CR10MINI
Anet A8: www.gearbest.com/3d-printers-...
Coupon code: "A8KIDA"
Please, like, share and subscribe in order to motivate me for moe videos like this one. Thank you!

Наука

Опубликовано:

 

19 май 2018

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 106   
@ELECTRONOOBS
@ELECTRONOOBS 6 лет назад
I hope you like this review. Help me on: www.patreon.com/ELECTRONOOBS Join my Q&A: www.electronoobs.com/eng_preguntas.php Thank you/Gracias!
@UdDReX
@UdDReX 6 лет назад
can u plz make a li-ion battery capacity tester with 128x64 i2c oled display.
@arjunforest3097
@arjunforest3097 2 года назад
instablaster
@UpcycleElectronics
@UpcycleElectronics 6 лет назад
Ok... I have a bunch of things to say about this, as I recently tore apart and retraced one of the cheap Volt/current meters. I created a schematic and video about that device for reference. I suggest you take a look at it to help you understand a few bits. Those devices use a 3v3 regulator for the MCU and to power a LM358 which is essentially the dual version of the LM324, (not exactly the same but very similar). If you look at the circuit they use for the LM358 current sense amplifier there is a network of series resistors between Vcc, the op amp inverting sense pin, and the current shunt to ground. These are used to overcome the op amp's bias issues and get it into the linear region of operation. I had trouble replicating their circuit exactly myself, but there is an easier way. Just place any silicon diode, 1N4148, 1N4001, etc. between the output of one op amp and the feedback resistor. The op amp feedback loop will drive the output to compensate for the diode drop. This will put the output into the linear region and you'll get accuracy. Still don't understand? The op amp's output pin goes to the Anode of a diode (PANIC= Positive Anode Negative Is Cathode), then connect the cathode of the diode just like it's the output of the op amp. Next issue... I also tried several different combinations of multiple op amp stages like you did here. Don't do this. Your amplifying the error from your first stage. Do all of your gain settings in one stage. Once you compensate the circuit for linear operation you'll see it works perfectly and no need to try and rig code for none linearity in your op amp. Finally, your calculations for your shunt resistor are wrong as far as current ratings are concerned. You don't calculate a shunt resistor like a power resistor. Your not placing the shunt resistor in parallel with the load. Your placing it in series with the load. If you want to know the actual power rating needed you need to calculate the voltage drop at peak current. This voltage drop is the "Voltage" you plug into the equation to calculate the power rating needed. For example let's say you have PSU capable of 10v at 1A supplied to a load. This load is connected to the PSU positive output and to a 1 ohm shunt resistor on the common/return that is connected to the ground terminal of the power supply. In this situation, the shunt resistor is not connected to the positive terminal of the power supply. This means we can't calculate the power rating based on it's voltage drop like a power resistor. This should make sense if you think about it. *Your trying to amplify this voltage drop in order to calculate the current of your circuit. If the voltage drop across the resistor is the power supply voltage, what the heck are you trying to measure and amplify?* The number your trying to amplify is the actual voltage number you need to use to calculate the power rating of your shunt resistor! You know this number is tiny and fairly linear, but obviously this changes in the circuit and you still need to calculate the power rating for your shunt resistor right?!? How do you do this? It's very simple and easy. You need to know the maximum current your power supply circuit can supply. In my example above, (10v at 1A w/ 1ohm shunt), you know you have 1A across a 1 ohm resistor. This is going to create a 1 volt drop across the shunt resistor when there is the maximum of 1 amp across it. This means that the shunt resistor only "sees" 1 volt at 1 amp, so it will dissipate 1 watt. The big mistake people make is calculating a shunt resistor as if it's a power resistor, aka the resistor as the load/as if the whole power supply voltage is placed across the shunt. If you did this *wrong* like many people do you might calculate 10 volts across 1 ohm is 100 watts. That is how you calculate power resistors/a load, but it is totally incorrect for calculating resistors in series, aka shunt resistors. The other problem people tend to miss is that the load is going to see the same voltage drop in the circuit as the voltage drop of the shunt. This means that at 10 volts and 1A the load is only getting 9v due to the 1 ohm shunt's 1volt drop. You can build your power supply to compensate for this or you can use a tiny shunt resistance value that creates a very small voltage drop. If you think about it, with our 1 ohm shunt resistor example, you don't even need a current sense amplifier. You can use the internal reference of the AVR and set up the ADC to read from 0-1v. Choosing a lower value shunt resistor allows you to minimize the effects of the shunt resistor voltage drop, but the voltage drop is too small for the ADC to measure and therefore you need a current sense amplifier. This type of common/return shunt resistor is still very crude but it is reasonably accurate and enables you to use cheap jellybean op amps. Better designs work on the positive terminal but that requires a much more advanced differential amplifier configuration...I think... that's one I want to explore more and test out soon on my bench. Hey, at least you didn't etch something yourself on a tiny SMD PCB just to learn about the bias current and none linear op amp issue. You should be able to add a diode to your protoboard design easily and fix the problem. -Jake
@ELECTRONOOBS
@ELECTRONOOBS 6 лет назад
Thank you very much!
@raagamparmar179
@raagamparmar179 3 года назад
I dont think everyone is going to read T H I S L O N G ! Anyways, I am reading it now, appreciate the time you took to write this.... :-)
@UpcycleElectronics
@UpcycleElectronics 3 года назад
@@raagamparmar179 yup
@walter6574
@walter6574 2 месяца назад
I read your entire comment, excellent. Furthermore, using a coil of wire as a resistor only works if the wire is varnished and if it is pure d.c. not even ripple d.c. as any fluctuation in current will cause magnetic flux around the coil (resistor) inductive reactance will add to the resistance (impedance) of the circuit.
@FreeCircuitLab
@FreeCircuitLab 3 года назад
a pcb track can be used as shunt. Recently I made a usb V/I meter using an op amp without μC. Its gain is so adjusted that a multimeter can show the current value in terms of Voltage. This way we can reduce the effect of the meter cable resistance
@DemiHD1
@DemiHD1 4 года назад
@Electronoobs is it possible with higher voltage and current? I want to build one for my van to see how much Amp hours I need. So max. 14V and 150A. What I have to change? Only the shunt and the settings in the program?
@fyremusic6307
@fyremusic6307 4 года назад
Excellent video, almost exactly what I was looking for. But is there a way to use this power meter (could be slightly changed) and give a constant output of 5V? And what is the output power?
@jaigarg3990
@jaigarg3990 6 лет назад
Plz do a esp8266 with Arduino tutorial in your style As you explain stuff very well
@azolalesedi3191
@azolalesedi3191 4 года назад
HI, how would i go about coding the eeprom to store the data and remeber it when power is switched on again?
@devilvortex1
@devilvortex1 5 лет назад
hi! can i use 10 ohm 115 watt ceramic resistor for measuring hight current up 100amps?
@rodinsuniga5549
@rodinsuniga5549 5 лет назад
can you please explain the formula used to get the energy?
@kjohn4687
@kjohn4687 5 лет назад
Will you please help me to find the power factor using Arduino in order to calculate the AC power?
@proyectosledar
@proyectosledar 6 лет назад
Hola, hace un tiempo intente hacer esto para adaptarlo a mi fuente variable. Pero no estaba conforme con la resolucion y precision del arduino. Asi que termine usando el arduino mas el ina226, y quedo perfecto. Saludos
@ELECTRONOOBS
@ELECTRONOOBS 6 лет назад
Lo que puedes hacer es un Oversampling del ADC de 10 bits y llegar hasta 4096 en valor decimal pero para voltajes hasta 1.1V. Cambias la ganancia del OPAMP para hasta ese rango pero la resolucion es mucho mayor con 1.07mV por paso. Saludos!
@fouzaialaa7962
@fouzaialaa7962 6 лет назад
ma dude ...your editing is on point !!!!
@vikaschouhan7859
@vikaschouhan7859 6 лет назад
I'm curious to know what's inside of that 'Time Travel Stuff' Box 😐
@mission_critical
@mission_critical 6 лет назад
hey there, really awesome project, wonderful to point explanation, the only thing i felt missing is designing a proper 3d printed case, i mean you even made this portable by powering the circuit via Li-Po , you could had made a practical Multi-Meter Style box or something that is humane to hold, anyways, this is awesome, cheers to great work!
@bfgelectronics6226
@bfgelectronics6226 6 лет назад
Works with White Blue color 128X64 OLED LCD LED Display Module For Arduino 0.96" I2C IIC Serial new original?
@TioMuhamadNur
@TioMuhamadNur 4 года назад
Hello electronoobs, this cool video. How can i get 121 OpAmp gain? Thanks
@raghavsrivastava2910
@raghavsrivastava2910 6 лет назад
Hey,well I should visit Spain or not.There is bigass summer here in India.🍉🍉🍉🍉🍉🍉🍉.How is the weather there electronoobs.
@GaneshKumar-gg5ol
@GaneshKumar-gg5ol 6 лет назад
please make a video on wirelessly programming of arduino using hc 05
@Keventhc
@Keventhc 5 лет назад
Can I use this to measure eanergy form an wall out let isialing 120 vac
@jimb032
@jimb032 5 лет назад
NO!! It is absolutely not safe for use on mains, and if you have to ask, you shouldn't be making a project like that. (I'm not trying to be mean - start with low voltage projects until you know what you are doing and have confidence). Also please note the input reference voltage on the schematic. Further, this is for DC. Be careful - your life or a house fire is not worth it.
@nikoskotsilitis1999
@nikoskotsilitis1999 2 года назад
Hello my friend Excellent video. I would like to measure 600v, 10amps please tell me.If i can change only the resistors in input;
@stephanc7192
@stephanc7192 6 лет назад
Enjoyed the video I have recently tried the same setup, i tried using an 3 op amp instrumentation amplifier. Still a work in progress. You used a massive shunt resistor. That 100 watt resistor would go to 100 Amp with proper cooling. I used a 0.1 ohm 5 watt shunt resistor that will easily measure up to 5 amp at 2.5 watt. Kind regards
@studentofedison421
@studentofedison421 2 года назад
Awesome
@ovi_4
@ovi_4 6 лет назад
Great video keep up the good work but in order for everybody to enjoy your videos you need to learn the correct pronunciation of the word current thank you.
@rajendrachauragade8381
@rajendrachauragade8381 6 лет назад
Can you make a multi meter
@SantoshBhagwat1976
@SantoshBhagwat1976 3 года назад
I am santosh, i use to see your video regularly, also trying the seme ckt. With code , but when try to made this project, all is fine only when i don't apply measuring voltage & current, still there is some reading on display like, 0.244V. & 0.026A , so how to solve this problem ?? Please guide me to solve this problem. Santosh
@EasyOne
@EasyOne 6 лет назад
good
@johnflasher2877
@johnflasher2877 6 лет назад
yo can you do a how to video for diversity video reciever rx5808 module ?
@jim9689
@jim9689 4 года назад
I hope you're using magnet wire for those crazy homemade resistors.
@bertoid
@bertoid 6 лет назад
Very nice project, thanks. BTW: The tang on the screw terminal can slide into the next one, so that they lock together in a straight line, instead of jamming together at an angle as shown.
@electronic7979
@electronic7979 6 лет назад
Excellent project
@midianalbertokhaiyow8195
@midianalbertokhaiyow8195 6 лет назад
otro excelente video...
@roadeycarl
@roadeycarl 6 лет назад
Awesome project! Why did you use two opp amp inputs rather than just changing the resistor values for a bigger gain on one opp amp?
@TheCanvaStudio
@TheCanvaStudio 3 года назад
Can I buy it?
@faizurrahman2399
@faizurrahman2399 5 лет назад
Plz, make a 18650 li-ion battery capacity tester
@MCsCreations
@MCsCreations 6 лет назад
Really awesome job, man. That way should be easy to make a 18650 batteries tester. 😊
@ELECTRONOOBS
@ELECTRONOOBS 6 лет назад
MC's Creations thanks. Keep up!
@Crucifixionmachinemusic
@Crucifixionmachinemusic 6 лет назад
I had no idea that the "Spinal Tap" Joke, "ours goes to eleven!" was based in electronics... the op-amps each have a gain of 11.
@ELECTRONOOBS
@ELECTRONOOBS 6 лет назад
True! LOL
@kostaslaza12
@kostaslaza12 6 лет назад
great video !!
@andrei4171
@andrei4171 5 лет назад
It is not ok to have a current shunt as a coil. You have to wind is such manner to cancel the current, in this way it is not reacting like a coil. Have a look on ElectroBoom channel too see how to make one. Although a very good video about power meter. Keep up.
@benebene9525
@benebene9525 6 лет назад
great scott has made a better one over one year ago.
@abdelssami
@abdelssami 5 лет назад
and what did you made exept of writting this stupid comment
@ABID5
@ABID5 5 лет назад
I think Scott used the INA219 which is ready made.
@wachiralvi6760
@wachiralvi6760 6 лет назад
how to make an arduino uno hdmi shield?
@Bleibruk
@Bleibruk 6 лет назад
Porque no haces los mismos videos del canal en inglés en el de español? Es más! Tú debes hacer un guión para tus vídeos, cojes el guión en español y lo agregas como subtitulos en RU-vid
@sksuman4400
@sksuman4400 5 лет назад
may I use it for 230v also?
@sanjaybaswa6992
@sanjaybaswa6992 5 лет назад
Can we use it fo for 230 volts..
@jimb032
@jimb032 5 лет назад
NO!! It is absolutely not safe for use on mains, and if you have to ask, you shouldn't be making a project like that. (I'm not trying to be mean - start with low voltage projects until you know what you are doing and have confidence). Also please note the input reference voltage on the schematic. Further, this is for DC. Be careful - your life or a house fire is not worth it.
@RDarrylR
@RDarrylR 6 лет назад
Excellent video. I’m going to build one of these. I’m looking forward to some videos showing things In your "time travel stuff" box :)
@ELECTRONOOBS
@ELECTRONOOBS 6 лет назад
Thank you! The time travel box is secret for no!
@impedancjaRLC
@impedancjaRLC 6 лет назад
Why did you use two series amplifier instead of using one with higer gain?
@hinlow9775
@hinlow9775 5 лет назад
No have AH
@rahulkushwaha1984
@rahulkushwaha1984 6 лет назад
Is there any comparison between atmega328 and Intel 8086?
@KidCe.
@KidCe. 5 лет назад
Where is the code for PowerCalculation? i cant find it :(
@brice9613
@brice9613 6 лет назад
I built a system almost identical to this as a part of my ebike controller. Just that I use a 50 w 0.01 ohm resistor, a different op amp gain and a nokia spi display. When the system is measuring 0-10 A it is relatively accurate but when the current goes to 30+ amps it shows almost double the true value. Any ideas ?
@danielkohwalter5481
@danielkohwalter5481 6 лет назад
Any saturation on the amplifier stage? Or problems on switching between one analog port or another? Try to make a double analog reading on the arduino code and use only the second value and check if the analog part of the amplification is working properly.
@ELECTRONOOBS
@ELECTRONOOBS 6 лет назад
I had same problem and this is what I've done. I've made measurements for 1amp, for 2,3,4 etc till amxumum value of my system and realise there is a linear value added to the measurement so in the code i've subtracted that value linealy.
@alagarkrishna96
@alagarkrishna96 6 лет назад
What is the maximum power it can measure ??? Without any heat dissipation in ckt
@kamalambrator4332
@kamalambrator4332 6 лет назад
NICE!!
@DoctorThe113
@DoctorThe113 6 лет назад
I want to measure 220volt AC of my house. Should I use voltage divider?
@KrisX7331
@KrisX7331 6 лет назад
UnderstandQuantum ! Get a current transformer and amp meter they are not expensive.
@DoctorThe113
@DoctorThe113 6 лет назад
Кристиян Митев I think I have said voltage not current. I can't measure transformer for measuring voltage. Because it is not real time. It has some phase like 90°.
@KrisX7331
@KrisX7331 6 лет назад
UnderstandQuantum ! Oh sorry my mistake. I think voltage is mesured by resistors and letting some really small current through them but i still dont know for sure.
@IscleGaming
@IscleGaming 6 лет назад
I think this setup will not be accurate at all. As the battery voltage changes, the internal voltage reference for the ADC will change as well, and because the ADC values are referenced to the voltage reference (as the name implies), you will get a value proportional to the battery value. This could be solved by adding a step-up 5v regulator to be sure that the input voltage for the ATMega328p is always the same.
@ELECTRONOOBS
@ELECTRONOOBS 6 лет назад
True. Thanks
@fouzaialaa7962
@fouzaialaa7962 6 лет назад
the nano have a 3.3 regulator inboard so no matter what voltage the battery have the reference is always 3.3 so theoretically its always the same
@IscleGaming
@IscleGaming 6 лет назад
That is incorrect. The nano does have a 3.3v regulator, it's from the USB to Serial converter, but the microcontroller is not powered by it. The 5V pin is directly connected to VCC and the 3.3v is just an output, it's not used by the arduino in any way in the case of the Nano. What you could do is power the chip with 3.3v via the 5v pin, using a LDO 3.3v regulator connected to the lipo, but I'd rather use a 5v step-up regulator instead.
@fouzaialaa7962
@fouzaialaa7962 6 лет назад
im sorry the regulator is a 5V one i just checked the datasheet and the regulator is supplying the atmega ship !!!!!
@IscleGaming
@IscleGaming 6 лет назад
Yes, there is a 5V regulator which only works if you power it from the Vin pin, but even then you need at least 6.1v for it to be able to supply 5v correctly, as it has a dropout voltage of 1.1v moreless.
@suriyasuri2018
@suriyasuri2018 6 лет назад
Thanks.....I have learnt many things noobs.....and way present is awesome man....👦👦👦
@user-do7li4cb1w
@user-do7li4cb1w 4 года назад
Wondering if you would be interested in a project! Please DM me
@YogeshPuriLevitation
@YogeshPuriLevitation 6 лет назад
How to use 16x2 lcd instead of OLED. Code please. Thanks in advance.
@nsg650
@nsg650 6 лет назад
but when you coil the wire then it becomes a inductor and filters out the signal
@Nono-hk3is
@Nono-hk3is 6 лет назад
Turn it up to eleven? Good idea.
@vovanikotin
@vovanikotin 6 лет назад
Andrei, you are not terminated not used opamps in 324, again... This can cause excessive energy consumption.
@ELECTRONOOBS
@ELECTRONOOBS 6 лет назад
Ave Vovus! Yes true. I'll change and upload a new schematics with the non-used OpAmps. Thanks!!!
@vovanikotin
@vovanikotin 6 лет назад
cheers! btw this is good subject to explain in new video.
@GapRecordingsNamibia
@GapRecordingsNamibia 2 года назад
I would like to ask you something please if I may. So...... Is the schematic correct as shown above @ 4:45? And is this high side or low side? You are explaining this as if it is high side, but your circuit DOES NOT MATCH. You have the resistor in parallel to your load can you please fix this? This is VERY confusing, PLEASE PLEASE PLEASE, fix it. On the web site as well, you are confusing people whom you are supposed to be teaching, we all make mistakes and it is not a big deal to say sorry and fix it. as this video is so old maybe you can do an update on this specific video and link the update into this video's description? I don't mean this in a negative light but as constructive.
@prathambhatnagar8653
@prathambhatnagar8653 6 лет назад
What happen to our brushed Motor drone
@danielkohwalter5481
@danielkohwalter5481 6 лет назад
If you gonna measure current values up to 1A and uses a 10mR resistor, the resistor dissipates only P = R * I^2 = 10mW. The 10mR x 10W resistor is only necessary if you going to measure I = sqrt(P/R) = sqrt(10/0.01) = sqrt(1000) = 31.6A!!! I didn't understand why you said those specs for the shunt resistor on the video.
@martinwestermeyergondonnea84
@martinwestermeyergondonnea84 6 лет назад
the wrong readings are probably caused by the offset voltage of the lm324 also
@cartoonworld5557
@cartoonworld5557 6 лет назад
Hi bro ....good job man ....really awesome project . Dude i want to make 3ampr current booster .what i do ? .please help me bro . I want to make small 3ampr current regulator for brushed drone . Can u give me a great circuit form google.
@TheGhatho
@TheGhatho 6 лет назад
Hola cuando veremos volar el minidrone?
@veigauges
@veigauges 6 лет назад
I generally like your videos, but the "schematic" at 4:46 in this video leaves me disappointed.
@AKIMBOASSASSIN67
@AKIMBOASSASSIN67 6 лет назад
So...what's in the 'time travel stuff' box? Haha
@leonardofranco7398
@leonardofranco7398 4 года назад
The cürent.
@aleksandar4923
@aleksandar4923 4 года назад
Kurent
@The_Weeezard
@The_Weeezard 6 лет назад
You're trying too hard to produce content like GreatScott!'s
@headstonegraveyards5370
@headstonegraveyards5370 6 лет назад
So what?
@abdelssami
@abdelssami 5 лет назад
and you are trying too hard to had a stupid comment like that
@darthvader9711
@darthvader9711 5 лет назад
I hate the way you say currrent, you are doing it wrong man....
@beardedsawyer6322
@beardedsawyer6322 6 лет назад
All this complexity to measure DC? Sorry, your effort is good, but that's some rubbish design.
@eelipulkkinen4888
@eelipulkkinen4888 6 лет назад
You copied idea from great scott
@He4vyD
@He4vyD 6 лет назад
It would help if you would articulate better, sometimes you slur your words and it makes it hard to understand u
Далее
Sensors - which one to use
17:06
Просмотров 1,3 млн
ТРОЛЛИНГ СКАМЕРА СТАНДОФФ 2
00:59
HYDRAULIC PRESS VS ARMOR, USA AND RUSSIA
10:16
Просмотров 8 тыс.
DIY Home Energy Monitor & CT sensors explained
6:54
Просмотров 143 тыс.
Arduino capacitane meter with LCD screen
13:56
Просмотров 66 тыс.
Inductance meter with Arduino
12:29
Просмотров 125 тыс.
Make your own Power Meter/Logger
6:33
Просмотров 1 млн
Make A Simple Arduino Energy Meter
6:47
Просмотров 144 тыс.
Худшие кожаные чехлы для iPhone
1:00
ОБСЛУЖИЛИ САМЫЙ ГРЯЗНЫЙ ПК
1:00
#engineering #diy #amazing #electronic #fyp
0:59
Просмотров 2,1 млн