Buddy's Reef-Pi Build

Discussion in 'Do It Yourself (DIY)' started by buddy., Dec 3, 2018.

  1. buddy.

    buddy. Active Member Build Thread Contributor

    Joined:
    May 16, 2018
    Messages:
    213
    Likes Received:
    468
    Location:
    Australia
    Hey everyone! Here is another #reef-pi build for anyone interested in following :D
    My build will consist of @Ranjib reef-pi (of course) and I will also be using the HAT and PWM module from @wykat .

    I only have a laptop so I couldn't do the standard raspberry pi set up with a mouse and keyboard, so I found a guide to set up the SD card with SSH and wifi enabled.
    I downloaded Raspbian and flashed it on to the SD card with Etcher.

    Once it is flashed you need to create an empty text file on the card called "SSH".

    IF you want to use wifi you also need to create a text file called wpa_supplicant.conf with the following lines
    ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
    network={
    ssid="YOUR NETWORK NAME"
    psk="YOUR PASSWORD"
    key_mgmt=WPA-PSK
    }

    Put the card in to the pi and power it on. Now you need to find the IP address of the pi. I used a program called nmap.
    To do this, open the command prompt and enter nmap -sn YOUR IP ADDRESS/24
    It will take a few seconds and then list everything on your network.

    Next is to SSH in to the pi by entering ssh pi@PI IP ADDRESS
    The default login is pi and password is raspberry

    From this point you can configure and install everything from the reef-pi guides.
     
    Last edited: Dec 3, 2018

  2. buddy.

    buddy. Active Member Build Thread Contributor

    Joined:
    May 16, 2018
    Messages:
    213
    Likes Received:
    468
    Location:
    Australia
    This is the reef-pi HAT stacked on top the raspberry pi. I will also build the PWM board once it is ready.
    You can find everything you need to build this here
    I used PCBWAY for the board and sourced all of the components from Mouser and Amazon.

    20181202_133610.jpg
    20181202_145729.jpg
    20181202_154223.jpg
     
    Last edited: Dec 3, 2018
    wykat, Diamond1 and Ranjib like this.
  3. buddy.

    buddy. Active Member Build Thread Contributor

    Joined:
    May 16, 2018
    Messages:
    213
    Likes Received:
    468
    Location:
    Australia
    I did all the testing on the Adafruit guide while the HAT was disconnected and it all worked well. I also set up email alerts which also worked without any problem.

    The first issue I am having is with my temperature sensors. I might need help from @Ranjib or @wykat for this. If I connect up the probe directly to the raspberry pi like this, it works perfectly.
    sensors_Screen_Shot_2018-09-22_at_5.35.24_PM.png
    temp.PNG

    But when I use the pi-HAT, the sensor is not getting detected. Where the probe wires connect to the male audio jack I am getting 3.3v on the data and power wires. So the probe is being powered but for some reason its not getting detected.
     
    Diamond1 and Ranjib like this.
  4. speedstar

    speedstar Well-Known Member

    Joined:
    Sep 18, 2018
    Messages:
    547
    Likes Received:
    851
    Location:
    Grand Rapids
    Are you using the updated documentation that swapped the tip and ring? v1.1
     
    Ranjib, Diamond1 and buddy. like this.
  5. speedstar

    speedstar Well-Known Member

    Joined:
    Sep 18, 2018
    Messages:
    547
    Likes Received:
    851
    Location:
    Grand Rapids
  6. buddy.

    buddy. Active Member Build Thread Contributor

    Joined:
    May 16, 2018
    Messages:
    213
    Likes Received:
    468
    Location:
    Australia
    I am not sure, could you show me this doc?

    The PWM board doesn't stack on that connector. There is a 6 pin connector that goes next to that 40 pin connector on the top side that I haven't soldered to the board yet as I am not sure if I am going to stack it or not.
     
  7. speedstar

    speedstar Well-Known Member

    Joined:
    Sep 18, 2018
    Messages:
    547
    Likes Received:
    851
    Location:
    Grand Rapids
    You right guess i can snip the pins. totally forgot

    The doc is right in the link you referenced. There was a change from 1.0 to 1.1 as I had the problem you had, and found it was backward when I traced the board. see picture

    g.JPG
     
    wykat, Ranjib, buddy. and 1 other person like this.
  8. Diamond1

    Diamond1 Valuable Member Build Thread Contributor

    Joined:
    Oct 17, 2013
    Messages:
    1,370
    Likes Received:
    1,858
    Location:
    Cleveland Ohio
    Following along.
    Nice to see your getting started Buddy. Looks good so far.
     
    Ranjib and buddy. like this.
  9. Ranjib

    Ranjib Valuable Member R2R Supporter R2R Excellence Award Reef Squad Build Thread Contributor

    Joined:
    Apr 16, 2016
    Messages:
    5,702
    Likes Received:
    9,181
    Location:
    Foster City, Bay Area
    The data wire should not read 3.3v. Can tiunpower down and check for continuity ?
     
    Diamond1 and buddy. like this.
  10. buddy.

    buddy. Active Member Build Thread Contributor

    Joined:
    May 16, 2018
    Messages:
    213
    Likes Received:
    468
    Location:
    Australia
    THANK YOU!!! This was exactly it! Working now :D
     
    Ranjib and Diamond1 like this.
  11. buddy.

    buddy. Active Member Build Thread Contributor

    Joined:
    May 16, 2018
    Messages:
    213
    Likes Received:
    468
    Location:
    Australia
    Multiple temperature probes now working! Even though the two I connected give very different readings...

    temp2.PNG
     
    Ranjib and Diamond1 like this.
  12. buddy.

    buddy. Active Member Build Thread Contributor

    Joined:
    May 16, 2018
    Messages:
    213
    Likes Received:
    468
    Location:
    Australia
    Ok, next problem!
    I am testing out my 8 channel 5v relay boards.

    First I tested with just the raspberry pi by connecting up the 5v, ground and an outlet GPIO and it worked as expected.

    Next I tried with the pi-HAT but it is not activating the relay. The input of the ULN2803 is receiving 3.25v. The ULN2803 is outputting only 0.6v to the relay board.
    I tried a different GPIO on the second ULN2803 on the pi-HAT with the exact same result.

    The VCC light is on when I connect the relay board to the 5v and GND on the 10pin connector on the pi-HAT.

    The ULN inputs have continuity with the GPIO outlets. The ULN outlets also have continuity with the 10pin connector.
    The ULN's are also grounded on their number 9 pin and have 5v on their number 10 pin. Measuring the voltage on pin 9 and 10 gives 5v.

    Can anyone help me figure out why the ULN2803 output is so low and not activating the relay?
     
    Last edited: Dec 4, 2018
    Diamond1 and Ranjib like this.
  13. buddy.

    buddy. Active Member Build Thread Contributor

    Joined:
    May 16, 2018
    Messages:
    213
    Likes Received:
    468
    Location:
    Australia
    Ranjib likes this.
  14. wykat

    wykat Active Member

    Joined:
    May 23, 2018
    Messages:
    182
    Likes Received:
    420
    Thanks for attachment, will have to remove the old version :D

    @buddy. We can continue here on the relays not working. Unfortunately I don't have your relay board but we should be able to sort this out.
     
    Diamond1 and buddy. like this.
  15. buddy.

    buddy. Active Member Build Thread Contributor

    Joined:
    May 16, 2018
    Messages:
    213
    Likes Received:
    468
    Location:
    Australia

    Hi @wykat
    I will test one outlet on each row of the connector. I have highlighted the differing values in red when comparing the relay board to connected or disconnected.
    Do you want me to also run these same tests with the outlet reversed?

    Top row: Relay Board Connected
    Connector HAT 7, Relays 6, GPIO10.
    -ve probe on ground, +ve probe on GPIO - Voltage on the 40 pin connector when on - 3.25v, Voltage on the 40 pin connector when off - 0v
    -ve probe on ground, +ve probe on ULN output - Voltage on the 10 pin connector when on - 0.6v, Voltage on the 10 pin connector when off - 0v

    -ve probe on ULN output, +ve probe on 5v - Voltage on the 10 pin connector when on - 4.34v, Voltage on the 10 pin connector when off - 4.93v

    Top row: Relay Board Disconnected

    Connector HAT 7, Relays 6, GPIO10.
    -ve probe on ground, +ve probe on GPIO - Voltage on the 40 pin connector when on - 3.25v, Voltage on the 40 pin connector when off - 0v
    -ve probe on ground, +ve probe on ULN output - Voltage on the 10 pin connector when on - 0.6v, Voltage on the 10 pin connector when off - 1.2v
    -ve probe on ULN output, +ve probe on 5v - Voltage on the 10 pin connector when on - 4.34v, Voltage on the 10 pin connector when off - 1.15v

    Bottom row: Relay Board Connected
    Connector HAT 14, Relays 3, GPIO22.

    -ve probe on ground, +ve probe on GPIO - Voltage on the 40 pin connector when on - 3.25v, Voltage on the 40 pin connector when off - 0v
    -ve probe on ground, +ve probe on ULN output - Voltage on the 10 pin connector when on - 0.6v, Voltage on the 10 pin connector when off - 0v
    -ve probe on ULN output, +ve probe on 5v - Voltage on the 10 pin connector when on - 4.36v, Voltage on the 10 pin connector when off - 4.93v

    Bottom row: Relay Board Disconnected
    Connector HAT 14, Relays 3, GPIO22.

    -ve probe on ground, +ve probe on GPIO - Voltage on the 40 pin connector when on - 3.25v, Voltage on the 40 pin connector when off - 0v
    -ve probe on ground, +ve probe on ULN output - Voltage on the 10 pin connector when on - 0.6v, Voltage on the 10 pin connector when off - 1.3v
    -ve probe on ULN output, +ve probe on 5v - Voltage on the 10 pin connector when on - 4.36v, Voltage on the 10 pin connector when off - 1.04v

    No I am not getting any connection here.

    Not sure if it is relevant, but if I have pin 1 and 10 on the 10pin connector connected to GND and VCC on the relay board and then I connect the relay channel directly to the 5v or the 3.3 on the pi then the relay works.
    I hope this helps!!
     
    Last edited: Dec 5, 2018
    Diamond1, Ranjib and wykat like this.
  16. wykat

    wykat Active Member

    Joined:
    May 23, 2018
    Messages:
    182
    Likes Received:
    420
    Sorry for delay, but have some problems in debugging since my old Reef-PI software doesn't start without PWM module and with the PWM module attached I don't have access to measure voltages on the HAT components. Nevertheless my relays do work with the new HAT module (with PWM attached as well), so I can verify your observations after I've upgraded to the latest Reef-PI software (that version should also start when no PWM module is attached).

    It's strange that you have no connection between pin 6 of the I2C bus and GND? Just to be sure, the latest HAT board has thick connections at the bottom side under the L293D going to the motor connectors with almost no space for additional connections. The old board hat just some thin connections, that's how I recognize the difference between the 2 boards. (will need to update the silk screen on Github, my PCB's show 'Reef-PI HAT v1.0')

    Your last statement is interesting and since you're using sockets for the ULN2803 chips, can you remove both U2 & U3 chips and make a direct connection between pins U2-6 and U2-13 (for HAT 7, Relays 6, GPIO10). Then it's the same as connecting the relays directly to GPIO10, the ULN2803 is basically just a protection for the GPIO ports. If that works then your relay board doesn't like the ULN2803 for some reason.
     
    Last edited: Dec 5, 2018
    Diamond1, buddy. and Ranjib like this.
  17. buddy.

    buddy. Active Member Build Thread Contributor

    Joined:
    May 16, 2018
    Messages:
    213
    Likes Received:
    468
    Location:
    Australia
    Sorry I misunderstood which connection you wanted me to check on the I2C, I can definitely confirm that I have a connection to ground on pin6.
    I have uploaded a picture of one of my spare boards just to confirm this with you.
    20181206_062322.jpg

    I removed the ULN chips and put a jumper wire in the sockets as you described.
    The relay does work in normal and reversed mode!
    After this, I tried a brand new ULN chip but then the relay does not work again. You must be right in saying that my relay board does not like the ULN chips.

    Do you think there is an alternative solution to getting the chips working with the board or will I need to buy different boards?
     
    Diamond1 and wykat like this.
  18. speedstar

    speedstar Well-Known Member

    Joined:
    Sep 18, 2018
    Messages:
    547
    Likes Received:
    851
    Location:
    Grand Rapids
    Diamond1, wykat and buddy. like this.
  19. buddy.

    buddy. Active Member Build Thread Contributor

    Joined:
    May 16, 2018
    Messages:
    213
    Likes Received:
    468
    Location:
    Australia
    Diamond1 and wykat like this.
  20. speedstar

    speedstar Well-Known Member

    Joined:
    Sep 18, 2018
    Messages:
    547
    Likes Received:
    851
    Location:
    Grand Rapids
    Sure looks like it.
     
    Diamond1 and buddy. like this.
Draft saved Draft deleted

Share This Page

Loading...