[img]http://i.imgur.com/nHYc9P3.png[/img]
What the fuck, Eagle.
[QUOTE=r0b0tsquid;45493559][img]http://i.imgur.com/nHYc9P3.png[/img]
What the fuck, Eagle.[/QUOTE]
Did they rename the rcl library? That's usually where some common resistor, capacitor and inductor packages were in, although the inductor part always felt rather weak
RCL exists too, and it's identical :v:
So I've made my first ever thing in Eagle!
[img]http://i.imgur.com/9DFBSbn.png[/img]
It's a multimeter! It'll measure up to 250v, with selectable ranges (although I'd never trust it that high), somewhere between 1 and 1.5A continuous, resistance from 0.1ohm up to 1Mohm, capacitance down to 10nF and up to a couple hundred uF... I've also broken out 4 digital pins for some simple logic analyzer capabilities on the LCD.
I should be able to get 100 kSa/s out of it which means it'll also make an emergency scope for audio stuff, across the full voltage range. Oh, and I've stuck an SPI flash chip in too, for data logging! Most of that is software stuff though, once I've got the hardware working I'll just take that one step at a time.
My first board ever, so it was always going to be messy :v:
[img]http://i.imgur.com/2I7Yvsh.png[/img]
measures 2.8in * 3.9in
Would somebody mind taking a quick look over the schematic and pointing out the obvious things that would probably kill me?
[QUOTE=r0b0tsquid;45496958]Would somebody mind taking a quick look over the schematic and pointing out the obvious things that would probably kill me?[/QUOTE]
Your current measurement circuit will not work, Q4 has a high on resistance compared with the current shunt so you'll get a very significant voltage drop across it (Q4), this is of course highly undesirable for current measurement since it will starve whatever you're measuring of current.
You could reduce this by replacing Q4 with multiple BJTs in parallel or a relay but overall you'd be best to eliminate Q4.
Using differential current measurement is preferable in this situation, since it will allow you to reduce the size of the current shunt resulting in decreased burden voltage and improved measurement accuracy.
Resistance measurement is usually done with a very small current on the order of micro-amps to milli-amps.
Capacitance I can't quite remember what the most common technique for multimeters is but I suspect a simple capacitive divider circuit.
No idea what R12, R11 and R10 are doing.
[QUOTE=r0b0tsquid;45496958]RCL exists too, and it's identical :v:
So I've made my first ever thing in Eagle!
[img]http://i.imgur.com/9DFBSbn.png[/img]
It's a multimeter! It'll measure up to 250v, with selectable ranges (although I'd never trust it that high), somewhere between 1 and 1.5A continuous, resistance from 0.1ohm up to 1Mohm, capacitance down to 10nF and up to a couple hundred uF... I've also broken out 4 digital pins for some simple logic analyzer capabilities on the LCD.
I should be able to get 100 kSa/s out of it which means it'll also make an emergency scope for audio stuff, across the full voltage range. Oh, and I've stuck an SPI flash chip in too, for data logging! Most of that is software stuff though, once I've got the hardware working I'll just take that one step at a time.
My first board ever, so it was always going to be messy :v:
[img]http://i.imgur.com/2I7Yvsh.png[/img]
measures 2.8in * 3.9in
Would somebody mind taking a quick look over the schematic and pointing out the obvious things that would probably kill me?[/QUOTE]
Might also want to add a pullup on your reset pin if you ever want your microcontroller to start.
Also, why a SMD fuse on your current input? You're supposed to be easily able to change that if it blows, and trust me it WILL blow one day.
Your schematic is also quite messy, try grouping functional things a bit more. Same goes for your PCB.
[QUOTE=Chryseus;45497285]Your current measurement circuit will not work, Q4 has a high on resistance compared with the current shunt so you'll get a very significant voltage drop across it (Q4), this is of course highly undesirable for current measurement since it will starve whatever you're measuring of current.
You could reduce this by replacing Q4 with multiple BJTs in parallel or a relay but overall you'd be best to eliminate Q4.[/QUOTE]
Oops. The part number on the schematic is wrong, Eagle didn't have the right part so I just grabbed a FET with the correct package and pinout. The part should be [url=http://www.nxp.com/documents/data_sheet/PMV31XN.pdf]PMV3XN[/url], which has a much better Rdson at low Vgs (44mohm at 2.5v, 31 mohm at 4.5v). You pay for it with a low Vdsmax but that shouldn't matter, there's a huge fast-acting clamp diode!
I know you'd normally want the transistor at ground for this kind of switching, but since the shunt is only (relatively) small I didn't think it would matter too much, seeing as the source will only float a couple tenths of a volt at max current? Correct me if I'm being stupid :v: I'm putting the extra functionality on the current jack so I can have a 1Meg axial resistor and a big gap in the ground plane between the voltage jack and everything else, I need to look at some multimeter schematics and see how they do things.
[QUOTE=Chryseus;45497285]Using differential current measurement is preferable in this situation, since it will allow you to reduce the size of the current shunt resulting in decreased burden voltage and improved measurement accuracy.[/quote]
Right, but I wanted a high input impedance to the amp so that I could do resistance and capacitance measurements on the same jack as well :') Should I invest in an ins-amp or something or am I better off changing my circuit topology? I'll order some parts and try things on a protoboard.
[QUOTE=Chryseus;45497285]Resistance measurement is usually done with a very small current on the order of micro-amps to milli-amps.
Capacitance I can't quite remember what the most common technique for multimeters is but I suspect a simple capacitive divider circuit.
No idea what R12, R11 and R10 are doing.[/QUOTE]
You answered the first part with the second part ;)
There is a trace going straight from the current jack to an ADC pin. R10, R11 and R12 provide different resistances to the tri-state buffers on the IOs. They're left floating during normal operation, but you can pull up with any of the 3 resistors to form a resistive divider Vcc->IO->R1*->Amp Jack->DUT->Ground Jack, and then some floating maths to figure out resistance from voltage (what's the point in having an 8MHz processor otherwise ;))
I did a fair bit of analysis on this to choose the ranges:
[img]http://i.imgur.com/Ek5Qn2C.png[/img]
The sort of windowing function at the bottom is quite interesting, I was planning to use that to choose my crossover points for the ranges.
The only thing that worries me is that in the bottom range, the overall circuit impedance is really really low :v: I was thinking of maybe a small current source and a voltage measurement? Hmmm :')
The same resistors/pins are also used for capacitance measurement - discharge the capacitor with the 22ohm, and then charge with either the 20k or the 500 and measure the rise time/time constant, then divide by R to get C! No extra hardware.
Ooh a capacitive divider could be fun to try though, hmm I could definitely put that on the same jack...
[QUOTE=ddrl46;45499033]Might also want to add a pullup on your reset pin if you ever want your microcontroller to start.
[/quote]
Fuck. :v:
See, this is why I ask you guys things
[QUOTE=ddrl46;45499033]Also, why a SMD fuse on your current input? You're supposed to be easily able to change that if it blows, and trust me it WILL blow one day.[/quote]
I guess I went a bit SMD mad ;) it is the only component that I put on the front besides the headers, to make it a bit easier to change... okay, I'll use a through-hole socket and a glass fuse. Or maybe just put in a footprint for both. Is 20x5mm the smallest fuse size?
[QUOTE=ddrl46;45499033]Your schematic is also quite messy, try grouping functional things a bit more. Same goes for your PCB.[/QUOTE]
Okay I'll try and fix that. I think I should use busses for the different components on the schematic? Only problem then is that it's difficult to see which pin is connected to which at the opposite ends of the bus, if I want to use the schematic for reference. Can Eagle label this (the pin-pin connections) or should I just write a text note for myself?
For the PCB am I best off just ripping everything off and starting again?
[t]http://i.imgur.com/ugJ0qK8.png[/t]
I stayed away from the autoroute and swapped a bunch of pins round and I think it came out tidier!
[IMG]http://i.imgur.com/gKUHutU.png[/IMG]
Added a pullup resistor on the reset (whoops), debounce caps on the buttons, a fuse holder, and got a lot of practice with routing :v:
Need to think about how I do my resistance measurements.
If you take, say, four samples and then average them, does that not effectively increase your resolution by 2 bits? Assuming there is some minor noise dithering the LSB.
Huh, quiet :v: I'm going to have this case (once I've added mounting holes etc) 3d printed
[img]http://i.imgur.com/lgjN12d.jpg[/img]
and then battery + buzzer go inside, board pushes into the front, and presto! a pocket device :v:
[QUOTE=r0b0tsquid;45504322]Huh, quiet :v: I'm going to have this case (once I've added mounting holes etc) 3d printed
[img]http://i.imgur.com/lgjN12d.jpg[/img]
and then battery + buzzer go inside, board pushes into the front, and presto! a pocket device :v:[/QUOTE]
That case looks quite sexy, what kind of battery are you going to use?
There are a few remaining concerns I should point out.
Firstly if Q4 is off the maximum safe voltage that may be applied to the current input is around 5.4V, above that D1 will conduct and a large current will result likely blowing D1, there is also a risk that the internal pull up diode inside the micro will conduct, D1 should shunt most of the current but if that goes the micro will take the full load, there is no protection against a negative input voltage wrt ground, above -5.6V the internal pull-down diode will conduct.
Rds is not a stable parameter, it varies with drain-source voltage, current and gate-source voltage, so the measurement accuracy is going to be fairly poor although that may be fine for your usage.
If you're doing frequency measurement it's a good idea to run the micro from a crystal oscillator rather than the internal RC oscillator, also since there is a fair bit of unused space on that PCB you might want to add something like a USB interface or more features, I would also suggest adding a larger ground plane on the bottom, basically any empty space should be a ground plane.
[QUOTE=ddrl46;45504474]That case looks quite sexy, what kind of battery are you going to use?[/QUOTE]
Thank you! Solidworks is wonderful :v:
Just a flat phone-style lithium battery, I'll probably end up double-sided-taping it into the case, that should be fine. I can charge it through the ICSP jack.
[QUOTE=Chryseus;45505018]There are a few remaining concerns I should point out.
Firstly if Q4 is off the maximum safe voltage that may be applied to the current input is around 5.4V, above that D1 will conduct and a large current will result likely blowing D1, there is also a risk that the internal pull up diode inside the micro will conduct, D1 should shunt most of the current but if that goes the micro will take the full load, there is no protection against a negative input voltage wrt ground, above -5.6V the internal pull-down diode will conduct.
Rds is not a stable parameter, it varies with drain-source voltage, current and gate-source voltage, so the measurement accuracy is going to be fairly poor although that may be fine for your usage.
[/QUOTE]
Not only that, but any accidental reverse current will pass through the body diode of Q4. Perhaps pairing it up with a P-channel might solve that. Maybe a low power IGBT could solve the measurement accuracy problem (See page two of [URL="http://www.onsemi.com/pub_link/Collateral/AN1541-D.PDF"]this PDF[/URL])
[QUOTE=Chryseus;45505018]There are a few remaining concerns I should point out.
Firstly if Q4 is off the maximum safe voltage that may be applied to the current input is around 5.4V, above that D1 will conduct and a large current will result likely blowing D1, there is also a risk that the internal pull up diode inside the micro will conduct, D1 should shunt most of the current but if that goes the micro will take the full load, there is no protection against a negative input voltage wrt ground, above -5.6V the internal pull-down diode will conduct.
[/quote]
I've chosen parts fairly carefully, D1 is quite a nice diode, and says it can take 5A continuous. The path to D1 has a 2A fast blow fuse on it, so it should be okay? It's also a Schottky so it should conduct before the micro's clamp diodes (at a lower forward voltage).
You're right about the voltage clamp being a problem in itself though - maybe I should use the logic header for frequency measurement? And put some ~20ohm resistors between the header and the pins to provide a certain amount of protection?
And yep, clamp diode to ground for negative voltages, thank you for catching that!
[QUOTE=Chryseus;45505018]Rds is not a stable parameter, it varies with drain-source voltage, current and gate-source voltage, so the measurement accuracy is going to be fairly poor although that may be fine for your usage.
[/quote]
I'm aware! Although I'm not quite up on the physics of it, I know enough not to trust it. Rds doesn't contribute to the measured voltage, the op amp only measures from ground to the top of the shunt. The tap is between the shunt and the transistor.
[QUOTE=Chryseus;45505018]
If you're doing frequency measurement it's a good idea to run the micro from a crystal oscillator rather than the internal RC oscillator, also since there is a fair bit of unused space on that PCB you might want to add something like a USB interface or more features, I would also suggest adding a larger ground plane on the bottom, basically any empty space should be a ground plane.[/QUOTE]
Right, I'll run it off crystal then. More parts for the BOM :v:
Yeah I already had ideas! I was going to put and IR LED and receiver on it, seeing as I already have that big SPI flash. Who doesn't want to turn their TV off with a multimeter?!
The AVR has an RTC too, which is nice. Hmm USB is something to think about! Not sure if that's getting too ambitious for my first PCB? I've never soldered SMD before :')
Okay, flood fill both sides with ground plane? Right on ;)
[editline]26th July 2014[/editline]
[QUOTE=LoneWolf_Recon;45505703]Not only that, but [B]any accidental reverse current will pass through the body diode of Q4.[/B] Perhaps pairing it up with a P-channel might solve that. Maybe a low power IGBT could solve the measurement accuracy problem (See page two of [URL="http://www.onsemi.com/pub_link/Collateral/AN1541-D.PDF"]this PDF[/URL])[/QUOTE]
Ooops.
By accuracy problem I guess you must be talking about burden voltage..? Because I've never measured voltage across the transistor at any point :v: the datasheet gives 44mohm at Id = 1A, Vgs = 2.5v, it's a massively over-rated part (6A in a SOT-23?!), so the burden voltage from the transistor is much smaller than that from the shunt at any point (I'm not planning on measuring currents larger than ~1.5A as it is!)
That moment when you finish doing a really hard CAD model (measuring fins are a nighmare and putting them into CAD even worse.)
Even worse when your Micrometer can't measure sizes that large...
[img]http://i.imgur.com/9ynQWPM.png[/img]
FUCKING HELL EBAY!
I ordered two new ammeters to replace two improperly rated ones. The seller's description assured that they were 72x72mm in size.
What fucking shows up at my door? To meters measuring 53x53mm.
[QUOTE=pentium;45506772]FUCKING HELL EBAY!
I ordered two new ammeters to replace two improperly rated ones. The seller's description assured that they were 72x72mm in size.
What fucking shows up at my door? To meters measuring 53x53mm.[/QUOTE]
With love from china.
'Pweze weave god fedbak'
[QUOTE=Tw34k;45509491]'Pweze weave god fedbak'[/QUOTE]
Always.
[IMG]http://i.imgur.com/Gj2qC0W.png[/IMG]
My first electrical engineering project.
Two potentiometers control those percentages. All done with my from-scratch graphics library.
[img]http://i.imgur.com/YF98QJi.jpg[/img]
Off topic: If I have a 3.3V device, and I accidentally connected it to a 5V power rail, it's pretty much dead, forever, right?
[QUOTE=dylanb5123;45510531]My first electrical engineering project.
Two potentiometers control those percentages. All done with my from-scratch graphics library.
[img]http://i.imgur.com/YF98QJi.jpg[/img]
Off topic: If I have a 3.3V device, and I accidentally connected it to a 5V power rail, it's pretty much dead, forever, right?[/QUOTE]
Check the datasheet for absolute maximum electrical characteristics.
[QUOTE=DrDevil;45510772]Check the datasheet for absolute maximum electrical characteristics.[/QUOTE]
Yep. They dead. :v
What screen is that? If you don't mind me asking.
This is bullshit.
I've checked three other listings so far and they all say it's 7.5 x 7.5 cm when you can clearly see in the fucking photo that the meter is smaller.
I have no choice now but to either replace the steel box they fit in or find some sort of fire resistant material I can cut into spacers. I don't have the tools to cleanly cut sheet metal.
[QUOTE=Leestons;45510854]What screen is that? If you don't mind me asking.[/QUOTE]
Looks to be [url=https://www.sparkfun.com/products/10168]this one[/url].
I made a discovery.
When China produces or clones a product with the cheapest possible design, they produce a standard.
Internally the old and new meters are identical so I swapped out the needle and coil assemblies and now I have the meters I was originally trying to get. It's perfect now other than the needle being too short.
Edited: I should of bought meters with 30A scales. 50A is almost too much.
[QUOTE=pentium;45511488]I made a discovery.
When China produces or clones a product with the cheapest possible design, they produce a standard.
Internally the old and new meters are identical so I swapped out the needle and coil assemblies and now I have the meters I was originally trying to get. It's perfect now other than the needle being too short.[/QUOTE]
All the factories copy each other's designs so that there's no development cost, so the first half-working cheap design quickly proliferates and becomes a standard :v:
[editline]27th July 2014[/editline]
[QUOTE=Leestons;45510854]What screen is that? If you don't mind me asking.[/QUOTE]
[QUOTE=Cakebatyr;45511267]Looks to be [url=https://www.sparkfun.com/products/10168]this one[/url].[/QUOTE]
You can find the same one [url=http://www.dx.com/p/arduino-1-6-lcd-display-screen-for-nokia-5110-red-silver-140226#.U9SC3fldWCk]on DX for 4 dollars instead of 10[/url], if you don't mind 3 week shipping. Then you can buy 2, for when you inevitably connect one to a 5v rail! :v:
I had never considered ordering from DX.
Even better, thanks to living in Vancouver, China Post is faster than USPS :v:
[QUOTE=r0b0tsquid;45511627]Then you can buy 2, for when you inevitably connect one to a 5v rail! :v:[/QUOTE]
I bought one, played with it for 4 days, then messed up my code a bit. Thinking I had overvolted it and killed it, I ordered another one, and only when it arrived did I discover that it was my code's fault. :suicide:
A couple of months ago I decided to major in electrical engineering at Portland State. Should be more exciting than the 3 years I spent trying to be a CS major.
Oooooh the ATMEGA324PA has built-in 10x and 200x amplifiers on the ADC! (at 8 bits and 6 bits respectively, unfortunately...)
This is why we read the datasheet kids!
[editline]blah[/editline]
Means I can make my bottom-end resistance measurements more accurate without having a 3rd opamp on the board.
I visited my friend in in Derby recently on Friday, did some trading and gave him one of my transformers. he did a video with it today:
[media]http://www.youtube.com/watch?v=BnsMVBVw3kU[/media]
(My one is at 5:45)
Sorry, you need to Log In to post a reply to this thread.