Recommendations - Model Train Controller


Results 1 to 40 of 102

Threaded View

  1. #30
    malc-c's Avatar
    malc-c Guest


    Did you find this post helpful? Yes | No

    Default

    Guys,

    Firstly may I say that I admire both DT and Steve's skills in programming, and want to thank you both for staying with this. - I'm feeling way out of my depth here, and all I can do is test the code you offer, and report back.

    Ok power supply:
    240v primary - 12-0-12 secondry 500mA transformer. Rectified using 4 x 1N4004 diodes, regulated via 7812, 7912 1A regulators, with 1000uf capacitors to give smoothed +12 and -12v supply. Then a 7805 is used off the +12v to give +5 line. 0v taken from the centre tap. Actual voltages measured are +4.94v, +11.84 and -11.86.
    +5v used for the PIC, +12v used for the motor supply - 0v commoned to both

    Code.
    I compiled Darrels code, and no matter what I tried I couldn't replicate the latching or drop out (ie the loco would just stop and not respond) when advancing and retarding the 10K lin pot in quick succession. However even with a 4 Mhz xtal the whine from the motor was loud

    Compiling Steves code I got the low growl rather than a whine, but it was a lot less noticable than DT's original code. But advancing and retarding the pot as before still caused the lock up / drop outs.

    Voltage measurements:
    When advancing and retarding the pot quickly between min and max the voltage drop on the +5v line to the pic was less than 0.03v (4.94 - 4.93 was read), so its not enough to cause the PIC to stop running. The drop on the +12v line was a little more, but not drastic, with the lowest reading being 10.56, so the peak drop of around 1.4v.

    To varify that it is the PIC that is locking up and not the output stage, I placed an LED on the output of the PIC, and this would stay illuminated when a lock up occured, even when the loco was removed. I also removed the connection between the PIC and the base of the NPN tranny to see if the LED would go out and it had no affect, so it would appear that the driver side isn't causing the issue.

    Hope this feedback helps.
    Last edited by malc-c; - 17th February 2007 at 21:45.

Similar Threads

  1. Microstepper controller
    By aratti in forum Schematics
    Replies: 14
    Last Post: - 3rd January 2015, 16:52
  2. problem with the GSM controller
    By Dariolo in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 30th May 2009, 20:33
  3. Replies: 2
    Last Post: - 14th July 2008, 22:11
  4. Model Train controller - revisited
    By malc-c in forum mel PIC BASIC Pro
    Replies: 32
    Last Post: - 8th May 2007, 09:40
  5. Dedicated LCD Controller question
    By chuckles in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 27th February 2006, 14:44

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts