Need upgrade recommendation from 20x2

frank2644

Member
I've been using the Picaxe 20x2 for awhile and I am pretty happy with that chip. Recently I have discovered a need for a 2.048 ref voltage for the ADC function and the 20x2 does not have that capability.

So basically my question is, what chip should I use to get the internal 2.048 ref and still be compatible with the 20x2 software and pin out configuration? If there is no "perfect" upgrade chip what comes closest?

Thanks,
Frank
 

techElder

Well-known member
The 28X2 and the 40X2 are mostly upwards compatible, but without seeing specific code from you no one can be absolutely sure.
 

hippy

Technical Support
Staff member
The 20X2 doesn't support the FVR directly but it does appear it contains FVR hardware which could perhaps be used through direct SFR access.
 

Pongo

Senior Member
Have you thought about staying with the 20x2 but using an external 2.048 volt reference?
 

frank2644

Member
I am using an external 2.048 reference today, but it's just a resistor divider and not very accurate. If I could get another Picaxe that virtually "drops in" and had the internal reference that would be ideal. Judging from the responses maybe a "drop in" is not possible so I'll try and improve my current external voltage reference.

Thanks, everyone.
 

srnet

Senior Member
I am using an external 2.048 reference today, but it's just a resistor divider and not very accurate. If I could get another Picaxe that virtually "drops in" and had the internal reference that would be ideal
Before you go any further, you really need to understand what it is you expect from the ' reference'.

Accuracy ?

Stabilty ?

Resolution ?
 

premelec

Senior Member
A TLV431 or TL431 with divider could work quite well for your external ref and pretty cheap too... Indeed you might just stabilize the Vcc and use READADC10 - As srnet says what are the specifics?
 

frank2644

Member
I am already using Readadc10 and the max voltage that the picaxe will see peaks at under 2 volts so I think a 2.048 reference gives me the maximum resolution.

The resister divider is off my USB 5 volt supply and that should be pretty stable but the divider includes a multi-turn trim pot and that seems to require adjustment more frequently than I would think. Perhaps that pot is bad. Rather than replace the pot I would rather use a decent voltage reference. This project is for my own use to log the current draw (using current transformer with voltage output) of household appliances over several days. In particular, I just installed a new central A/C and I want to log it's electricity usage. I don't need any unusually high stability or accuracy.

I'll check out some of the devices recommended in this thread.

Thanks.
 

srnet

Senior Member
Its quite possible you can get what you want without adding any extra components at all, see post #7.
 

srnet

Senior Member
If you are talking about #7 in this thread I don't see any solution there.
There is no solution there, as the 'solution' depends entirely on the answer to the questions posed.

I don't need any unusually high stability or accuracy.
That will mean different things to different people.

Do you need to measure to 1% accuracy, 5% or is 50% enough ?
 

frank2644

Member
There is no solution there, as the 'solution' depends entirely on the answer to the questions posed.



That will mean different things to different people.

Do you need to measure to 1% accuracy, 5% or is 50% enough ?
For this particular activity 10% accuracy is probably good enough, however future measurements might demand higher accuracy. So the accuracy question is probably best answered by what I'm willing to spend. And that's likely to depend on my mood when I look at the pricing of the alternatives.

Thanks.
 

techElder

Well-known member
frank, how in the heck do you expect anyone to help you with those kind of answers?

Why don't you sit down and spec out your requirements? We'll all be able to provide answers without guessing what "mood" you're in.
 

frank2644

Member
frank, how in the heck do you expect anyone to help you with those kind of answers?

Why don't you sit down and spec out your requirements? We'll all be able to provide answers without guessing what "mood" you're in.
I wasn't asking any questions about reliability, accuracy or stability, you injected that and now you are complaining because I didn't provide associated specs.

My question was about a drop-in replacement for the 20x2 that had a built-in voltage reference. I think that was answered and some guys were good enough to suggest external voltage devices and I thank them for that.

The issues you raised are important considerations in most applications, but for my current purposes I think I can wing it without much analysis. I was trying to inject a little humor with my "mood" comment, but I guess it wasn't that funny.

Thanks,
Frank
 

AllyCat

Senior Member
Hi,

Yes, I have to agree that you have some rather vague or "strange" requirements and/or assumptions. Why need 10 bit resolution if you're happy with 10% accuracy? And assuming that a USB rail is "accurate" (even to within 10%) is perhaps an optimistic assumption, at least if using different USB sources.

But possible solutions have already been mentioned: If you want a "free" solution (no financial cost, but probably not free of effort) then access the FVR of the 20X2 via POKESFRs, as suggested by hippy. Or if you prefer a "hardware" solution (with obvious costs), then use an external reference voltage (of whatever accuracy that you actually need).

Cheers, Alan.
 

erco

Senior Member
I am already using Readadc10 and the max voltage that the picaxe will see peaks at under 2 volts so I think a 2.048 reference gives me the maximum resolution. i

The resister divider is off my USB 5 volt supply and that should be pretty stable but the divider includes a multi-turn trim pot and that seems to require adjustment more frequently than I would think. Perhaps that pot is bad....
I don't need any unusually high stability or accuracy.
A 10K or 100K mutiturn trimpot voltage divider off of a 5V regulated voltage should be rock solid with no additional components. If you don't need pinpoint accuracy then two fixed resistors would be even better.
 

frank2644

Member
Hi,

Yes, I have to agree that you have some rather vague or "strange" requirements and/or assumptions. Why need 10 bit resolution if you're happy with 10% accuracy? And assuming that a USB rail is "accurate" (even to within 10%) is perhaps an optimistic assumption, at least if using different USB sources.

But possible solutions have already been mentioned: If you want a "free" solution (no financial cost, but probably not free of effort) then access the FVR of the 20X2 via POKESFRs, as suggested by hippy. Or if you prefer a "hardware" solution (with obvious costs), then use an external reference voltage (of whatever accuracy that you actually need).

Cheers, Alan.
Allen,

Perhaps I wasn’t clear, but I don’t think I stated that 10 bit resolution was a requirement. I happen to be using 10 bit resolution because I am reusing a circuit that previously contained that capability.

Also, resolution and accuracy do not necessarily conflict as you imply. You can require high resolution with low accuracy for some applications.

Your USB comment could explain why my voltage divider seems to have drifted, but I did check the USB voltage and that has been stable. Certainly if I plan to use many different computers that would be a consideration.

I’ll search the board for the Hippy POKESFR data that you mentioned.

Thanks,
Frank
 

frank2644

Member
erco,

Yes, I agree...I was surprised that after being unused for several months I needed several turns on the trim pot to reset the voltage. And it's been rock-solid ever since.

My guess is that the 20k trim pot is bad. Or, somehow I did something inadvertently that caused this change.
 

premelec

Senior Member
I've got one - the current resolution isn't high but does give an indication when charging is complete on connected device - when I tried it as a 'through' USB device it didn't work [to read and write to a USB stick for instance]... good price :)
 
Top