How to Use a Screen to Display CPU Temp (not thermistor)?

Belial88:
Can all these things be done on the Pro Micro/arduino micro? (momentary servo control, 20x4 lcd display, input from lcd smartie, and input from 2 voltages)?

I don't see why not. You've got 4-6 analog inputs, you need 2. You need 6 DIO pins for the display, 2 for servo and door switch and the USB port for the lcd smartie. You have 12 - 14. I would get an Arduino that has the USB on board, otherwise you'll need a $15 USB to serial converter and 2 more pins (Ts/Rx). I can't imagine you won't have enough memory.

https://www.sparkfun.com/products/11098

https://www.sparkfun.com/products/11113 (no USB on board)

So is the arduino micro capable of measuring voltage with .01 resolution and with accuracy close to .01 (like .03 i guess would be tolerable)? Or do I need to buy something for that (or, a ‘better’ arduino?)?

I see you can like ‘scale up’ the voltage the arduino measures with resistors, is it possible to scale it down for more accuracy? Like instead of up to 5v, down to measuring just 0-2.8?

Belial88:
I see you can like ‘scale up’ the voltage the Arduino measures with resistors, is it possible to scale it down for more accuracy? Like instead of up to 5v, down to measuring just 0-2.8?

All the "Arduino class" micros use a similar 10 bit ADC. Thus 1 bit is 1/1023 * supply voltage. For a 5v Arduino that' s a resolution of about 0.005v. Now the ADC accuracy is spec'd at +/- 2 bits or +/- 0.02v. But often you can choose the ADC supply voltage to be different from the board supply. For the Pro Micro you can chose to use a 2.56v supply or some external supply. Alas the pin for that external choice is not brought out to a solder-able hole, you'd need to solder a wire to the IC.

I suppose you could divide down any input (2.8v) to fit into the 2.56v range and so use that option. That would approximately halve the numbers above.

Well I’d be using the 6v battery pack (maybe 4.8-5v for usb if i decide to use usb power somehow as the UPS option or 2nd energy input) so thatd make the accuracy worse because accuracy is tied to the voltage being used as input?

So its not like I’m realistically able to get a ‘better’ ardunio or some special voltmeter add-on, but my best choice is use a different MCU for the volmetering (by realistic I mean in similar price range of around$20 parts) than from the servo mod… and in which case I need to use a different voltage input? I’m a bit confused on what you mean, but, so like I basically need to use a much lower voltage energy/battery?

In which case, can I do that and still run the display off it? Or… would I use 2x MCUs, one for the display and servo, and one for voltmetering (and i guess doesnt matter which one does software input but i guess display one would be simpler)?

I guess considering how powerful (for my purposes) the arduino micro/pro micro are (i think ill go for the blue pcb but again not sure if ill mount it visibly or not yet), it’s simply a question of do I use the micro and have it do everything but at 6v so i lose some accuracy in voltmetering, or do I use the micro and then have the trinket dedicated to servo to keep more accuracy for voltmetering. In which case, how do I power the display/micro (5v seems acceptable by what you said but if i wanted even more accuracy, ie max voltage of about 3v, how do i do that without battery)?

edit: ah so 6v x (1/1024)=.0058, so that’s still cool. You say that all of them have accuracy at +/- .02v, thats not as cool but w/e. I’m not sure about your external voltage thing though, and if I could still drive a servo at 5-6v or power the display.

Thanks for your help! I guess either way I’ll buy an arduino micro/pro micro.

Im not sure theres even such low voltage with a computer’s psu though, its just 5v, 12v, and maybe 7v if you use the 12 - 5v = 7v lines which has its own issues involved… so Id have to use battery… which I assume would be fine, but id like it to turn off with the pc (so somehow hook it up to usb?).

its cool that all i need for voltmetering is badically just wire, and whatever the answer to my questions, I just need to go ahead and buy a micro and that adafruit display haha.

edit2: wait so i want the display and voltmeters to run off the pc, but the servo to run off battery. How would that work? Or it doesnt and I should just use the trinket for the servo control? Unless i got a battery back like that usb charger… in which case its a tradeoff of cheaper using the trinket ($10) instead of battery back ($30) thats nice as UPS but lower voltage.

Which i guess is okay, its not more expensive to use a larger servo or anything, i just trade old one in.

wait… why can’t my z87-ud3h motherboard do this stuff? Why can’t it drive the display (okay I understand it can if it has a display usb backpack but no one sells those… i guess it’d need a way to communicate with i2c but isn’t there a i2c to usb adaptor or something?)? Why can’t it measure voltage WHY CANT IT MEASURE IT"S OWN VOLTAGE (i mean i know it can, but that’s through firmware, like why is there no why to use an input on the board to lead out 2x wires to use as voltmeter, like one of the case inputs or usb inputs)?

I mean I’m guessing there’s a way to hook up a servo to the usb , red to 5v, black to ground, signal to data in, but since I want to run off battery and when pc is off that doesnt matter.

Belial88:
Well I’d be using the 6v battery pack (maybe 4.8-5v for usb if i decide to use usb power somehow as the UPS option or 2nd energy input) so thatd make the accuracy worse because accuracy is tied to the voltage being used as input?

So its not like I’m realistically able to get a ‘better’ ardunio or some special voltmeter add-on, but my best choice is use a different MCU for the volmetering (by realistic I mean in similar price range of around$20 parts) than from the servo mod… and in which case I need to use a different voltage input? I’m a bit confused on what you mean, but, so like I basically need to use a much lower voltage energy/battery?

In which case, can I do that and still run the display off it? Or… would I use 2x MCUs, one for the display and servo, and one for voltmetering (and i guess doesnt matter which one does software input but i guess display one would be simpler)?

I guess considering how powerful (for my purposes) the arduino micro/pro micro are (i think ill go for the blue pcb but again not sure if ill mount it visibly or not yet), it’s simply a question of do I use the micro and have it do everything but at 6v so i lose some accuracy in voltmetering, or do I use the micro and then have the trinket dedicated to servo to keep more accuracy for voltmetering. In which case, how do I power the display/micro (5v seems acceptable by what you said but if i wanted even more accuracy, ie max voltage of about 3v, how do i do that without battery)?

edit: ah so 6v x (1/1024)=.0058, so that’s still cool. You say that all of them have accuracy at +/- .02v, thats not as cool but w/e. I’m not sure about your external voltage thing though, and if I could still drive a servo at 5-6v or power the display.

Thanks for your help! I guess either way I’ll buy an arduino micro/pro micro.

Im not sure theres even such low voltage with a computer’s psu though, its just 5v, 12v, and maybe 7v if you use the 12 - 5v = 7v lines which has its own issues involved… so Id have to use battery… which I assume would be fine, but id like it to turn off with the pc (so somehow hook it up to usb?).

its cool that all i need for voltmetering is badically just wire, and whatever the answer to my questions, I just need to go ahead and buy a micro and that adafruit display haha.

edit2: wait so i want the display and voltmeters to run off the pc, but the servo to run off battery. How would that work? Or it doesnt and I should just use the trinket for the servo control? Unless i got a battery back like that usb charger… in which case its a tradeoff of cheaper using the trinket ($10) instead of battery back ($30) thats nice as UPS but lower voltage.

Which i guess is okay, its not more expensive to use a larger servo or anything, i just trade old one in.

Most (all?) of the Arduino boards you'd use have a voltage regulator so a voltage of >5.5v means you get 5v running the Arduino and it's ADC. That said I don't think your battery pack is always >5.5v as the batteries drain down. If you wanted you can run the Arduino off the PC's 12v and use the battery for the servo's "5v" supply, just make sure the battery is grounded. Best option for accuracy would be to choose the 2.56v ADC reference and then use a 10k pot and adjust the max 2.8v down to 2.5v (as measured w/DVM) and send that to the ADC.

Belial88:
wait… why can’t my z87-ud3h motherboard do this stuff? Why can’t it drive the display (okay I understand it can if it has a display usb backpack but no one sells those… i guess it’d need a way to communicate with i2c but isn’t there a i2c to usb adaptor or something?)? Why can’t it measure voltage WHY CANT IT MEASURE IT"S OWN VOLTAGE (i mean i know it can, but that’s through firmware, like why is there no why to use an input on the board to lead out 2x wires to use as voltmeter, like one of the case inputs or usb inputs)?

I mean I’m guessing there’s a way to hook up a servo to the usb , red to 5v, black to ground, signal to data in, but since I want to run off battery and when pc is off that doesnt matter.

While there are I2C-USB converters, I don't know what PC software you'd have to run to collect and send the info to Arduino & display. Isn't that what "Smartie" does ? Why bother w/the adapter and it's extra $$s ?

This is really getting painful to watch!

Belial: just get an Arduino and start playing with it. Really. Once you’ve done that for a few days, and you understand what it can do, most of your questions will just melt away and you’ll make progress much faster.

Honestly, there’s no substitute for actual hands-on experience.

While there are I2C-USB converters, I don’t know what PC software you’d have to run to collect and send the info to Arduino & display. Isn’t that what “Smartie” does ? Why bother w/the adapter and it’s extra $$s ?

Are adaptors expensive? A quick search showed ~$20 but I’m sure cheaper exist. But yea, why can’t I just hook up the display straight to the mobo and the mobo measure it’s own voltage. Does it not have an ADC and stuff like the arduino has? I understand they are built for different purposes but you’d think a $150 motherboard would have way more stuff than an arduino, right?

Most (all?) of the Arduino boards you’d use have a voltage regulator so a voltage of >5.5v means you get 5v running the Arduino and it’s ADC. That said I don’t think your battery pack is always >5.5v as the batteries drain down. If you wanted you can run the Arduino off the PC’s 12v and use the battery for the servo’s “5v” supply, just make sure the battery is grounded. Best option for accuracy would be to choose the 2.56v ADC reference and then use a 10k pot and adjust the max 2.8v down to 2.5v (as measured w/DVM) and send that to the ADC.

Ah, okay, so no matter what voltage I run it will be 5v to the arduino. I’m using lithium AA batteries, which keep their voltage above 1.25 for the majority of their lifetime, so I will be closer to 6v most of the time and I don’t think my usage is draining them quickly at all.

What my confusion over was, is that I want to run the Servo Mod off battery, but I want to run the Display/Voltmetering off PC PSU. It seems to me this isn’t possible, given our progress on trying to get a back-up battery source for my servo mod. I mean what I might be able to do, is like run it off a USB Battery pack, and then have some sort of function, or coding, where Display/Voltmeter mods shut down when PC shuts down.

just make sure the battery is grounded. Best option for accuracy would be to choose the 2.56v ADC reference and then use a 10k pot and adjust the max 2.8v down to 2.5v (as measured w/DVM) and send that to the ADC.

I don’t really understand what either of these comments mean. You mean that the black wire of the battery is hooked up to the black of the servo/MCU? I don’t really understand the ADC stuff you say, I’d like a max voltage of ~2.8, 3v, maybe 2.6. 2.5 is a little low. You said I’d have to solder something to the chip itself? I’m not sure my soldering iron is that precise to do that.

But okay, I see I can get the accuracy either way that I want here, so:

  • Arduino Micro

  • 20x4 LCD Negative RGB

And so it’s a matter of whether I can turn off the Voltmeter/Display when PC is off while keeping servo mod powered, or not, that determines if I use 2 separate MCU’s or one for all.

I think I’ll get it from adafruit since they have that display and not really any other place has in in 20x4.

1 - I don’t know what it would take to have the mobo talk directly to some display. Some program on the PC would have to send messages that the display knows how to interpret, presumably w/o an Arduino in between the 2. Does such a program and display exist and how would that be better than using LCD Smartie ?

2 - The Pro Micro has a regulator that will maintain 5v at the Arduino so long as the battery pack stays > 5.5v. I’m less sure what the min voltage is for other Arduinos. So the ADC accuracy will not vary if the batts stay charged. I’m not sure how you’ll charge them nor how you plan to turn the Arduino and display off so they don’t drain the batts.

3 - You could use different power sources for any or all of the components. You do need to make sure the “grounds” are all tied together, so make sure the batt - wire (likely black) connects to the Arduino GND pin/hole.

4 - If you want to maximize the resolution of the ADC then connect the + and - terminals of a 10k potentiometer (aka a pot) to the + and - terminals of the ~2.8v voltage you want to measure. The wiper of the pot can be adjusted so the voltage on the wiper terminal of the pot is anything btw 0 and 2.8v. If 2.8v is the max voltage expected, then I would adjust the pot to read 2.5v. I would then have the code choose the 2.56v ADC reference option.

Then whenever the memory voltage is 2.8v, the pot will output 2.5v and the ADC should read 999-1000 (=1023*(2.5/2.56)) counts. So each count is worth 0.0025v. That’s as good as it gets.

  1. Eh whatever i dont think the mobo can measure voltage. I mean theres that adafrtui display kit with usb/ttl backpack, unfortunately no one sells that backpack alone but since i also want hardwired voltages I guess it doesnt matter. youd just think a mobo could do it all, right.

2.So basically if battery goes below 5v, like 4.8v for usb, that means itll be more accurate? I mean 6x(1/1024)= .005v so the arduino is at least .01v qccurate so whatever,

  1. Oh okay i see now! So I put the servo on a battery pack to be 24/7, and then the display will be powered by usb so it shuts off with pc! The only issue would be that I cant make the MCU itself switch power supplies, but I imagine it uses very little battery (relative to a single AA 3amp battery, ie ult lithium). I guess the best option would be to just use a usb charger battery pack for the servo + MCU…

so I need to buy that now. Just a matter of picking one that will supply power while being charged. The duracell is a bit expensive… maybe I can find a cheaper one?

so like if i have my display on psu power, id hook red to 5v, and then the blackwire of psu goes to both display and to the mcu? Then the usb battey pack I’ll have hooked up to the mcu directly, which servo also attaches to. And then the voltage measure lines, they just go straight to input pins.

  1. Man I really have trouble following you here. So basically, to increase accuracy from .005v to .0025v/reduce max voltage range, I would need to use a pot. And the +/- would connect to both the MCU and the voltage being measured. Then, you code the MCU to use some 2.56 reference voltage inside of itself that it knows for a fact is what 2.56v feels like and… basically the opposite of a resistor when used to raise max voltage measured, so each step is smaller rather than larger.

I mean I can just use 2.56v as the max voltage read, thats perfectly acceptable, no one really is going to pump vrin to above 2.4vrin anyways (rule of thumb is vrin = vcore + .06, so a vcore of 1.8v is insanity, even on LN2 overclocking, on haswell). For reference, Im using vcore/vrin of 1.45/2.05, which is about the highest voltage used by anyone in the overclocking community for a daily overclock.

either way, what im hearing is at most i need a 10k pot and i have one so cool, dont need to get like a totally different mcu or thing here.

So I’ll go ahead and buy the arduino micro and that display. And a usb battery charger pack of some kind, that’ll take a bit of research. When i google stuff like ‘using usb charger pack as ups’ i get zero results.

your very helpful man, thanks. Codewise, it sounds like its servo is covered, lcd smartie is no coding and plug n play for my software cpu/gpu temps, and then i guess ill have to do coding with voltmeter x2 and hopefully they dont interfere with the lcd smartie (ideally even smartie would incorporate them).

edit: purchased micro and that adafruit display 20x4 negative rgb. Ive foubd some stuff on usb battery ups ‘charge and discharge at same time’ and I’m finding a lot of likeminded people basically havi g lots of trouble - hard to find something that works like this and is cheap, official manufacturer recommends against it, etc.

The display would be off the pc psu, the servo and mcu would be on the battery pack. im not sure how much those would consume, i think its like a 600mah device (servos)?

Belial88:
2.So basically if battery goes below 5v, like 4.8v for usb, that means itll be more accurate? I mean 6x(1/1024)= .005v so the arduino is at least .01v qccurate so whatever,

The problem is that unless you somehow know that the voltage is 4.8v vs the assumed 5v, all your conversions will assume 1023 counts = 5v and so be (5/4.8 = 1.042) 4.2% high.

http://arduino.cc/en/Reference/AnalogRead

Belial88:
3. Oh okay i see now! So I put the servo on a battery pack to be 24/7, and then the display will be powered by usb so it shuts off with pc! The only issue would be that I cant make the MCU itself switch power supplies, but I imagine it uses very little battery (relative to a single AA 3amp battery, ie ult lithium).

so like if i have my display on psu power, id hook red to 5v, and then the blackwire of psu goes to both display and to the mcu? Then the usb battey pack I’ll have hooked up to the mcu directly, which servo also attaches to. And then the voltage measure lines, they just go straight to input pins.

Yes but you may find the Arduino sucks 10+ mA so battery life will be commensurate w/that plus whatever the servo draws. You could put the Arduino in a low power mode and stop commands to the servo, not sure how much that will help given the regulator and USB-serial ICs are still powered.

What’s the driving need for the battery pack ?

Belial88:
4. Man I really have trouble following you here.

Guess I don't know what more I can say.

http://arduino.cc/en/Reference/AnalogReference

http://en.wikipedia.org/wiki/Voltage_divider

http://en.wikipedia.org/wiki/Analog-to- … _converter

Wait so how do i measure voltage correctly if input voltage might change? Does that mean I really need to use a ups usb charger pack now, to make sure voltage is constant?

The battery pack is so the servo works when pc is off, and when its on. I originally went with 4xAA batteries because i assume those would last forever, was very cheap, and because i couldnt figure out a good ups battery pack option that was a good price (ie id rather replace the batteries once a year instead of paying $40).

Also, i was using a small servo so using 4.8v might mean not enough power.

Now, Im going to use a larger servo so 4.8v is more okay. $40 is still expensive, but if I can get one maybe $20, maybe 30, ill reconsider.

edit: ah so mobos dont have an ADC

Belial88:
Wait so how do i measure voltage correctly if input voltage might change? Does that mean I really need to use a ups usb charger pack now, to make sure voltage is constant?

What "input" voltage ? If you mean the Arduino supply voltage, then again there's a voltage regulator that holds that voltage a constant 5v so long as the voltage given to the Pro Micro is > 5.5v. That voltage, "5.5v" will vary from an Uno to a Pro Mini vs ... ie : It may be higher for different versions of Arduinos 'cuz they don't all use the same regulator.

ah, supply voltage, is not same as input.

Okay, so if i supply more than about 5.5v or whatever the vrm is at, it sets it at a constant 5v. But what if i use a usb battery thing, where its going to be 4.8-5v? I suppose it should be constant when pc is on as servo shouldnt use too much and be used too much, but you mean that i’ll need to accurately determine the usb battery pack’s voltage supplied, for best accuracy on my voltmetering?

So i have a dmm, just figure out what the usb packs voltage is, and then somehow thats relevant to the coding i’ll have to do. And if battery drains when pc off, thats okay because i dont need voltmetering then. then pc turns on, charges pack, and we’re all accurate again!

i got an arduino micro, blue pcb. not sure if ill have it visible but keeps the option open. I think i will have it partially visible (ie slightly out of sight)

Do you mean the official Micro ?

http://www.adafruit.com/products/1086#Description

http://store.arduino.cc/ww/index.php?ma … cts_id=283

Is so then I can’t find a schematic to see what regulator is used. All I can go by is their 6-12v spec for the non-regulated supply voltage. So you need a minimum 6v supply to get a constant 5v to the Arduino “brains” or use an external ~5v supply and bypass the Arduino regulator. But now you have to make sure that ~5v supply is never >5.5v or you’ll smoke the aforementioned “brains”.

dbl

man im so confused by the voltages listed but it says 5v operating voltage on the adafruit page (as you linked). I just see every mcu and electronic doodad has a huge range for voltages.

Like the adafruit trinket 3.3 is like 3.3-200v, and the 5v is 5v-200v. So why would you ever use the 5v trinket,amirite? I think i recall something saying the 5v is stronger,it can do 8mhz and 16mhz while at 3.3v you can only do 8mhz, but can the 3.3 be used at 5v and then go 16mhz, and what if you’re like me where you are using 8mhz anyways? I forget why youd need 16mhz but i know what im doing doesnt come close.

so much for ‘just buy it already’ :wink:

edit: the webpage says it can be powered via usb. so servo powered by usb too by going to usb pin which also has the usb battery pack (both grnds and reds), and then display powered by pc psu which has its black wire/grnd going to the mcu’s grnd too (but the pc psu red doesnt go to mcu)

edit2: you know i could still use the trinket, like run trinket + usb charger ups + servo, and then arduino + lcd + 2 wires for voltmetering. And just run the arduino + lcd off the psu, so i can do 12v for the micro and i dunno about lcd but im sure itll do fine on either 12 or 5v. im not sure how that affects the voltmetering, im assuming i just still use the internal reference voltage of 2.56v for super accuracy. or 5v for still acceptable accuracy.

When you plug into, and run off of, the USB you are bypassing the onboard voltage regulator and relying on the USB voltage regulator. That’ll work for your circuitry except for (perhaps) the torquey servo, whose current draw might overwhelm the USB port. W/o knowing it’s draw, but guessing w/good knowledge on the load it has to push, it’s going to draw 0.5- 1A peak. That’s more than most USB ports will supply w/o negotiation w/the device.

http://www.usbmadesimple.co.uk/ums_2.htm

http://en.wikipedia.org/wiki/USB#Power

Yes 5v allows higher clock speeds, in this case 16 MHz. 3.3v is only guaranteed for 8 MHz, though you may O/C and maybe you’ll get lucky. If the majority of stuff the Arduino has to talk to is 5v, then 5v is what you want. If the majority of stuff the Arduino has to talk to is 3.3v, then a 3.3v Arduino is what you want … if you can handle the speed reduction.

ps - that supply voltage, that goes into the regulator, is 6-20v … not 200v :o :mrgreen:

oh man. so basically… I should just use the trinket + usb battery ups, and then for the arduino micro, run it off USB power from the pc, and then use a dmm to verify its voltage because its relevant to how I end up coding the voltmeter? So as to basically stay under about .5amp?

that, or use a 5 (4.8?)v operating MCU?

I’d prefer an MCU with a blue or black pcb ;/

If none exists, thats fine, but just preference. Like I’ll pay $2-5 more but not much more than that.

ah, so the 3.3v trinket is basically lower binned trinkets that didnt test stably at 16mhz (or, maybe, like cpu companies sometimes do, to meet demand, they simply are selling them as not being guaranteed to run 16mhz even though they might be able to or even passed such testing)? so thats why they could run at 5v. And then the 5v trinkets, i dont understand, are they just hardwired to not work at 3.3v (since they can do 8mhz after all)?

anyways yea im a bit confused, but my choices are either buy a 4.8v operating mcu, or dedicate the trinket to servo control?

Unless i get lucky and my usb can supply more than .5-1amp? What if I use my usb 3.0 header, dont 3.0 provide more amperage? Or should I try to find out what amperage the usb ports on my z87x-ud3h are? Or, what if I used my pc’s PSUs 5v rail as a usb power source, since it can provide more than enough amps (rosewill capstone 750w)?

edit: wait, isnt there an issue where I can’t use usb 3.0? Or is that just the trinket? I guess it doesnt matter if I am just plugging into the power line though…