Results 1 to 6 of 6

Thread: CHI035 + SRF005 not working

  1. #1
    New Member
    Join Date
    Jul 2010
    Location
    Linslade, UK
    Posts
    26

    Question CHI035 + SRF005 not working

    Hi,
    I am playing with some SRF005 modules and don't seem to be getting anywhere.

    I have connected the +5, 0v to the +v and 0v on the input side of the CHI035 board (with 18M2) fitted. I have connected the middle pin of the SRF005 to input 0 (C.0) of the CHI035 board. Hopefully the idea is to use a single pin I/O connection.

    I have tried to use the flowchart loop given in the manual ie. Ultra 0,A > Debug > Wait 0.5 (repeated)

    The circuit mounted LED on the SRF005 flashes every second but the Debug screen only shows zeros. I have been reading the other entries in the forum and have replaced the Ultra with an Inc. The Debug value does change!

    I have tried this on two SRF005 modules and both do the same thing (not surprisingly!). I have looked around and can't see an idiots guide to this problem so thought that there would be someone out there who would know how to solve my problem.

  2. #2
    Senior Member
    Join Date
    May 2010
    Location
    Newcastle Australia
    Posts
    221

    Default

    Hi Robert

    try this code. change c.4 to suit the input pin you are uning. the result shold be in w1

    For more help, a schematic and code would help to solve you problem.

    Code:
    Symbol trig 	   = C.4			'SRF005 range sensor ADC input	
    Symbol range            = w1
    main:
    	pulsout trig,2        		              ' produces about 20uS pulse (must be minimum of 10uS)
       	 pulsin trig,1,range  		' measures the range in 10uS steps
        	pause 10               		' SRF005 mandatory 10mS recharge period after ranging completes
        	let range = range * 10 /29 	              ' multiply by 10 then divide by 58 for 4meg or 28 for 8meg 
    	debug
                   pause 100
    	goto main

    Bill

  3. #3
    New Member
    Join Date
    Jul 2010
    Location
    Linslade, UK
    Posts
    26

    Default

    Thanks for the idea. The code is the same as I tried earlier. Same effect - flashing led but no change to the values within the debug window.
    I know that this is not quite what you asked for but hopefully it might give you a clue to what I have done.

    I used your code and changed the trig to trig=C.0

    chi035.png

  4. #4
    Senior Member
    Join Date
    May 2010
    Location
    Newcastle Australia
    Posts
    221

    Default

    connections from data sheet

    srf0005.jpg

    Bill

  5. #5
    Technical Support
    Join Date
    Jan 1970
    Location
    Bath,UK
    Posts
    5,260
    Blog Entries
    1

    Default

    As Bill says you need two 0V connections, pins 4 and 5 (not just 5)
    PICAXE Technical Support

  6. #6
    New Member
    Join Date
    Jul 2010
    Location
    Linslade, UK
    Posts
    26

    Default

    Oops! I read the sheet wrong and thought that there was no connection on two of the pins. I have bridge the pins and now they are perfectly working as expected.
    Thanks.

Tags for this Thread

Bookmarks

Posting Permissions

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