Search results

  1. BobK

    Programming PIC to sontrol 6x SERVOs

    Great, have a go at it. If you can’t get it going you can post the code and I will have a look at it. Bob
  2. BobK

    BMS for Lithium Iron phosphate battery bank LiFePo4

    To get the outputs in series you would need to connect + of one to - of the other. Which means you cannot connect a single supply to the two in parallel. I think the only way to do it is to have 2 isolated charging supplies. Edit: or charge only one at a time. Bob
  3. BobK

    Programming PIC to sontrol 6x SERVOs

    Okay. The handler is this piece of code: On High Interrupt Save System INTCON.TMR0IF = 0 Toggle wled 'RC2 TMR0H = %00000111 TMR0L = %00000000 Resume 'RESETS GIEH GIEL The way this works, is when the timer has counted the number of times set by these two lines: TMR0H = %00000111...
  4. BobK

    Rehashing Info About Surface Mount Resistor Size

    They should have substituted the 3/4 W part in the same dimensions rather than the 1/2 W in smaller dimensions. Bob
  5. BobK

    Secret Mission Motion Sensor

    I would just expel the Ninja’s from my home. Bob
  6. BobK

    Programming PIC to sontrol 6x SERVOs

    You are conflating parts of two different solutions we have been discussing. The 2.5 msec interval was in the context of handling the servos in a timer interupt handler. You are not using that technique, so my musings on that do not apply. A gosub does not allow the main loop to run...
  7. BobK

    Programming PIC to sontrol 6x SERVOs

    If you have a timer for 20msec in the main loop, which is presumably doing something else, get rid uf the wait for 8000usec that is the yime you have for doing other things. As you have it now, it would not leave any time in the main loop, it would return to the servo update immediately sice...
  8. BobK

    PIC A/D sampling help

    It looks like the second waveform never gets above it steady state of 900 mV, so just detecting a peak of over, say, 1.1 V should be enough. You need to try it and see if it works reliably. For a 4 KHz waveform, if you sample at 8KHz you might always sample the zero crossing, If you know it...
  9. BobK

    Strange Chinese battery. Need help finding charger.

    Yes, Li Ion. I do not know what BFN means, it might just be an internal code. Bob
  10. BobK

    Programming PIC to sontrol 6x SERVOs

    This is correct. How long it lasts is until you return. Not quite. It turns on the pulse for servo 1, then sets a different timer to interrupt at the end of the pulse for timer1, and returns from the interrupt (which returns you to wherever you were when the interrupt occurred. When the...
  11. BobK

    Strange Chinese battery. Need help finding charger.

    I couldn’t agree more with @Audioguru :) Ninja’d again. Bob
  12. BobK

    Strange Chinese battery. Need help finding charger.

    A battery rated at 25.9 V is almost certainly 7 Li Ion cells in series. (7 x 3.7 = 25.9) You need a charger designed for this particular chemistry and number of cells. The fully charged voltage will be 7 x 4.2 = 29.4 V, which is why a 24V supply did not charge it. Bob
  13. BobK

    Programming PIC to sontrol 6x SERVOs

    That's why I gave you the simplest method first. :) There is actually no 2 msec loop. The interrupts occur at 2 msec intervals and the handler would only execute a few instruction and then return. But interrupt driven programming is a lot more difficult than normal sequential programming...
  14. BobK

    Programming PIC to sontrol 6x SERVOs

    The loop as you have it must be executed continually. If you go more than 20 msec without updating the servo will be erratic. If you need to so something else during each loop, the simplest was is, instead of the 8 msec delay at the end, go off and do what you need as use a timer to start the...
  15. BobK

    Power supply output voltage

    What is it's rating? What is it powering? It sounds like you are trying to draw too much current from it. Bob
  16. BobK

    Will bad/old batteries cause my controller to malfunction?

    Have you considered that the pump might be the problem? Could it be clogged? Can you try running it from a different supply? Bob
  17. BobK

    PIC A/D sampling help

    Sampling for a while and keeping track of the max and min readings should be easy and reliable. Bib
  18. BobK

    Programming PIC to sontrol 6x SERVOs

    Yes, 50 was a typo, I meant 20. Glad to hear that it is working. 1.5 msec to 2.0 msec will move the servo over 180 degrees. Operation outside that is undefined and may or may not work on another model of servo. Bob
  19. BobK

    Programming PIC to sontrol 6x SERVOs

    That probably should have worked. The 50 msec is not critical. Do remember that the on time starts at 1 msec and is up to 2 msec. Bob
  20. BobK

    Programming PIC to sontrol 6x SERVOs

    Each pulse is from 1 to 2 msec. The entire period is 20ms. So, in one period, there is enough time to put out a 1 to 2 msec pulse for each of the 6 servos then repeat. Easiest way to do it is like this (pseuddcode) while (1) { turn on output for 1'st servo delay for on time for...
Top