Tagged: thermistor analogue
- This topic has 2 replies, 2 voices, and was last updated 8 years, 5 months ago by
Hafslo.
-
AuthorPosts
-
June 22, 2015 at 5:58 pm #2433
Hafslo
ParticipantI’ve been playing with the analogue input – trying to get Crumble to read temperature from a potential divider made up of a themistor and similarly rated fixed resistor. Running on 4.5v battery. End aim is to make a light whose colour changes according to temperature.
Problem is sparkles draw differing current as they change, and battery drain varies, so analogue reading varies giving a misleading impression of temperature.
Has anyone got a simple circuit that will allow me to measure a variable resistance consistently? From what little I know, I would have thought it needs a voltage regulator but I can’t find one listed that will work from 4.5v.
Any help / ideas gratefully received!
Phil
June 22, 2015 at 10:34 pm #2438Joseph
KeymasterHi Phil,
I think the problem is the potential divider is across the battery voltage, while the Crumble is using the USB voltage as a reference. If you run the program without USB connected, you might see an improvement, but no monitoring!
One way round this is to use an output set to HI as the +ve side of the divider. So you could have each ‘end’ of the divider wired to – and B, with the centre connected to A. You would then set B HI and read the analogue value off A.
Also, you can actually use thermistors and LDRs directly on the crumble (each I/O has a 100k pull-down resistor): connect the thermistor across A and B, set B HI and read analog A. Ideally you would use a 100k (approx.) thermistor, but it should work with other values.
I’m thinking about adding blocks that say something like:
(LDR on A&B/C&D)I hope this makes sense without any diagrams!
All the best,
Joseph
July 5, 2015 at 5:52 pm #2482Hafslo
ParticipantYes, it does thanks!
I just couldn’t face indoor electronics whilst the sun was shining but now we have some rainy days forecast, I’ll give it a go and report back!
Cheers.
Phil
-
AuthorPosts
- You must be logged in to reply to this topic.