Announcement

Collapse
No announcement yet.

My New Pi Metal Detector (ATTiny 25)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • jon-ecm
    replied
    Gotta love those old cro's, they just keep going!
    Glad it's working now!

    @Andy
    Thanks for the nice words! It's great to have so many smart minds thinking together!

    Jon

    Leave a comment:


  • 6666
    replied
    Ooops sorry Jon meant to say pin 7
    fat fingers on the keyboard
    just checked with the Frequency counter
    and the PPS go from about 255Hz to about 2.5KHz
    6666

    gee I need to clean that screen
    Attached Files

    Leave a comment:


  • der_fisherman
    replied
    Originally posted by jon-ecm View Post
    I wrote that and almost hit the submit before I checked the dates on the hex file I updated and realized that it had a 2011 data attached to it. Now I feel very stupid, Apparently I had done the "make" command but not "make install" which produces the hex files so all I did was put the same old file on the website, anyways It's all fixed and should be working now if you download the new file.
    Anyone who is so friendly and who mentions his mistakes as you did has to be a really great personality! Nice to have you on board at Geotech......
    Sorry, but I just had to say it, though its not really my business to.
    Regards
    Andy

    Leave a comment:


  • jon-ecm
    replied
    Awesome! See how it works if you want higher frequency's let me know and I can change the divider. I think mine was in the higher range but it should work great either way.
    odd that pulses would be coming from pin 6 as i have them configured for output on Pin 7 (PB2)

    Leave a comment:


  • 6666
    replied
    Jon it works now
    thanks for your efforts

    pot on pin 2
    pulses on pin 6

    pulse width changing from about 100uS to about 1ms
    need to check PPS

    well done thanks
    cheers
    6666

    Leave a comment:


  • jon-ecm
    replied
    /// ADC
    sbi(ADMUX,ADLAR); //Left Adjust ADC result
    sbi(ADMUX,MUX0); //ADC3 (PB3) is used for input
    sbi(ADMUX,MUX1); //ADC3 (PB3) is used for input
    sbi(ADCSRA,ADEN); //enable adc
    sbi(ADCSRA,ADSC); //start conversion(s)
    sbi(ADCSRA,ADPS2); //prescaler = 16
    sbi(ADCSRA,ADATE);

    That's the ADC init code It should be using ADC3 for the input channel but I sometimes get the register bit order messed up, Ie. MSB,LSB etc...
    Right now I have set MUX0 and MUX1 in the ADMUX register but it dosn't seem to be working.
    The Register is described in Page 139 of the datasheet if you want to double check my work.
    Since I don't see any problem in that code I would assume the problem to be related to noise in the adc line. In order to reduce noise I have the program configured to only accept a change in the pot after recieving 50 consecutive samples reading the same value. This is to reduce falsing which would be otherwise be caused when the adc had the odd sample reading something different and thus changing the frequency.
    I wrote that and almost hit the submit before I checked the dates on the hex file I updated and realized that it had a 2011 data attached to it. Now I feel very stupid, Apparently I had done the "make" command but not "make install" which produces the hex files so all I did was put the same old file on the website, anyways It's all fixed and should be working now if you download the new file.

    Leave a comment:


  • 6666
    replied
    Jon
    I have just tested the reburnt chip #1 with the new hex
    and the pulses have changed to the same as chip #3 that also has the new hex
    the pot has no effect

    with the new hex
    the pulse train from pin 6 is about 325 pps
    the pulse is positive going its about 1.6 milli seconds wide
    and about 1.6 milli seconds between pulses

    cheers
    6666

    Leave a comment:


  • 6666
    replied
    Hi Jon
    this is the result of the new hex as above post

    I have burned virgin chip #3 with new hex

    and the pulse train from pin 6 is about 325 pps
    the pulse is positive going its about 1.6 milli seconds wide
    and about 1.6 milli seconds between pulses

    I have reburned old chip #1 with the new hex as well this morning will see if any difference
    i did get the same text result as I posted above for the reburn

    Has anybody else tried this ?

    Leave a comment:


  • jon-ecm
    replied
    Everything looks good there, It's verified so everything should be good.
    Is the new hex working?

    Leave a comment:


  • 6666
    replied
    Hi jon
    yes i know they can be reprogrammed
    but i bought 3 and wanted to be able to compare them
    tomorrow i will try a shorter parallel cable
    just in case the signal is a bit low
    here is the report , says it verified 176 bytes
    cheers
    Attached Files

    Leave a comment:


  • jon-ecm
    replied
    Originally posted by 6666 View Post
    I have burned virgin chip #3
    That almost sounds as if it has lost something
    You know these chips can be reprogrammed thousands of times right?

    Leave a comment:


  • 6666
    replied
    Thanks Jon
    will burn it now
    6666

    I have burned virgin chip #3

    and the pulse train from pin 6 is about 325 pps
    the pulse is positive going its about 1.6 milli seconds wide
    and about 1.6 milli seconds between pulses

    the pot has no effect on pin 2 (or 3)
    this is assuming I am doing everything right
    with the burning process , using same tx fuse values, lf e2, hf dc, ef ff.
    cheers
    6666

    Leave a comment:


  • jon-ecm
    replied
    updated TX hex files

    Updated the hex file for the TX, you can download it here
    It should be using PB3 (Pin 2) for the adc input now, but I have no way to test as I am currently away.

    Cheers!
    Jon

    Leave a comment:


  • Vermeer111
    replied
    Thank You JON-ECM

    Leave a comment:


  • 6666
    replied
    Great thanks Jon
    much appreciated

    Leave a comment:

Working...
X