Search results

  1. A

    Pill Dispenser / Cat Feeder Project help

    Hi, As the OP is not an electronics hobbyist and perhaps not a model-maker, there are a few characteristics of Servos of which he may not be aware. My main concern is how much power it might drain from the battery in the 23 hours 59 minutes each day when it's NOT driving the turntable. Servos...
  2. A

    Self-calibrating Touch on M2

    Hi, If you use quite large touch pads covered with a thin layer of insulator AND employ a continuous self-compensation scheme, then I think you've a reasonably good chance of it working. Bear in mind that the value returned is not really an "input level" but a frequency count (from a...
  3. A

    Pill Dispenser / Cat Feeder Project help

    Hi, Hmm, I'm sorry but I have to disagree. AFAIK "Continuous Rotation Servos" basically have their feedback potentiometer disconnected or removed, so they would need an independent sensor or detent. In fact there's a real risk that they may "creep" (and consume power) if the "central off"...
  4. A

    Pill Dispenser / Cat Feeder Project help

    Hi, Whichever type of motor you use, it will need a "reduction gear train" (probably at least 100 : 1), the dc motor because it will rotate much too fast, the stepper because its torque (turning force) needs to be magnified. Therefore it makes sense to obtain a motor with a built-in gearbox...
  5. A

    Using the TIME feature on a 14M2

    Hi again, Hmm, it seems to be an "oddity" with PE6. If you use the following code, it runs "slowly", i.e taking a few times longer than "real time". But if you comment out the first sertxd, then it takes literally many minutes (I needed to wait more than 5 minutes) before a "tick " appears...
  6. A

    Using the TIME feature on a 14M2

    Hi FiremanJim , You don't appear to have put the instructions in a loop, so they will only execute once (and the program stop). The following works fine for me in PE5, almost in "real time": #terminal 4800 do if time > 4 then sertxd("tick ") pause 5000 sertxd("tock...
  7. A

    Displays for 2019

    Hi Tom, Assuming the two devices don't have a conflicting I2C address (usually the LCD backpacks can be changed with a pads link), I'd guess there might be too many pull-up resistors on the bus (i.e. each device has pull-ups fitted, but normally only one pair is required) and/or the bus cable...
  8. A

    Measuring (M2) PICaxe Execution speed using NO additional hardware

    Hi, Are you sure it works with an X2 ? I thought the SFR addresses for Timer 1 were different in all the X2s . Also, for correct calibration, I believe you should change the m4 and m16 to m8 and m32 , which are the only Servo (Timer) frequencies that are "valid" for the X2s. But if you do...
  9. A

    Function: setint

    Hi, There are various different ways to define "efficient". ;) It could be the size of the program code, or the time it takes to execute, or how easy it is for a third person to understand what the program is doing ! The PE "Check Syntax" displays the size of the code generated and hippy's...
  10. A

    Displays for 2019

    Hi, About 5 years ago I started an 08M2 project to convert "RS232 serial" to I2C commands to use as an "AXE133-compatible driver" for one of the "I2C expander backpacks" which are often fitted to the 2 x16 and 4 x 20 etc. LCD character displays. It implemented a (large) internal circular...
  11. A

    Strange one

    Hi, The Syntax check will tell you; normally it's 3 bytes (for the default END marker) unless you include the #no_end command. Didn't the "blank" program download much faster than a normal full-sized Program? There wouldn't normally be much point in writing "null" bytes to the whole of the...
  12. A

    repeating procedure using inc Var

    Hi, The PICaxe system resets all (normal) variables to zero BEFORE the program starts to run. But if this is an important part of how the program is required to work, then it's much better practice to actually specify the Var = 0 (or whatever). Maybe sometime later, the program might be...
  13. A

    Smart candle

    Hi, 10k : 4k is rather "marginal" for a digital input, you should assume the potential divider needs to reach at least 2 volts (i.e. <6k pullup) to reliably reach the digital "1" threshold.. As said above, the ADC can't directly generate an interrupt, you either need to poll it in a loop or...
  14. A

    Pause Between Servo Off & PWM

    Hi, Yes, that's very similar to what I found for a code snippet which I submitted recently. ;) I needed to include the following (in the subroutine "start:") to achieve my desired timing result : setfreq m16 pause 100 ;* 25 ms to allow the 20 ms (servo)...
  15. A

    Measuring (M2) PICaxe Execution speed using NO additional hardware

    Hi, This is based on a program that I wrote in 2012 which became somewhat "lost" in a thread with a rather unmemorable title (at least for me). I've used the program many times over the years, so have now "tidied it up" and added a few more features. However, I won't repeat much of the detail...
  16. A

    repeating procedure using inc Var

    Hi, You are changing 4 pins each time, is that to drive two separate motors or are the pins commoned to increase the current drive (or for some other reason)? Also, the specific PICaxe chip you're using might be relevant. Or are you just using the simulator so far? Cheers, Alan.
  17. A

    Battery Voltage Scaling

    Hi, If you are making other ADC measurements, then you may need to reset the voltage reference to the default mode (ratiometric - relative to the supply rail) with the ADCCONFIG command. Sorry, I don't use X2s myself, but the Command Reference certainly appears to say that CALIBADC{10} cannot...
  18. A

    Understanding 20X2 timers

    Hi, No, I think you're probably at least an order of magnitude adrift for a PICaxe. Seems like you need Assembler or hand-crafted Compiler if using only an 8-bit microcontroller. I don't use X2s, but the fastest data transfer from RAM that I can think of is a linear block of POKESFR xxx ...
  19. A

    Understanding 20X2 timers

    Hi, COUNT is a PICaxe Basic "blocking" command, so the PICaxe cannot do anything else during the measurement. Therefore, generally PULSIN is preferred (and can give much higher resolution) but you have to consider that it's measuring the time between "edges" of opposite polarity, not a full...
  20. A

    Battery Voltage Scaling

    Hi, A "classic" 2.7 volt Zener diode is almost useless as a reference voltage, with far too high a source resistance and poor temperature coefficient. There are of course integrated circuits that emulate a "zener" (shunt) reference, including the FVR_2048 (2.048v Fixed Voltage Reference)...
Top