Home 2018 Forums Crumble Support Analogue Input

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #2433
    Hafslo
    Participant

    I’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

    #2438
    Joseph
    Keymaster

    Hi 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

    #2482
    Hafslo
    Participant

    Yes, 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

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.