Scullcom Hobby Electronics # 34 - Design & Build a 6½ Digit Millivolt Meter Part 3

Ғылым және технология

In Part 3 of this project I cover Improvements to the input protection. We also add two new features which include storage of calibration setting in EEPROM for automatic calibration at switch-on. The other new feature is an additional button to allow user to set number of displayed decimal place.
Below is the link to download the new software version for this project:
www.scullcom.com/LTC2400_voltm...

Пікірлер: 112

  • @BobMellor1954
    @BobMellor19548 жыл бұрын

    I hope that many electronics enthusiasts would agree, that yours is probably one of the best electronic, educational channels on KZread; many thanks. Regards Bob

  • @scullcomhobbyelectronics1702

    @scullcomhobbyelectronics1702

    8 жыл бұрын

    +Bob Mellor Thanks, your most kind.

  • @ChipGuy
    @ChipGuy8 жыл бұрын

    Good idea. But the schottky diodes still can have up to 2µA of reverse leakage current. With a 900K/100K divider this could add up to 20% of failure, in theory. You need that value as low as possible like that of an BAV199 at 3pA for instance.

  • @scullcomhobbyelectronics1702

    @scullcomhobbyelectronics1702

    8 жыл бұрын

    +Chip Guy Vids Thanks for your comments. I will be looking at other input solutions for this project.

  • @justintimber5058
    @justintimber50584 жыл бұрын

    You are a very good teacher. It is pure fun to watch your videos.

  • @Kanalie2006
    @Kanalie20068 жыл бұрын

    You sir are a pure inspiration. Love your pureistic but very professional style! Keep it up!

  • @scullcomhobbyelectronics1702

    @scullcomhobbyelectronics1702

    8 жыл бұрын

    +Volker W. Thank you.

  • @TYGAMatt
    @TYGAMatt3 жыл бұрын

    Your work is an inspiration to novices like myself. Excellent stuff!! I watched your DC load series first which was a little above my ability but this is something that I can have a bash at. :-)

  • @AerikForager
    @AerikForager8 жыл бұрын

    Thanks for the great update, great work as always. :) I saw in the comments the software update from Andre, and I look forward to future updates, as the community helps perfect this already great project!

  • @scullcomhobbyelectronics1702

    @scullcomhobbyelectronics1702

    8 жыл бұрын

    +Aerik Forager Thanks. Andre has been very helpful with the software updates and I will provide them as a download in Part 4 of the project.

  • @harveyellis6758
    @harveyellis67588 жыл бұрын

    Excellent update to a very good project. Always a pleasure to watch your videos and learn

  • @scullcomhobbyelectronics1702

    @scullcomhobbyelectronics1702

    8 жыл бұрын

    +Harvey Ellis Many thanks.

  • @MrRoyzalis
    @MrRoyzalis8 жыл бұрын

    Nice project and well explained. also,I adjusted KZread settings for video speed of 1.5 of normal, and the voice became clearer for me over in the US.

  • @scullcomhobbyelectronics1702

    @scullcomhobbyelectronics1702

    8 жыл бұрын

    +Roy Zalis Thanks. I did not realise I sounded better at 1.5 times the normal speed!! LOL

  • @sjaakbenzia7882
    @sjaakbenzia78828 жыл бұрын

    Just found your channel by accident and I am already hooked! Keep it up!

  • @scullcomhobbyelectronics1702

    @scullcomhobbyelectronics1702

    8 жыл бұрын

    +Sjaak Benzia Thank you.

  • @GiorgioFirpo_IU1BKT
    @GiorgioFirpo_IU1BKT8 жыл бұрын

    Awesome video and project. Many thanks for Your work. Giorgio

  • @scullcomhobbyelectronics1702

    @scullcomhobbyelectronics1702

    8 жыл бұрын

    +Giorgio Firpo Thanks.

  • @radio655
    @radio6558 жыл бұрын

    To avoid the problem with measuring very small voltages, would it not make sense so create a negative voltage by lifting ground to a virtual ground potential by adding a single diode (thus giving you a -0.6v rail to power the negative supply of the buffer op amp)? 2.) re the new button, why not use the internal pull up? 3.) No need for a Schmitt trigger to debounce. The delay in your loop will take care of that.

  • @scullcomhobbyelectronics1702

    @scullcomhobbyelectronics1702

    8 жыл бұрын

    +Jan Lategahn Thanks for your comments. Using a negative voltage to lift the input from ground may cause other issues. I am currently looking at other types of OP Amps and designs for the input circuit. Good point about using the internal pull-up resistors. I have been trying several delay loops to over come debounce but find there are still problems - a Schmitt Trigger which has a hysteresis loop may prove to do a better job as there are clear voltage thresholds.

  • @rayreese2
    @rayreese28 жыл бұрын

    Excellent video. By the way, you have some very insightful viewers...their comments are very educational to a rank amateur like me.

  • @scullcomhobbyelectronics1702

    @scullcomhobbyelectronics1702

    8 жыл бұрын

    +Ray Reese Thanks. Yes it nice to get lots of good constructive comments which also help others to.

  • @michaeliv6064
    @michaeliv60648 жыл бұрын

    Great video, please continue making more :). Feature suggestion: make the input have no polarity requirement - when -1 v is applied, have the display show -1.000000v.

  • @scullcomhobbyelectronics1702

    @scullcomhobbyelectronics1702

    8 жыл бұрын

    +Michael Iv Thanks for your comment. Yes this could be an option.

  • @benadams6332
    @benadams63328 жыл бұрын

    I would still use silicon diodes for input protection. Schottky diodes tend to have much higher leakage current than silicon diodes. Something like a BAV99 would work well.

  • @scullcomhobbyelectronics1702

    @scullcomhobbyelectronics1702

    8 жыл бұрын

    +Alfred Stampe Thanks. The BAV99 could be a good option as they are ultra fast. I will look in to the schottky diodes as regards your comments.

  • @robertcalkjr.8325
    @robertcalkjr.83258 жыл бұрын

    Nice video. Thanks for the hard work.

  • @scullcomhobbyelectronics1702

    @scullcomhobbyelectronics1702

    8 жыл бұрын

    +Robert Calk Jr. Thanks Robert.

  • @rvionics
    @rvionics6 жыл бұрын

    Excellent!, Thanks for all the efforts very nice video for hobbyist

  • @scullcomhobbyelectronics1702

    @scullcomhobbyelectronics1702

    6 жыл бұрын

    Thanks Rahul. Regards, Louis

  • @supyrow
    @supyrow8 жыл бұрын

    This is definitely on my project list! :) I was clapping my hands when I saw it read out your REF Voltage! Voltage logging is a great feature! especially with my fading memory. Great Work! personally I would go with the schmitt trigger. (im a hardware guy, besides I think circuit boards should have parts on them, rather than one chip solutions) Well Done!

  • @scullcomhobbyelectronics1702

    @scullcomhobbyelectronics1702

    8 жыл бұрын

    +su pyrow Thanks for your comments. As a hardware engineer I also like using a schmitt trigger to improve problems with key bounce.

  • @tobortine
    @tobortine8 жыл бұрын

    Great job well done.

  • @scullcomhobbyelectronics1702

    @scullcomhobbyelectronics1702

    8 жыл бұрын

    +tobortine Thank you.

  • @antiElectron
    @antiElectron8 жыл бұрын

    Very good explanation and nice video.

  • @scullcomhobbyelectronics1702

    @scullcomhobbyelectronics1702

    8 жыл бұрын

    +antiElectron Thanks.

  • @voltlog
    @voltlog8 жыл бұрын

    Nice to see you keep improving the project, quite interesting these new features. Regarding the bounce issue on the tactile switch you can add a software debounce routine that could filter out the noise.

  • @scullcomhobbyelectronics1702

    @scullcomhobbyelectronics1702

    8 жыл бұрын

    +VoltLog Thanks for your comments. I am currently testing software debounce routine as well as hardware debounce options and will try and discuss in Part 4 of this project.

  • @DavidLeeMenefee

    @DavidLeeMenefee

    8 жыл бұрын

    +VoltLog Agree. The debounce routine is very effect. I have used it many time. There is a good description of the debounce routing for example in Jeremy Blum's book: Exploring Arduino. Of course one could just type into google the words "software debounce routine" and get many examples I suppose.

  • @Spongman
    @Spongman8 жыл бұрын

    i think you could eliminate the need for both a precision resistor network on the input, and the trimmer pot by adding an additional step to the calibration sequence. if you did: 1) wait for cal button 2) display "short input" 3) wait for cal button (debounce in software) 4) read average ADC (i'd recommend reading at least 20 values for cal) 5) display "connect input to Vref" 6) wait for cal button 7) read average ADC again 8) store both values in EEPROM now you have the ADC readings for V=0 & V=Vref, you can just solve the linear equation on each conversion to get the actual voltage. also, you might want to thermally bond your input resistors together.

  • @scullcomhobbyelectronics1702

    @scullcomhobbyelectronics1702

    8 жыл бұрын

    +Spongman S Thanks for your comments. I will be taking another look at the input circuit and calibration.

  • @Spongman

    @Spongman

    8 жыл бұрын

    +Spongman S Just in case anyone wants to try this, the function is: Vt = (ADC(Vt) - ADC(0)) * Vref / (ADC(Vref) - ADC(0)) where Vt is the current voltage. ADC(Vt) is the current ADC reading. ADC(0) is the ADC reading when the inputs are shorted ADC(Vref) is the ADC when the input is connected to Vref Vref is the measured reference value (presumably close to 4.096V) the nice thing about doing it this way is you don't need to scale the ADC reading at all (you still need to mask off the status bits). you can just store the raw, uint32_t, summed readings (you don't even need to divide the average). you can calculate the float constant Vscale = (Vref / (ADC(Vref) - ADC(0))) when updating/reading the cal values, then the above calculation just becomes: Vt = (ADC(Vt) - ADC(0)) * Vscale;

  • @scullcomhobbyelectronics1702
    @scullcomhobbyelectronics17028 жыл бұрын

    PIRATEMAN COMMENTS REPLY - For some reason unable to reply below to your comment due to You Tube problem for some reason. So answer is here instead: Thanks for your comments Pirateman. There are some benefits to using hardware debounce solutions as oppose to a software delay. A software debounce delay does not normally stop any EMI (electromagnetic interference) caused by switch contact bounce. Where EMI occurs around a microcomputer system, such as the Arduino, this can cause other interference issues. Also software debounce normally adds some overhead delay in the main software routine (unless you use an interrupt routine) which may or may not be an issue depending on the application. Having said that, there are still times when you would use a software debounce option. Remember, switch debounce occurs both on switch closing and switch opening. A good software solution would be to use a timer interrupt routine (this may even give some EMI protection). There are many solutions for switch debounce both hardware and software, sometimes its good to use a combination of the two. It may be worth doing a separate video on switch debounce and solutions.

  • @psiphi8648

    @psiphi8648

    8 жыл бұрын

    +Scullcom Hobby Electronics next level in the matter of youtube electronics channels !(by far the best out there) one requirement is if you would have the time to make some videos on electric motor controll dc and ac

  • @scullcomhobbyelectronics1702

    @scullcomhobbyelectronics1702

    8 жыл бұрын

    +Psi Phi Thanks for your comments. I am currently working on two new projects but when I have more time will look at electric motor control.

  • @psiphi8648

    @psiphi8648

    8 жыл бұрын

    Scullcom Hobby Electronics thanks i will watch them the channel is the real deal

  • @zx8401ztv
    @zx8401ztv8 жыл бұрын

    Smashing additions :-D You have been busy :-D I did expect the switch to play up, perhaps a series capacitor then second pull up resistor would help. Loving the saved calibration and decimal point additions, i would use the dp to stop the whittering of the microvolt noise, its of no use so dont display it :-D I understood some of the added code, but only because you were decoding the jibberish for me ha ha :-D.

  • @scullcomhobbyelectronics1702

    @scullcomhobbyelectronics1702

    8 жыл бұрын

    +zx8401ztv Thanks. I am no expert at Arduino programming and my code may not be the best but it seems to work. Andre Eisenbach in the comments has very kindly re-written the software for me in a more professional way and I will add that as a download version in Part 4 of this project.

  • @andymouse
    @andymouse4 жыл бұрын

    Excellent...cheers.

  • @michalvanco
    @michalvanco8 жыл бұрын

    Sir, your presentations are all very well and professionally prepared and presented. Thank you for that. Multiple input ranges (/10, /100, /1000) i.e. having for example mV range with full 24-bit resolution would be awesome ...

  • @scullcomhobbyelectronics1702

    @scullcomhobbyelectronics1702

    8 жыл бұрын

    +michalvanco Thanks for your comment. I will be looking at multiple ranges for this project.

  • @kirknelson156
    @kirknelson1568 жыл бұрын

    nice build and well done on the video as well. :)

  • @scullcomhobbyelectronics1702

    @scullcomhobbyelectronics1702

    8 жыл бұрын

    +Kirk Nelson Thanks.

  • @int2str
    @int2str8 жыл бұрын

    Looking at the code, I think there is a bug in there. If I read the datasheet for the LTC2400 correctly, SDO will indicate !EOC (end-of-conversion) after CS goes LOW. I'm not sure why you're using direct port access in that function only (timing?), but either way, you're only checking the value once and are actually missing a return value if it's not ready. Maybe this is why you have to purge the "garbage data" in the beginning? Also, some general coding tips (I am benefiting a lot from your electronics work, so maybe I can share some coding tips to give back?): - The huge amounts of comments are nice in some respect, but a hindrance in others. I think this comes from assembly experience? :) Instead of commenting, I would simply make the code do the talking! That way you also avoid out-of-date comments (like the decimal place related ones in your code). - The same goes for variables. Instead of having single letter variables with a comment, just make the variable name speak for itself. - The Arduino IDE has an "auto-format" option in the Tools menu to format code. - As mentioned, the ADC should indicate end-of-conversion, should not require delays. - Use a function to read the sample data to avoid code duplication (the averaging code etc. is twice in your code. - Not sure about your button handling code, are the buttons pulled high or low? I've added code to enable the internal pull-ups. But I currently don't remember what the schematic looks like for your device? - Reduce the need for global variables, as it's hard to keep track of their state sometime, which can lead to errors. That's most of what comes to mind right now. Here's a cleaned up version of your code - completely untested of course since I don't have the hardware, but should do the trick (modify to suit): pastebin.com/Ka62vSzM Happy to answer any questions.

  • @scullcomhobbyelectronics1702

    @scullcomhobbyelectronics1702

    8 жыл бұрын

    +Andre Eisenbach Many thanks Andre for the time you have taken to help re-write the software which is much appreciated. I can see you are a professional when it comes to C++ programming. My programming skills date back to assembly programming the 6502 microprocessor back in the 1970's. My background is as a electronics hardware engineer so software is not my primary skill so still learning programming the Arduino. I downloaded your Version 6 of the software from the link you gave and tested it on the Millivolt meter. When I first ran it it seemed to be stuck in the calibration loop but after making a minor change your software version works perfectly. The main loop of the programme now runs faster so I was able to increase the number of samples taken from 4 to 6. I also had the increase the very simple de-bounce delay from delay(100); to delay(350); as the decimal places were jumping several places at a time. Below are the changes I made to your code: In the main loop: if (digitalRead(BUTTON_CAL) == LOW) { I had to change it to if (digitalRead(BUTTON_CAL) == HIGH) { As the current hardware, for the Cal Button, has a 10K resistor from the digital pin to ground and the push button takes the data pin to +5v (via another 10K resistor) when pressed. The other changes I made was: delay(100); // Very simple de-bounce delay was changed to delay(350); // Very simple de-bounce delay The decimal places button can still sometimes not respond on first press, but maybe we can work on that in hardware. And finally as your code was much faster than mine It allowed me to increase the number of samples taken for averaging, so I changed: #define NUMBER_OF_SAMPLES 4 to #define NUMBER_OF_SAMPLES 6 With these minor changes you code seems to work perfectly and is a big improvement from my attempt. The only feature which is now missing from my original code is default decimal place settings to the display for uV (0 decimal places), mV (2 decimal places) or V (6 decimal places) readings. But this is not that important now as the user can select their own decimal places by the new button. Between your software skills and my hardware skills I think this Millivolt Meter should be a nice project for the hobbyist. Many thanks again for your help. I will include this version of software as a download in Part 4 of this project. Is it possible for you to message me privately with your email address as I would like to send you a built version of the Millivolt Meter project as a thank you. Regards, Louis

  • @ElmerFuddGun

    @ElmerFuddGun

    8 жыл бұрын

    +Scullcom Hobby Electronics - After reading Andre and your comments I think there is a problem with the push button switch circuit that would explain why it doesn't respond some times and why you had to increase the delay(). It looks like you have three resistors involved when you really should only have one. First Andre has the internal pull up turned on (20k I think) and then you have it pulled down with an external resistor. So it is at some level in between with the capacitor. Then you have another resistor involved trying to pull it up when when you press the switch. Unless I have misread the above, here lies your problem. The signal level is likely about 1.7V without the key being pressed. Press the button and now you have it being pulled high through another 10k resistor to 5V. Now you have one resistor pulling low with 10k and a 20k in parallel with a 10k pulling it high and at the same time a capacitor wanting to delay any change. 20k in parallel with 10k is 6.7k pulling high and 10k pulling low = about 3V which is right at the switching level of a digital input on the Arduino. So you have gone from 1.7V to 3V when the switch is pushed BUT it is delayed by the capacitor to boot! Take a look on your oscilloscope. Using a delay() in your code means you don't want to use a capacitor, remove it. The delay() is to ignore any bounce, it doesn't matter what the level is. Then take out both external 10k resistors and on the other side of your switch connect it to ground instead of 5V. Now you are using the internal pull up resistor only and can detect a switch press with a LOW instead of a HIGH. Other option is to not use the internal pull up resistor. Remove that in the program and replace the resistor that is connected to the 5V and switch and replace it with a short jumper. Now you have only a single resistor pulling low and a switch direct to 5V to pull high. I would prefer to use the internal pull up just because it saves having to wire and solder a resistor but either will work. Key is not to use too many resistors (or caps) where it makes the input float at an indeterminate levels on a digital input. Now you are switching from 0 to 5V and nothing in between. Digital. A little longer than I planned but I hope this helps. I would enjoy a follow up video where you put a scope on that input pin.

  • @scullcomhobbyelectronics1702

    @scullcomhobbyelectronics1702

    8 жыл бұрын

    +ElmerFuddGun Thanks for your detailed comments. Agree with you, if the new code from Andre uses the internal pull up resistors, then I can removed the external 10K resistors. The Calibration Button is the button with the two 10K resistors you refer to, but I have no problems with that button, it is working OK. It is the Decimal Places Button with key bounce and response time issues. On that button there is only one external 10K resistor to +5v and the button simply connects the data pin to ground. I will have a look with the oscilloscope.

  • @ronen124
    @ronen1248 жыл бұрын

    thanks for the valuable info

  • @scullcomhobbyelectronics1702

    @scullcomhobbyelectronics1702

    8 жыл бұрын

    +Ronen Shemesh Thanks.

  • @michaelo2l
    @michaelo2l8 жыл бұрын

    In previous designs I've had to play around with the R/C to ensure effective debounce operation... it all depends on the loop period... In the main loop, I print the millis() returned value, this gives me a quick reference to help establish the loop period... I can then calculate the R/C match I need for debounce... The design I'm playing with, auto calibrates when test leads are shorted... that way I have no button and no debounce to worry about, I don't even need to save the calibration value... I still don't have the parts so haven't tested everything but it should work... Just turn on the meter, short the test leads and wait for a bleep... Mike

  • @scullcomhobbyelectronics1702

    @scullcomhobbyelectronics1702

    8 жыл бұрын

    +Michael O'Toole Thanks Mike for the info. Good luck with your build.

  • @michaelo2l

    @michaelo2l

    8 жыл бұрын

    +Scullcom Hobby Electronics ... Appreciate you taking the time to acknowledge comments, it speaks to your character... Mike

  • @pirateman1966
    @pirateman19668 жыл бұрын

    Thank you. I've been wanting to build one of these and the miliohm meters, for a long time. Just wondering, why use a 0.01 uF for debounce, when you can easily use a 50mS delay in your routine to debounce the switch. If it's still low after 50mS, the switch has been pressed. Besides that, a perfect project. I have all the parts except the REF and OpAmp and digikey will remedy that. Where where you 20 years ago when I was learning this stuff?

  • @shubhayudas6273
    @shubhayudas62732 жыл бұрын

    Its been a long while since you've done this project, but I have a suggestion for debouncing the buttons: why don't you use hardware interrupts? Once an interrupt is triggered, deactivate the interrupt in the ISR, make the changes, and then activate the interrupt, before leaving the ISR. I've used this in a college 8051 project, it works fine, even without a debouncing cap.

  • @radio655
    @radio6558 жыл бұрын

    One more thought.. if you indeed have nonlinearities as the buffer is driven near its rail, your cal routine would eliminate them. Unlike a real offset error, those would go away at higher voltages, thereby re-introducing the error. If everything goes right, the measured reference should be spot on, right? And a last one.. the readings fluctuate a bit. Would it help to average?

  • @scullcomhobbyelectronics1702

    @scullcomhobbyelectronics1702

    8 жыл бұрын

    +Jan Lategahn Thanks Jan for the comments. I am looking at other options to improve the input circuit. The software currently samples several reading and takes the average (currently 4 samples). However, increasing number of samples also slows down the update rate. As we improve the software to make it run faster we can take more samples to average.

  • @dani777dani
    @dani777dani7 жыл бұрын

    can be add a 3v relay to short leads when is in calibration mode, and i think if is use precision resistor and better noise protection, this will be best voltmeter. i also have in plan to build a multimeter using ltc2400 or ltc2440 autorange and 3.2" lcd. all your videos are great

  • @scullcomhobbyelectronics1702

    @scullcomhobbyelectronics1702

    7 жыл бұрын

    Thanks for your comment. A relay could be added if you wish. Good look with your own version.

  • @roland349
    @roland3498 жыл бұрын

    Nice video

  • @scullcomhobbyelectronics1702

    @scullcomhobbyelectronics1702

    8 жыл бұрын

    +Roland Nilsson Thank you

  • @FindLiberty
    @FindLiberty8 жыл бұрын

    VERY NICE.

  • @scullcomhobbyelectronics1702

    @scullcomhobbyelectronics1702

    8 жыл бұрын

    +FindLiberty Thank you

  • @amfcreations6894
    @amfcreations68942 жыл бұрын

    nice i´ve being thinking about using arduino due since it has a 12bit adc and i´ve some boards around. why yours change the reading by a volt when you increase the decimal places

  • @saadaldossri5348
    @saadaldossri53485 жыл бұрын

    Thanks

  • @PriorUniform721
    @PriorUniform7218 жыл бұрын

    I think the c++ union type could be helpful for both the cal feature and for dealing with the data packets from your adc. For some of the other static settings like your cal address variable. You would be better served turning those into constants.

  • @cmuller1441

    @cmuller1441

    8 жыл бұрын

    Using unions to convert works but is only valid in C not in C++. On a mcu if you want highest performance without using assembly it's a common trick. See www.reddit.com/r/arduino/comments/2xs19l/long_to_byte_array_help/ Also to maximize code portability and a guaranteed number of bits use uint8_t and uint32_t instead of char and long (if the compiler is not 20 years old) en.m.wikipedia.org/wiki/C_data_types#Fixed-width_integer_types

  • @scullcomhobbyelectronics1702

    @scullcomhobbyelectronics1702

    8 жыл бұрын

    +Alan Evans Thanks for the comment.

  • @Strada916
    @Strada9168 жыл бұрын

    Hey Louis Any chance for a copy of the PCB CAD files? The PDF seems to be about 15% smaller? Great work by the way.

  • @scullcomhobbyelectronics1702

    @scullcomhobbyelectronics1702

    8 жыл бұрын

    +Strada916 The reason your PDF print out is 15% smaller is due the the setting in your print options - ensure it is set for actual size or 100%. Sometimes I have found that the print options is set to reduce. My original files were done using KiCad but I used the PDF file I posted myself and it prints fine as long as it is set to 100% size option.

  • @PriorUniform721
    @PriorUniform7218 жыл бұрын

    I have enjoyed this series but have you considered putting your source on github? It might be a way to make it easier to collaborate with you on the software.

  • @scullcomhobbyelectronics1702

    @scullcomhobbyelectronics1702

    8 жыл бұрын

    +Alan Evans Thanks. I have not used github so far so may be I should look in to that and see how easy it is to use. I am not really a software expert. My experience is with hardware electronics design and teaching. I am just getting use to using You Tube!!!

  • @angryskul
    @angryskul8 жыл бұрын

    Hello, I am loving this project and the rest of your videos. Learning quite a bit! I have a question. Specifically I don't understand how the protection circuit works for voltage greater than +5 volts. I can see how after the voltage exceeds 5v that the top diode will be forward biased and voltage can flow up through the positive rail... however I am wondering how this works and if it is safe or not. It would seem that by allowing voltages greater than 5v into the positive rail that given let's say an input voltage of let's say 60volts you would wind up with 6volts coming into the protection junction which would overpower the 5v input rail effectively turning your 5volt intput rail into a 6volt rail. My understanding is that then the entirety of the project attached to this 5volt rail will then be running in an over voltage situation and can cause damage to the circuit. So a few questions: 1) Am I missing some macro level aspect of the circuit that I don't understand that prevents let's say a 60v test from bumping the power of the entire circuit higher? Or is the rule of thumb not to connect such a high voltage supply? 2) Why were zener diodes "bad" specifically? I don't see the comments regarding the problem with using zeners. 3) Why not use a TVS diode instead for clamping? Thanks so much. Please make more videos.

  • @scullcomhobbyelectronics1702

    @scullcomhobbyelectronics1702

    8 жыл бұрын

    +Alfred Perlstein Thanks for your good comments. I will try and answer your questions below: 1. The two schottky diodes simply clamp the input of the OP Amp to either to +5V or ground. For example if the input voltage to the OP Amp goes higher than +5.2V the the top schottky diode conducts and clamps the OP Amp input pin to +5.2v. As there is a large input resistor in the input resistor network then the excess voltage is effectively handled across that resistor, in our case this would be the 909Kohm resistor. So there will never be a case when the +5 volt supply would go higher than +5 Volt. 2. Zener diodes can generate noise due to their reverse leakage current and this could cause noise on the input of the OP Amp. If you check some of the other comments this has been already been mentioned. 3. TVS (Transient Voltage Suppressor) are used to protect against a large transient voltage, usually caused by electrostatic discharge, inductive load switching (such as in power supplies). The key word here is "Transient" - so they are not normally used to protect analog input circuits from continuous voltage overload. TVS protect circuits from short transient voltage spikes of usually several thousand volts. Also the TVS breakdown voltage is usually about 10% above the reverse standoff voltage. You could add a TVS to our project to protect against electrostatic discharge but you would still need the two diodes used to protect against continuous voltage overload at the input.

  • @angryskul

    @angryskul

    8 жыл бұрын

    +Scullcom Hobby Electronics Thank you very much for explaining. Makes sense.

  • @david_pilling
    @david_pilling8 жыл бұрын

    Very good. 328p has 1024 bytes of EEPROM. Debounce that decimal place button using software ;-)

  • @scullcomhobbyelectronics1702

    @scullcomhobbyelectronics1702

    8 жыл бұрын

    +David Pilling Thanks for the info on the amount of EEPROM. I must have read the 512 bytes from earlier Arduino's. I am currently looking at debounce options.

  • @philspargo9543
    @philspargo95438 жыл бұрын

    Is Bat85 the correct Schottky Diode ? It's a 30 volt diode.

  • @scullcomhobbyelectronics1702

    @scullcomhobbyelectronics1702

    8 жыл бұрын

    +Phil Spargo Thanks for your comments. The BAT85 are fine in this application as the input resistor divider network has already dropped the voltage which is fed to the OP Amp.

  • @int2str
    @int2str8 жыл бұрын

    Nice job again! Though I would have used eeprom_read_dword() / eeprom_write_dword() to make it easier ;)

  • @int2str

    @int2str

    8 жыл бұрын

    Oh, also, ATmega chips have pull-up resistors built-in for each pin, so you can use that instead of an external one. And of course de-bouncing can also be done in software...

  • @robertcalkjr.8325

    @robertcalkjr.8325

    8 жыл бұрын

    +Andre Eisenbach That's what I was thinking, but it's been awhile since I read the info about my Arduino.

  • @scullcomhobbyelectronics1702

    @scullcomhobbyelectronics1702

    8 жыл бұрын

    +Andre Eisenbach Thanks Andre for the suggestions, most helpful.

  • @abayomijoseph3299
    @abayomijoseph32998 жыл бұрын

    Nice work sir. I have enjoyed your tutorials so far but the problem is I have little knowledge in electronics. Have build some electronics project and failed in others, I have breadboard and know some components. Please sir how do I start, for example in mathematics you start from counting, addition, BODMAS down to differential equations. But how will I start from too in electronics, I will appreciate if you tell me sir. Thanks

  • @scullcomhobbyelectronics1702

    @scullcomhobbyelectronics1702

    8 жыл бұрын

    +Abayomi Joseph Thanks for your comments. From what you are saying you would benefit from videos on getting started in electronics covering the basics. There are many videos on You Tube which may help you. It is something I have considered doing myself but I did not want the duplicate whats already on You Tube. However, may be I should put together some basic electronic videos for the hobbyist - I will give it some thought.

  • @PriorUniform721
    @PriorUniform7218 жыл бұрын

    You might be missing your button presses because of the sample loop. All those delays and averaging. If you aren't pressing the button while the main loop is looking at your button you may miss the button press. You might consider using interrupts for the buttons and/or replacing the delay() with a millis()/interval type loop. www.arduino.cc/en/Tutorial/BlinkWithoutDelay

  • @scullcomhobbyelectronics1702

    @scullcomhobbyelectronics1702

    8 жыл бұрын

    +Alan Evans Thanks Alan. Interrupts may be a good option.

  • @First2ner
    @First2ner8 жыл бұрын

    you could do auto cal and not use EEPROM at all, since it would auto cal every 2nd reading or 10th or something like that

  • @scullcomhobbyelectronics1702

    @scullcomhobbyelectronics1702

    8 жыл бұрын

    +First2ner Thanks for your comment. Not quite sure what you mean. The fact that the EEPROM stores the initial calibration setting then the meter will Auto Cal every time it is switched on. Also the EEPROM is already on the Arduino module so no additional hardware is required.

  • @First2ner

    @First2ner

    8 жыл бұрын

    +Scullcom Hobby Electronics As with most bench meters, they have function called autozero, not auto cal, my mistake. What is does is with autozero enabled, the DMM internally measures the offset following each measurement. It then subtracts that measurement from the preceding reading. This prevents offset voltages present on the DMM’s input circuitry from affecting measurement accuracy. This my be addon to your project.

  • @scullcomhobbyelectronics1702

    @scullcomhobbyelectronics1702

    8 жыл бұрын

    +First2ner OK thanks I see what you mean now. Good idea. Storing an offset is normally done when measuring resistance to take account of the lead resistance. It may also be useful as you suggest for low voltage readings to set the start point at zero.

  • @SatyajitRoy2048
    @SatyajitRoy20488 жыл бұрын

    Precision measurement needs to be in a carefully designed PCB and its ground should be routed properly so that when you short the input pins, it should read zero (or very close to that) or else the offset voltage will remain in the measured value always. 41mV is quite high. Also as you are measuring 4.096V from the reference given to the ADC, it should read exactly 4.096V (lot of fluctuation is irritating when its 6.5 digits) isn't it ? Another point is, when there is micro amp flowing through a simple switching diode like 1N4148, then the forward voltage might drop to 0.275V as per fairchild datasheet, so please take that in account. Its not always 0.6V-0.7V. Another important factor is, when there is precision measurement, the flux residue should be cleaned up thoroughly after assembly, or else it could lead to error in measurement as well. 6.5 digit meter should keep its reading stable to at least 5.5 digits.

  • @scullcomhobbyelectronics1702

    @scullcomhobbyelectronics1702

    8 жыл бұрын

    +Satyajit Roy Thanks for your comments. You are correct about the PCB. As I am adding additional features, I am looking at redesigning the PCB to improve accuracy and stability. I will also consider using guard rings on the PCB around sensitive input and reference voltage areas. The flux could also be cleaned off after assembly. Thanks for the point about the forward voltage drop of a 1N4148. I used the schottky diode are they are generally much faster switching.

  • @SatyajitRoy2048

    @SatyajitRoy2048

    8 жыл бұрын

    +Scullcom Hobby Electronics Yes, when dealing with micro volt levels, then its very difficult to design the PCB unless a special care is taken. Although many opamps' input can go up to (or below) negative rail, but its always preferable to use that at its mid point, hence using dual supply could produce better result when the meter is measuring very tiny voltage. Just my assumption. This is very interesting series and thanks for all of your effort in making these video. I am sure your next design will certainly show 4.096000V (or few uV diff) when the probe is measuring the vref because that the voltage you are referencing from. Also it should read almost 0 (or few micro volts) when probe is connected to ground. Few micro volt is normal because of you just cant keep everything so ideal and those solder joints may act like thermocouple when there is temperature variations in between two pins of a component in series. Yes, it will certainly null out each other if both the pins of say a resistor is kept same.

  • @michaelo2l

    @michaelo2l

    8 жыл бұрын

    +Satyajit Roy The voltage drop across a diode is non-linear, it's a function of current... In the real world application especially with a varying voltag, a more accurate value will average 600-700 mV... I've seen datasheets quoting voltage drop for 1N4148 of 200mV and even one at 1 volt... as I said, it depends on the current through the diode...

  • @SatyajitRoy2048

    @SatyajitRoy2048

    8 жыл бұрын

    +Michael O'Toole Yes it is, and every manufacturer provides the VI characteristic curve in their datasheet. As in the multimeter, the forward current will invariably be very low and will be less that 1 micro amp (assuming 10M input impedance) so its quite certain that even 1N4148 will also have less than 300mV drop (275mV for 1microamp as mentioned in fairchild datasheet). General purpose Schottky like 1N5819 or similar will have even less than that. As these diodes will be used as clamping to VDD/VSS (or VCC/GND) so lesser the drop is, better the performance will be in terms of opamp input protection.

  • @michaelo2l

    @michaelo2l

    8 жыл бұрын

    +Satyajit Roy I'm an old engineer (with almost forty years experience in electronic engineering), if I say a diode is a non-linear device you can take my word for it or google it...

  • @erikev
    @erikev9 ай бұрын

    The circuitry here induces al lot of noise and errors that makes this 100x worse than a true 6½ digit voltmeter. As you can see, the last 2 or 3 digits just drift around due to noise and errors. Look at kzread.info/dash/bejne/dmZs17Wzc9adXc4.htmlsi=hepAgm71QixQ39ak, which is a true 8½ voltmeter just to get an idea of many ways to improve the performance. At least: 1. split the analog and digital sections as well as possible, 2. use guard rings and shielding on the signal. 3. A rail-to-rail opamp like the 777 uses an internal charge pump to generate biases, and this is an unnecessary source of noise especially when you have a 9 V battery with clean higher voltage. 4. Can someone confirm the design flaw with the input RC filter *after* the op amp? The follower op amp with driver the output hard to match the signal, RC filter be damned. The result is no filtering, which is probably good (the filter would have had a time constant of 10ms to -3dB or 63%, but will take a lot longer to reach the required 99.99999%, so averaging in software is a better idea), but a lot of unnecessary battery draw. The RC filter must be in before the opamp in the signal chain. 5. Even the offset error voltage on the inputs of this amp is in the 50µV range. 6. And a lot of the components are temperature dependent. A little money on better components and a little planning would go a long way.

  • @abayomijoseph3299
    @abayomijoseph32998 жыл бұрын

    Nice work sir. I have enjoyed your tutorials so far but the problem is I have little knowledge in electronics. Have build some electronics project and failed in others, I have breadboard and know some components. Please sir how do I start, for example in mathematics you start from counting, addition, BODMAS down to differential equations. But how will I start from too in electronics, I will appreciate if you tell me sir. Thanks

  • @scullcomhobbyelectronics1702

    @scullcomhobbyelectronics1702

    8 жыл бұрын

    +Abayomi Joseph I think you have posted this twice. I reply to your earlier message.

Келесі