PicPet

Advert

PicPet

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #802931
    duncan webster 1
    Participant
      @duncanwebster1

      As I’m not able to get much workshop time at present I’m in planning mode. I have a part finished clock to get on with as soon as possible, so it would be nice to have a PicPet to set it up and then monitor its performance. I’m not expecting to rival the pendulistas, just get a reasonable timepiece. I’ve been on the PicPet website and note that it has a RS232 output. My computer doesn’t have RS232 input, so I’d have to buy a converter cable, which seems a bit OTT. Can I make the PicPet output USB? It’s just a different serial link after all. I have a PicKit 3 programmer.

      Alternatively, I have a few Arduino minis (not proMini) which appear to have a crystal on board, and I’m a lot more familiar with Arduinos, or a second alternative I can buy an Atmega 328 with Arduino bootloader ready loaded and provide my own Xtal or other timebase.

      I’m sure there are people out there who can advise, if nothing else I’d learn something

      Advert
      #802944
      John Haine
      Participant
        @johnhaine32865

        Hi Duncan, there’s a pin on the PET (pin 4) which selects either RS232 or TTL output.  Obviously the RS232 isn’t to voltage specs but anyway you want TTL which needs +5V.

        Then you need a serial to USB converter of which there are many around, I can’t recall which make I got but I’ll have a look tomorrow.  It’s a little board with a 6 (?) way female header so you can plug it onto a pin header on the board carrying the picPET.  Once I realised that the data out on the PET (p3) needs to go to data in on the adapter it sprang into life.  Powered over the USB connection which I plug into a Pi.

        If you haven’t found it yet the code for the picPETs is at http://www.leapsecond.com/pic/src/ – despite the /src it’s actually hex machine code.  Easy to program with Pickit3.

        If you need an OCXO then Alixpress have cheap ones at the moment.  I ordered 5 earlier in the week which worked out at under £1 each delivered!  https://www.aliexpress.com/item/1005002201279388.html 

        I have bought the same type before at a somewhat higher price (over a tenner each!). They are ex-equipment probably taken out of 3G base stations as China rolled out 5G, I found some test results which showed they are very good.  One downside is a high start-up current which reduces I think to 170mA when warm. I’m shortly going to lay out a PCB (the footprint of the OCXO doesn’t fit perfboard unless you drill an extra hole and mount at an angle).

         

        #802946
        John Haine
        Participant
          @johnhaine32865
          #802963
          IanT
          Participant
            @iant
            #802964
            John Haine
            Participant
              @johnhaine32865

              Yes, uses the same chip as the Sparkfun device but much cheaper!  I also saw on Amazon 5 off for £15 but not a bargain if you only want one!

              #802995
              SillyOldDuffer
              Moderator
                @sillyoldduffer

                This is what my ardPET does.  It’s a precision event timer implemented on an Arduino.  Several advantages over a picPET and a few disadvantages, but:

                • runs on Nano, Uno, Leonardo, microPro and Mega2560
                • Programmed in C using the Arduino-IDE, source code here
                • serial interface on USB
                • 2 to 4 PETS available per chip
                • other functionality can be added – the PET function can be a sub-part of a larger project.

                Like picPET, accuracy and precision depend only on the quality of the resonator, several options available.  In the example below I cut the nasty ceramic resonator off the board and wired a 20MHz TCXO instead.  It provides twice the resolution of a 10MHz picPET. (Thanks again to the forum friend who sent me the TCXO!)

                A bog-standard Leonardo gives reasonable results because it’s resonator is a quartz crystal, if that’s “good enough”.

                DSC06911

                The main advantage of ardPET is it can be extended.  Though I recommend it highly, picPET is only a Precision Event Timer, with limitations such as no USB!   My experimental clock, based on a Nano, implements two PETs.  One measures the actual frequency of the Arduino’s oscillator relative to a GPS second, AND uses the second PET to measure a pendulum’s period relative to the Arduino’s GPS calibrated resonator.  The Nano also detects beam break AND impulses the pendulum AND displays date-time AND reads temperature, pressure and humidity AND logs everything to a PC.   A Mega2560 can support up to 4 PETs.   Main disadvantages are Arduino modules being more expensive than picPET, and the owner has to operate the IDE.  Of course picPET costs rise if a pic-programmer has to be bought, perhaps £20, and that has a learning curve too.  Also, picPET requires a 10MHz oscillator, so some additional electronics needed – not difficult.

                Dave

                 

                #803012
                duncan webster 1
                Participant
                  @duncanwebster1

                  I’ve got 2 of these, which are used to program Arduino Pro Mini. The chip says 1412G, B8908572, FT 232RL. It communicates both ways, so one can program the chip and then serial print output to the Arduino IDE. Is it the same thing as above?

                  Having said that I think I’ll go down the Leonardo route, I went onto a you tube site about programming PICs and it rather put me off, all that mumbo jumbo thatI remembered from 20 years ago about brownout, watchdog etc still there if slightly easier to program. I just don’t get on with UTube demos, accented presenters, my poor hearing and the difficulty of going at my pace  but difficult to rewind over a bit you didn’t understand. Give me a book anytime. I originally had a book called 101 PIC projects for the evil genius, but that was aimed at a PicKit1, and it all seems to have changed since then

                  I appreciate that PicPet with OCXO is probably more accurate, but as I said I’m not a pendulista. I calibrated my existing clock against the BBC pips. Takes a while, work out how many swings in 24 hours from the slave clock, calculate the change in length required and hence rotation of the rating nut and repeat until it’s near enough. When you’re getting close you have to do it over longer periods because the slave clock is only good to 30 seconds.

                  #803013
                  duncan webster 1
                  Participant
                    @duncanwebster1

                    forgot the photo1000003208

                    #803030
                    SillyOldDuffer
                    Moderator
                      @sillyoldduffer

                      The pro Mini has the same microcontroller as the Nano, Uno and Leonardo, so should run ardPET with no bother. It compiles and uploads in the same way as them.

                      Never seen a pro Mini in the flesh!   It’s designed “for applications and installations where space is premium and projects are made as permanent set ups“, meaning pins may have to be soldered on both sided of the board.   The space saving soldering is a little beginner unfriendly, but shouldn’t be difficult.

                      The other side of the board has the resonator, with luck it’s a quartz crystal.  The documentation doesn’t say!

                      Dave

                      #803063
                      John Haine
                      Participant
                        @johnhaine32865

                        Duncan, have a look through the thread on “30W PCM controller”.  Somewhere there Robert posted links to a PIC programming program to drive the Pickit which avoids all the stuff you mentioned.  I downloaded it, connected to the PIC on a breadboard, and it worked perfectly.  I did download the Microchip MPLab stuff but it’s a nightmare and I purged it from my PC.  If you just want to load existing hex files into a PIC this seems to be the way to do it.

                      Viewing 10 posts - 1 through 10 (of 10 total)
                      • Please log in to reply to this topic. Registering is free and easy using the links on the menu at the top of this page.

                      Advert

                      Latest Replies

                      Viewing 25 topics - 1 through 25 (of 25 total)
                      Viewing 25 topics - 1 through 25 (of 25 total)

                      View full reply list.

                      Advert

                      Newsletter Sign-up