# How to make Raspberry Pi 4B a standalone device?

**URL:** https://forum.core-electronics.com.au/t/how-to-make-raspberry-pi-4b-a-standalone-device/12953
**Category:** Raspberry Pi
**Created:** [28 January 2022 15:00 UTC](https://forum.core-electronics.com.au/t/how-to-make-raspberry-pi-4b-a-standalone-device/12953 "2022-01-28T15:00:36Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![Harold190637](https://avatars.discourse-cdn.com/v4/letter/h/c57346/32.png) [@Harold190637](https://forum.core-electronics.com.au/u/Harold190637)
#### Post date: [28 January 2022 15:00 UTC](https://forum.core-electronics.com.au/t/how-to-make-raspberry-pi-4b-a-standalone-device/12953/1 "2022-01-28T15:00:37Z")

</div>

I have an object detection code in OpenCV inside my Raspberry Pi 4B. My setup is Headless setup OS is Raspbian Buster. I want to make my Raspberry boot without a connection to my Laptop and automatically do the object detection?

---

<div class="post-metadata">

### Author: ![Oliver33](https://avatars.discourse-cdn.com/v4/letter/o/a9adbd/32.png) [@Oliver33](https://forum.core-electronics.com.au/u/Oliver33)
#### Post date: [28 January 2022 21:36 UTC](https://forum.core-electronics.com.au/t/how-to-make-raspberry-pi-4b-a-standalone-device/12953/2 "2022-01-28T21:36:13Z")

</div>

What exactly do you mean by boot without a connection? How do you intend to turn it on?

Getting it to start doing things on startup is the easy part:

[https://learn.sparkfun.com/tutorials/how-to-run-a-raspberry-pi-program-on-startup/all](https://learn.sparkfun.com/tutorials/how-to-run-a-raspberry-pi-program-on-startup/all)

---

<div class="post-metadata">

### Author: ![Harold190637](https://avatars.discourse-cdn.com/v4/letter/h/c57346/32.png) [@Harold190637](https://forum.core-electronics.com.au/u/Harold190637)
#### Post date: [28 January 2022 22:04 UTC](https://forum.core-electronics.com.au/t/how-to-make-raspberry-pi-4b-a-standalone-device/12953/3 "2022-01-28T22:04:49Z")

</div>

What I mean is when I use my Raspberry Pi I always connect it to a Laptop first. I want to run my code without connecting it to a laptop and powering my raspberry pi via batteries instead of the standard way to power it.

---

<div class="post-metadata">

### Author: ![G177630](https://avatars.discourse-cdn.com/v4/letter/g/f07891/32.png) [@G177630](https://forum.core-electronics.com.au/u/G177630)
#### Post date: [29 January 2022 00:02 UTC](https://forum.core-electronics.com.au/t/how-to-make-raspberry-pi-4b-a-standalone-device/12953/4 "2022-01-29T00:02:51Z")

</div>

Hi Harold,

Raspberry Pi programs can be run on start up based on [this article](https://tutorials-raspberrypi.com/raspberry-pi-autostart-start-program-automatically/) or [this](https://www.makeuseof.com/how-to-run-a-raspberry-pi-program-script-at-startup/).

These links will help with the battery powering.

> **[Raspberry Pi Powered by Batteries](https://www.instructables.com/Raspberry-Pi-powered-by-battery/)**
>
> Raspberry Pi Powered by Batteries : In this instructable I will show you how to properly supply power to a Raspberry Pi or Pi 2 with a battery pack or any voltage between 2.9 -32 volts DC. I will be using a efficient Pololu Step-Up/Step-Down Voltage...

Here is a link of search results from this forum regarding LiPo battery  
[https://forum.core-electronics.com.au/search?q=lipo](https://forum.core-electronics.com.au/search?q=lipo)

Basically you would need a PiJuice hat or Battery Shim, a decent capacity battery to suit your runtime and a spare or a battery charger that would charge the batteries connected to a power source or a Solar panel. Someone from Core should be able to help you regarding the items available currently.

G

---

<div class="post-metadata">

### Author: ![Oliver33](https://avatars.discourse-cdn.com/v4/letter/o/a9adbd/32.png) [@Oliver33](https://forum.core-electronics.com.au/u/Oliver33)
#### Post date: [29 January 2022 00:12 UTC](https://forum.core-electronics.com.au/t/how-to-make-raspberry-pi-4b-a-standalone-device/12953/5 "2022-01-29T00:12:02Z")

</div>

I’m not sure what you mean when you say you connect it to your laptop. A Raspberry Pi is a standalone computer, so that’s like saying ‘I always connect my computer to my computer first, but I want to use my computer without connecting it to my computer’.

How do you connect it to your computer?

---

<div class="post-metadata">

### Author: ![Harold190637](https://avatars.discourse-cdn.com/v4/letter/h/c57346/32.png) [@Harold190637](https://forum.core-electronics.com.au/u/Harold190637)
#### Post date: [29 January 2022 00:59 UTC](https://forum.core-electronics.com.au/t/how-to-make-raspberry-pi-4b-a-standalone-device/12953/6 "2022-01-29T00:59:18Z")

</div>

I connect it through ethernet for SSH because I’m using a headless setup. Lets put it this way, I don’t want to use the Raspberry as a computer instead I want to use it as an object detection device.

---

<div class="post-metadata">

### Author: ![James](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/james/32/4400_2.png) [@James](https://forum.core-electronics.com.au/u/James)
#### Post date: [31 January 2022 01:04 UTC](https://forum.core-electronics.com.au/t/how-to-make-raspberry-pi-4b-a-standalone-device/12953/7 "2022-01-31T01:04:58Z")

</div>

Hi Harold,

Since you’re running a headless OS (I assume Raspberry Pi OS Lite), you’re already about as pared-down as you can get without delving into embedded methods.

Could you elaborate a little on what functionality you have, and what functionality you want?

-James

---

<div class="post-metadata">

### Author: ![brian86770](https://avatars.discourse-cdn.com/v4/letter/b/c5a1d2/32.png) [@brian86770](https://forum.core-electronics.com.au/u/brian86770)
#### Post date: [31 January 2022 01:14 UTC](https://forum.core-electronics.com.au/t/how-to-make-raspberry-pi-4b-a-standalone-device/12953/8 "2022-01-31T01:14:43Z")

</div>

if you are running headless and you want to be able to connect to it…  
use a wf-fi board . control it via that system ssh over wi-fi…an .udsb dongle on your laptop/p.c…etc you can use the command line via a putty program…is this what your asking…??? im not shure either…

the putty program should be able to link up to the dongle directly , and not bother your laptop normal running… you should also be able to get updates into your headless unit via the putty program which should have internet available to it … since putty is on your laptop you should have the web available …

---

<div class="post-metadata">

### Author: ![Harold190637](https://avatars.discourse-cdn.com/v4/letter/h/c57346/32.png) [@Harold190637](https://forum.core-electronics.com.au/u/Harold190637)
#### Post date: [31 January 2022 01:31 UTC](https://forum.core-electronics.com.au/t/how-to-make-raspberry-pi-4b-a-standalone-device/12953/9 "2022-01-31T01:31:28Z")

</div>

I am using Raspbian Buster version. My device should have object detection with Text to speech feature. That’s all good sir. Thank you

---

<div class="post-metadata">

### Author: ![James](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/james/32/4400_2.png) [@James](https://forum.core-electronics.com.au/u/James)
#### Post date: [31 January 2022 02:11 UTC](https://forum.core-electronics.com.au/t/how-to-make-raspberry-pi-4b-a-standalone-device/12953/10 "2022-01-31T02:11:23Z")

</div>

Hi Harold,

That should be doable, check out Tim’s guide on object recognition:

> **[Object and Animal Recognition With Raspberry Pi and OpenCV - Tutorial Australia](https://core-electronics.com.au/guides/raspberry-pi/object-identify-raspberry-pi/)**
>
> \[Update – Until there is correct compatibility of OPEN-CV with the new Raspberry Pi ‘Bullseye’ OS I highly recommend at this stage flashing and using the previous Raspberry Pi ‘Buster’ OS onto your Micro-SD for use with this guide...

Were you looking to get it saying object names aloud? If so, you’re not the first!

> [@Object and Animal Recognition With Raspberry Pi and OpenCV](https://forum.core-electronics.com.au/t/object-and-animal-recognition-with-raspberry-pi-and-opencv/11211/28):
>
> Hi Tim, I was from the YouTube comment and I’m trying to use a Text To Speech software to say out loud the name of any object the code is able to detect. I’m having some trouble on a few things. How would I make it so that the if the same object stays on the screen for a while, to stop saying it’s name out loud, and only resume when a NEW object has been spotted? Thanks for the help.

I made another post on that thread talking about how to grab the list of objects it found:

> [@Object and Animal Recognition With Raspberry Pi and OpenCV](https://forum.core-electronics.com.au/t/object-and-animal-recognition-with-raspberry-pi-and-opencv/11211/30):
>
> Hi Niseem, That’ll be super easy! In the Python code in the guide, the getObjects function spits out two things, an image, and a list of all the objects it found in an image, each one a smaller list of two elements, the object name, and the model’s confidence that it got it right. Let me know if this needs more sense added to it! -James

From there, you’ll just need to pick a TTS option, gTTS seems popular:

> **[gTTS](https://pypi.org/project/gTTS/)**
>
> gTTS (Google Text-to-Speech), a Python library and CLI tool to interface with Google Translate text-to-speech API

Or if you’re after something self contained:

> **[TTS is a library for advanced Text-to-Speech generation. | PythonRepo](https://pythonrepo.com/repo/mozilla-TTS-python-natural-language-processing)**
>
> mozilla/TTS, TTS is a library for advanced Text-to-Speech generation. It's built on the latest research, was designed to achieve the best trade-off among ease-of-training, speed and quality. TTS comes with pretrained models, tools for measuring...

-James

---

<div class="post-metadata">

### Author: ![Harold190637](https://avatars.discourse-cdn.com/v4/letter/h/c57346/32.png) [@Harold190637](https://forum.core-electronics.com.au/u/Harold190637)
#### Post date: [31 January 2022 02:30 UTC](https://forum.core-electronics.com.au/t/how-to-make-raspberry-pi-4b-a-standalone-device/12953/11 "2022-01-31T02:30:18Z")

</div>

Woww thank you Sir. After that I am doing a proposal that will turn it into an assistive device with visual impairment so I need to make it like a device that can function anywhere. Any idea how can i do that?

---

<div class="post-metadata">

### Author: ![James](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/james/32/4400_2.png) [@James](https://forum.core-electronics.com.au/u/James)
#### Post date: [31 January 2022 02:37 UTC](https://forum.core-electronics.com.au/t/how-to-make-raspberry-pi-4b-a-standalone-device/12953/12 "2022-01-31T02:37:28Z")

</div>

Hi Harold,

Were you meaning battery-powered? What kind of user interface have you got in mind? Tactile buttons, haptic feedback? Do you have a napkin sketch of what you want your device to look like?

With that in mind, we can come up with better part recommendations 🙂  
-James
