Recent content by radiogareth

  1. R

    8 bit binary output from 14M2 - a binary timer??

    Thanks for the patient and enlightening comments above. I really should have curbed my enthusiasm to get it working and read the data sheet....now an update and how it was solved, before I actually even READ the comments above! After trying the bit order suggestion (no change that I could tell)...
  2. R

    8 bit binary output from 14M2 - a binary timer??

    Indeed it would... pullup %000100000000000 'turns on the pullup on C.3 #no_data 'saves downloading blank stuff sense:' readadc c.4,b0 'reads the adc on C.4 let b0=255-b0 'pause 100 'debug gosub display_time 'shows what you have adjusted it to...
  3. R

    Read a voltage and scale it to 0-3.60 volts via D to A or PWM?

    Thanks :) Here's what I'm running at the moment. Just boxing it up ready for a real world trial. Gareth #No_data 'Simple rotator control software by Gareth, G4XAT. 12VDC Worm drive motor #PICAXE 14M2 'Processor : driven via L298N doubled up. Main: readadc b.1,b0 'Feedback potentiometer...
  4. R

    Read a voltage and scale it to 0-3.60 volts via D to A or PWM?

    Thanks for the prompts and neat options: I've added the code Alan suggested and that works nicely, leaving the motor comfortably off unless given a meaningful tweak on the target pot. SMall changes use the PWM drive (so gently), larger commanded excursions go full speed. I'd post the code FWIW...
  5. R

    Read a voltage and scale it to 0-3.60 volts via D to A or PWM?

    Thanks, that's sorted it, I now have a nice smooth 'slowing down buzz' as it approaches the set target. My remaining problem is finding a way to stop 'jitter' when one or the other pots is just at the transition between values. I need to create (ideally a software) 'dead-zone' of a couple of...
  6. R

    Read a voltage and scale it to 0-3.60 volts via D to A or PWM?

    I'm trying to add some 'slow down when near the target' code as follows... readadc b.1,b0 'Read again.... readadc b.3,b3 'Read again if b0-b3 <=5 then gosub slower 'Loads the PWM driver with a slower speed pwmout pwmdiv16, c.0, 249,W4 'Word variable used as number over 255...
  7. R

    Read a voltage and scale it to 0-3.60 volts via D to A or PWM?

    Of course, a night of thinking about it produces yet more minor tweaks that could improve the operation. On 12 volts it tends to overshoot the target and hunts back. This would be made worse with the mechanical inertia of a real beam being turned round too. So I added PWM to the enable pin of...
  8. R

    Read a voltage and scale it to 0-3.60 volts via D to A or PWM?

    I'm pleased to report that its up and running and by a fortuitous coincidence of several things, works like a dream. I appreciate the software contains duplicity and could be tidied up but as-it its exactly what I wanted. Even my 'guess the PWM divisor/multiplication' follows within a degree or...
  9. R

    Read a voltage and scale it to 0-3.60 volts via D to A or PWM?

    Other things called today but this evening I've had a look at other potentiometers in the same range and other better quality units. It seems I have a 'got what I paid for' (ie cheap) unit. Better quality units do have a small'dead-zone at each end of their travel but far less degrees of dead...
  10. R

    Read a voltage and scale it to 0-3.60 volts via D to A or PWM?

    Well well, having wired things up to the ACTUAL hardware it seems that the first 10-15 degrees (exact to be confirmed) of pot shaft travel don't change the V out anyway! In fact to get a representation of the full 360 degree rotation I'm going to have to change my gearing (cue up the CAD and 3D...
  11. R

    Read a voltage and scale it to 0-3.60 volts via D to A or PWM?

    Some progress today as the voltmeter module arrived from eBay. First problem is it doesn't display real voltage below 0.3 V, it jumps direct to 0.000. Maybe the really cheap modules will do so when they arrive. Having given further thought to the necessary resolution its not actually worth...
  12. R

    Read a voltage and scale it to 0-3.60 volts via D to A or PWM?

    Before I sit down and attempt the maths, I've remembered that the A to D can have different reference voltages used, including one of your own. I'm hoping for a 'sweet spot' to appear whereby the input voltage range (which I can configure to be whatever I want within the supply rails) and the A...
  13. R

    Read a voltage and scale it to 0-3.60 volts via D to A or PWM?

    All very interesting reading.....I'm hoping a combination of code from above pointers and adjustable 'padding resistors' at the top end (ie towards 5 volts so the 3.6V/360 degree point can be preset) may provide a solution. Although 1 degree accuracy would be nice, the antenna(s) have a...
  14. R

    Read a voltage and scale it to 0-3.60 volts via D to A or PWM?

    Thanks Hippy, that first line opens the lock :) A quick google does of course lead me to Picaxe code that drives the suggested LED display. Certainly a nice solution with a whole host of options possible....that I wasn't considering. Onward..... :cool:
  15. R

    Read a voltage and scale it to 0-3.60 volts via D to A or PWM?

    I'm making a small 12V DC powered aerial rotator. The mechanical part drives a potentiometer through 280 degrees (of its 300 degrees possible travel) as itself rotates 0-360 degrees. The 10 degrees 'spare' at each end of the potentiometer is to save it from end-stop damage in the event of minor...
Top