Author Topic: Raspberry PowerOff/disconnect working this way?  (Read 1571 times)

0 Members and 1 Guest are viewing this topic.

Offline PODFTopic starter

  • Contributor
  • Posts: 13
Raspberry PowerOff/disconnect working this way?
« on: February 27, 2015, 01:26:45 pm »
Hi

I'm used to computers but a beginner in electronics. I watch videos from Dave Jones and Ben Heck on youtube. And i got infected with this making / modding / 3dprinting / electronics & repair stuff. Now i want build something myself.

I'm designing a portable project with 2 video-cameras (1 in front/ 1 in rear). It is battery powered by a usb-battery-bank (10000mAh or +). Because of the battery it should use as less power as it can.

I chosen 2x Raspberry Pi A+ (http://www.raspberrypi.org/documentation/hardware/raspberrypi/models/README.md#modelaplus) with 2x RPiCameraModules (http://www.raspberrypi.org/documentation/hardware/camera.md) for video recording. Because the cameras dont have to record the whole day an Atmega328P (http://www.atmel.com/devices/ATMEGA328P.aspx) is used which decides when to record or power off the RPi's.

Because the RPi's are computers with an OS running, they need to shutdown properly. Therefore when the RPi boots it sets its GPIO3 HIGH by a script. RPi GPIO3 is connected with Atmega PortB1 from RPi1 and on Atmega PortB2 from RPi2. The Atmega looks on PB1/PB2 if there is a HIGH signal (RPi's running) or a LOW signal (RPi's shutoff). When the Atmega sees that both RPi's are off, it removes the +5V from the RPi with a P-MOSFET.

The RPi's and the Atmega are also communicating with I2C with each other. The Philipps Application Note AN97055 has a sample for a levelshifter with isolation when Lower volage sections powers down (http://www.datasheetarchive.com/dlmain/Datasheets-25/DSA-492462.pdf).

But the suggested BSSN10 FETs seems to be old and no more available. What can i use instead? Do i have to search them myself or is there any list or how do i get the proper replacment FETs? By the way, i have only very minimal knowledge about FETs or any other electronics stuff. and dont know for which values to search.

I also dont know how to find out which P-MOSFET i should use to remove the Power (+5V) from the two RPi's. I looked long around and think the Fairchild NDP6020P (https://www.fairchildsemi.com/datasheets/ND/NDP6020P.pdf) could be the right one? I want a big one (TO-220 alike) because i can solder them better. Do i need a resistor between the power-cutting P-MOSFET and the Atmega? Do i need to set the PortB0 to output LOW or HIGH for activating the power with the P-FET? What happens when i reset the Atmega? I think all Pins are then in Input mode with high resistance. What does the P-FET when in this state?

Is it essential that GND is ALWAYS connected betwenn Atmega and RPi's and all ohter chips? Why? I dont understand that.

Could my design work? Or am i blowing all up whith this? Is there a problem when i cut off the +5V from the RPi's but the connection beween the RPi's and the Atmega over the GPIO3/PB1/PB2 is still there? Do i need optocouplers (or what could also be used) for isolating them like the levelshifter isolates the I2C bus?

I attached a drawing of how i want to do this.

PODF
 

Offline lapm

  • Frequent Contributor
  • **
  • Posts: 564
  • Country: fi
Re: Raspberry PowerOff/disconnect working this way?
« Reply #1 on: February 27, 2015, 02:10:42 pm »
Ground is your reference point when voltage levels are conserned.. If you need to brake ground connection, then you need optocouplers to get signals over the barrier.
Electronics, Linux, Programming, Science... im interested all of it...
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf