Close

ZeroBot - Raspberry Pi Zero FPV Robot

Back to overview

Raspberry Pi Zero 3D Printed Video Streaming Robot

Discussions

buchnoun wrote 04/22/2018 at 23:21 point

I'm struggling with power :( when mini USB is connected directly to the pi everything's working great! but when I'm using battery it seems there's not enough power to get the pi working : the led blink I can connect once then nothing! I've double check to have 5V at MT3608, yet I didn't wire the ADS and the leds. Could it be that my MT3608 is faulty? I've used breadboard wires do I need to use bigger ones? any help appreciated :-) thanks

  Are you sure? yes | no

Max.K wrote 04/23/2018 at 08:01 point

Breadboard wires should be fine, although thicker wires might be better. A faulty MT3608 could be the reason. Those things are super low-quality, maybe you have a spare one that you can use. Are you sure there are no short-circuits, is there anything getting hot? 

  Are you sure? yes | no

buchnoun wrote 04/23/2018 at 09:45 point

nothing getting hot, I'll try with another MT3608. What is weird is it's working very well when the pi is connected through USB... but what's the point to get a Zerobot with a cable? :) I've noticed on your first pic that there's 2 MT3608 but only one in the wiring diagram and the second picture... Am I missing something?

  Are you sure? yes | no

Max.K wrote 04/23/2018 at 14:42 point

I made a mistake with the pictures. Originally I wanted to use a second MT3608 just for the motors, but couldn't fit it into the chassis. It's optional.

  Are you sure? yes | no

buchnoun wrote 04/21/2018 at 13:52 point

Hi, great project, where can I find a diagram to wire the pi? I'm lost as to know where GPIO x is on the actual board... I know it's a dumb question but why the heck are all those pins not numbered in a logic way ?? :)

  Are you sure? yes | no

Max.K wrote 04/21/2018 at 15:37 point

There's a wiring diagram in the instructions on this site. For the Raspberry Pi pinout, you will have to google that. The GPIO pins are probably organized to reduce the length of the tracks and the amount of vias on the PCB.

  Are you sure? yes | no

buchnoun wrote 04/21/2018 at 23:44 point

thanks for your answer what does mean : "5V USB port" on the wiring diagram? 5V can't be connected on pin 2 or 4?

  Are you sure? yes | no

Max.K wrote 04/22/2018 at 09:46 point

On the opposite side of the USB port that's used to power the raspberry pi zero, there are two pads: 5V and GND. You could connect to the GPIO directly, but then you won't have the protection diode.

  Are you sure? yes | no

Bruno Ricardo Santos wrote 04/20/2018 at 22:00 point

I have everything almost running, but a problem... 

In the touchID, up and down turns to right or left and left and right is forward and reverse... I thing I have the wires that go to the motors wrong.... 

  Are you sure? yes | no

Bruno Ricardo Santos wrote 04/20/2018 at 22:15 point

Problem solved ! Just switched the wires in one motor and now it's ok ! Thank you for such an amazing project ! Since I've found this on Thingiverse will post pictures there ! Thank you !  I had fun doing this and learned a lot about electronics !

  Are you sure? yes | no

Bruno Ricardo Santos wrote 04/18/2018 at 23:37 point

Hi Max.K. Love the project and almost finishing it ! 

I'm in the process of wiring it all up, but I'm having a doubt - electronics is not my strong suite - where to connect all the ground wires ? To the Raspberry PI Pins ? To the batteries ?  Thank you ! 

  Are you sure? yes | no

Max.K wrote 04/19/2018 at 08:27 point

The grounds of all components are interconnected. To reduce the amount of cables I soldered the GND-pins for the step-up converter , motor controller and charger directly to the battery. Then the LEDs and voltage sensor are soldered to the Pi terminals with thinner wires. But it's all the same electrical connection.

  Are you sure? yes | no

Bruno Ricardo Santos wrote 04/19/2018 at 09:58 point

Thank you ! Will terminate today and try it ! :)

  Are you sure? yes | no

laflaf3d wrote 04/16/2018 at 14:31 point

Hi Max.K.

unfortunately for the lifetime of our 18650 Li-ion Battery, it's doesn't like to be charged under C/2. So, to spare this lifetime we should charge these battery at 2.6A ! 

I guess for 2 parallel battery we need this kind of stuff : 

https://fr.aliexpress.com/item/Micro-USB-5V-1A-4-2V-3A-18650-TP4056-Lithium-Battery-Charger-Module-Charging-Board-With/32832047993.html

Crazy, isn't it ?

Best regads

  Are you sure? yes | no

Max.K wrote 04/16/2018 at 15:32 point

Are you suggesting the charging rate is too low? That would be the first time I heard that. 

  Are you sure? yes | no

laflaf3d wrote 04/17/2018 at 06:55 point

Yes it's strange regarding all Li-Ion's device charging time / capacity. 

In Lipo's world we know that low current's charging make crystalization and decrease lifetime. I read many thing and wrote you too quickly. 

APOLOGIZE !

For Li-Ion (not Li-Po), charge rate is about 0,5C to 1C. Best at 0,8C (http://batteryuniversity.com/learn/article/charging_lithium_ion_batteries). After read all the night ( ;-) ) I guess our TP4056 is good for the job.

  Are you sure? yes | no

MP wrote 04/14/2018 at 22:36 point

Wow, I love the new additions, specially the voltage sensor. What would be great now would be some kind of self-charging device, like automatically placing itself over a charging mat when battery is low (like a roomba).

  Are you sure? yes | no

BitwiseNL wrote 04/09/2018 at 05:11 point

HI, 

First i have to say, Great project..  :D

But .... i'm stuck.

I don't seem to get past step 3 , to be more exact, starting the app crashes after the 2018 update. 

App worked great at first boot with fresh SD.

this is what i get ... ( tried it 2 times with new images ): 

__________________________

pi@ZeroBot:~/Desktop/touchUI $ sudo node app.js

/home/pi/Desktop/touchUI/node_modules/socket.io/lib/index.js:177
  const keysIterator = this.parentNsps.keys();
  ^^^^^
SyntaxError: Use of const in strict mode.
    at Module._compile (module.js:439:25)n
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/home/pi/Desktop/touchUI/app.js:3:10)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)

____________________________

Has anyone else has expirienced this? 

How to solve this ? 

  Are you sure? yes | no

Max.K wrote 04/10/2018 at 06:56 point

Socket.io got updated just a week ago. Maybe you could try to downgrade it to a previous version using:

npm uninstall socket.io

npm install socket.io@2.0.4

  Are you sure? yes | no

BitwiseNL wrote 04/10/2018 at 19:41 point

Tried it and still got the same problem .. 

/home/pi/Desktop/touchUI/node_modules/socket.io/node_modules/engine.io/node_modules/uws/uws.js:3

const http = require('http');
^^^^^
SyntaxError: Use of const in strict mode.
    at Module._compile (module.js:439:25)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Server.init (/home/pi/Desktop/touchUI/node_modules/socket.io/node_modules/engine.io/lib/server.js:115:16)
    at new Server (/home/pi/Desktop/touchUI/node_modules/socket.io/node_modules/engine.io/lib/server.js:65:8)
    at Function.attach (/home/pi/Desktop/touchUI/node_modules/socket.io/node_modules/engine.io/lib/engine.io.js:123:16)
    at Server.initEngine (/home/pi/Desktop/touchUI/node_modules/socket.io/lib/index.js:274:21)

  Are you sure? yes | no

Max.K wrote 04/11/2018 at 06:35 point

Have you already set the node.js script to run on boot? Only one instance of it can be executed, so might just be starting a script that is already running. Have you tried 

killall node

before running the node.js script? That it even happens after reinstalling either means that some software has changed or you might be making a simple mistake. I will try the install if the killall command doesn't help. Also, there is always the option to use the SD card images if the manual install does not work.

  Are you sure? yes | no

njichopbrandon wrote 04/04/2018 at 17:41 point

Great project

  Are you sure? yes | no

Max.K wrote 03/29/2018 at 20:56 point

Yes, that looks like the camera I used. Most of them are identical copies of the original pi camera.

  Are you sure? yes | no

laflaf3d wrote 03/30/2018 at 07:38 point

thanks. I saw this cam is 5MP and not 8MP but only 8 bucks. I ordered it and I will tell about it.

  Are you sure? yes | no

Max.K wrote 03/30/2018 at 08:17 point

The camera I am using is only 5MP, too. The older models are cheaper and the video stream is low resolution anyway.

  Are you sure? yes | no

mariusdp wrote 03/15/2018 at 07:31 point

Hi,

npm pigpio will not install on rpi lite. also tried bare lxde with no result. Is there any way to install npm pigpio on lite - reason for that is that would work smoother and the cpu would not stay @100% all time.

If anyone have a solution please help.

PS: i am just a beginner so please try to use simple words :P (so you don't scare my PI)

Thank you,

  Are you sure? yes | no

Max.K wrote 03/29/2018 at 21:01 point

Sorry for the late answer. Hackaday.io doesn't show me notifications sometimes. 

Have you done the required "sudo apt-get install pigpio" ? Because that would be the most obvious solution.

Anyway the difference in cpu usage should be minimal between Raspbian and Raspbian lite.

  Are you sure? yes | no

valerigolade wrote 01/16/2018 at 19:51 point

Hi Max.K, thanks a lot for your job. For me it's work on Raspberry Pi 3 with manual installation.

I have just one problem. To drive my bot with a computer and a mouse, it's work with Microsoft Edge but mouse don't work with Google Chrome. Do you have any idea ?

I think it's a problem with Google Chrome but i don't find solution.

Thanks for your help.

  Are you sure? yes | no

Max.K wrote 01/19/2018 at 22:22 point

Sorry for the late response. I haven't had this problem yet. Can you see the joystick elements in chrome or are they just not working? You could try the incognito mode to see if there is a problem with the plugins. 

  Are you sure? yes | no

valerigolade wrote 01/19/2018 at 23:00 point

Thanks for your response.

The joystick elements don't appear with mouse and my motors don't work. I think it's a problem from Chrome Version 63.0.3239.132 (Build officiel) (64 bits) or plugins missing.

It's work with Edge and Android Mobile, joystick elements and motors.

I don't know Incognito Mode, could you guide me about this please.

Thanks Max

  Are you sure? yes | no

Max.K wrote 01/22/2018 at 10:01 point

In Chrome you can press CTRL+SHIFT+N to open an inkognito tab. In this mode all the usual plugins and adblockers are disabled. Have you tried another computer with Chrome? I am using Chrome as my main browser an have never had this probem.

  Are you sure? yes | no

averneus wrote 09/30/2017 at 19:29 point

Since the stream is transferred through the port 9000 which is different from the controller port 3000. I believe it is necessary to open port for 3000 and also for 9000 from the router in order to control your bot from anywhere in the world.

Have you ever tried this? I plan to do it for tomorrow morning. But you know opening so much ports are creating security risks. Is there anyway to unify all these ports?

  Are you sure? yes | no

averneus wrote 10/01/2017 at 17:33 point

Yeap, it is now working!

  Are you sure? yes | no

Alexandre Mainardi wrote 09/25/2017 at 03:36 point

Good job! PS: The node-waf package has been replaced by node-gyp. The package is not available anymore: https://www.npmjs.org/search?q=node-waf

  Are you sure? yes | no

spencerjack96 wrote 01/05/2018 at 16:49 point

I have an error regarding this when I run "sudo npm install socket" what can i do?

  Are you sure? yes | no

juandelacosta wrote 09/09/2017 at 11:10 point

whats the best glue to glue the motors to the hub wheels

  Are you sure? yes | no

Max.K wrote 09/09/2017 at 13:21 point

Hot glue worked well for me. With some force it can be peeled off again.

  Are you sure? yes | no

juandelacosta wrote 09/08/2017 at 09:01 point

can alternative to gpio18 be used? reason why i ask is i would like to get audio out.

  Are you sure? yes | no

Max.K wrote 09/08/2017 at 09:24 point

Yes, I just selected 4 random pins that are close to each other. You will have to change 1 line in the code.

  Are you sure? yes | no

juandelacosta wrote 09/09/2017 at 02:39 point

nice ok parts are arriving and ill get to that. i have to build a audio circuit also. still trying to figure how to mute mic while fpv is moving. ill have to add a usb mic

  Are you sure? yes | no

juandelacosta wrote 10/04/2017 at 09:51 point

which line?

  Are you sure? yes | no

Max.K wrote 10/04/2017 at 16:37 point

There is a file called app.js (I think it's in the folder TouchUI). Right at the beginning of the file you will find four lines of code containing the gpio numbers (A1 = new Gpio(27, {mode: Gpio.OUTPUT}),) etc

  Are you sure? yes | no

Alihan wrote 08/05/2017 at 16:53 point

Tthat is super user friendly that you create an img. Thank you for contribution to open source community. I admire that, appreciated...
For the hardware do you suggest that I use a 3Vto5V converter module between GPIO Pins and DC Motor Driver?

  Are you sure? yes | no

Max.K wrote 08/06/2017 at 08:11 point

Thanks! I Don't quite understand your question. Are you referring to a level shifter oder do you want to power the motors from the GPIO? 

  Are you sure? yes | no

aaron wrote 08/05/2017 at 00:12 point

Can you use more than 3.7V to power the Driver? Could you use the 3.3V or the 5V from the pi?

  Are you sure? yes | no

Max.K wrote 08/05/2017 at 07:35 point

The driver can be powered with up to 10V. That's not the problem. The Pi on the other hand needs exactly 5V or exactly 3.3V . Also the Pi should not be connected to the same power supply as the motors, because voltage spikes could break it. So the only way of connecting the existing 3.7V and 5V is to use 5V for the Pi and 3.7V for the motors. This may not be ideal but it's the easiest solution without requiring custom parts.

  Are you sure? yes | no

aaron wrote 08/14/2017 at 21:15 point

Thanks Max.K, but do you know where I could get the 3.7V to power the motors? I was thinking of using the 3.3V from one of the gpio pins from the pi. Where could I get 3.7V? 

  Are you sure? yes | no

averneus wrote 09/30/2017 at 19:32 point

That was my answer. Sorry for my late response. I have to work hard for couple of months. Now I could find enough time back to study this project.. Thank you anyway!

  Are you sure? yes | no

mac_ha wrote 07/29/2017 at 14:59 point

Even with recommendation from Andrew Barbosa, I was still unable to go past step 3 of manual installation instructions... So I just downloaded a ready-built image, and got some other problems:

1. I can drive the bot from my iPad by browsing to http://ipaddress:3000, however no video from the camera, only the placeholder for the video is shown;

2. Connecting via VNC and opening the /home/pi/Desktop/touchUI/Touch.html directly (which opens in the Chromium) I can see the video feed, albeit with very low framerate, but then now I can't drive, as no reaction to the mouse/touch on Chromium;

3. There's something broken with the image, as the shutdown doesn't work properly, neither via menu on VNC, nor "sudo shutdown" via SSH - in both cases the network shuts down, preventing any further access to the pi, but it is not properly turned off, as the LED is still on. Connecting the monitor shows just a black screen with blinking cursor on left top corner. A few more times like this and the SD card will be gone, I afraid...

So unless someone could help me how to fix these 3 problems, especially the shutdown issue, I'm going back to try the manual install. But the project by itself is quite interesting!

  Are you sure? yes | no

Max.K wrote 07/29/2017 at 16:03 point

I just uploaded a new image file two hours ago which should fix problem #1. If it's still not working try connecting to http://ipaddress:9000. That should give you just the camera stream. If you don't see that there is something wrong with the streamer or it's a hardware problem.

If you don't want to redownload the newer image, go into TouchUI.html and on the very bottom of the file, replace the ip with your Pi's address.

Don't worry about Problem #2, if you just open the html you are bypassing the node.js script that controls the GPIO. It can't work. But the fact that the stream work for you from there is another indication that you had the older image file and followed the updated instructions.

Problem #3 does not occur with my robot. I just checked and the led turn off completely after a few seconds. Could this be a problem with your power supply / power bank? Maybe it resets the Pi after it has turned off. Have you tried it with a regul5V supply?

  Are you sure? yes | no

mac_ha wrote 07/30/2017 at 08:47 point

Thank you Max for a quick reply - entering the IP address at the last line of Touch.html indeed solved - partially - my problem. However this means that when I bring this bot to my son's friend house (I've put both WiFi credentials into the wpa_supplicant file, so it'll automatically connects to both networks) it won't work until we edit the Touch.html, and coming back home we have to change it back again?! Is there a way to make it automatic - I've read somewhere about making that line 127.0.0.1, it didn't work though (while http://127.0.0.1:9000/action=stream shows the video feed)

On problem #3, I've tried plug in the pi directly to 5V 2A adapter, still the same. I'm noticing also that it hangs with the blinking cursor on top left and the line "plymouth-poweroff.service" on bottom left... This happens even if I connect the monitor and keyboard directly to the pi. So I'll download your new image and try again tomorrow.

BTW, on the video feed's frame rate - it looks quite slow. I've recently tested this one, the video looks better, is it possible to use it instead of  mjpg-streamer:  https://github.com/silvanmelchior/RPi_Cam_Web_Interface. I'm thinking about trying to combine that interface for the camera and the touchUI to drive the bot. What do you think? Thank you.

  Are you sure? yes | no

Max.K wrote 07/30/2017 at 10:04 point

The latest image selects the right ip for the stream automatically, so that should fix it. 

I have no idea about the shutdown problem. Maybe you need to ask this in a Raspberry Pi forum. It doesn't happen with my robot though.

The frame rate depends on many things. While uploading the image file yesterday, the stream was really slow. It needs around 20 Mbit continuously, which your router has to handle. You can try to integrate the other streamer, but I doubt that it will help much. Mjpg-streamer is already pretty resource-friendly, you could try lowering the fps and resolution if it's still too slow.

  Are you sure? yes | no

mac_ha wrote 08/07/2017 at 14:12 point

Seems I've fixed the shutdown problem by disabling splash screen  in Respberry Pi Configuration application. Looks like the plymouth service was trying to show some splash screen and hung....

  Are you sure? yes | no

mac_ha wrote 07/24/2017 at 14:07 point

Tried to follow the instruction, and at the last command on step 3 got this:


pi@rpizero2:~/Desktop/touchUI $ sudo npm install socket
npm WARN engine socket@0.0.1: wanted: {"node":">= 0.6.0 < 0.7.0"} (current: {"node":"0.10.29","npm":"1.4.21"})
\
> microtime@0.2.0 install /home/pi/Desktop/touchUI/node_modules/socket/node_modules/microtime
> node-waf configure build

sh: 1: node-waf: not found
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm ERR! microtime@0.2.0 install: `node-waf configure build`
npm ERR! Exit status 127
npm ERR!
npm ERR! Failed at the microtime@0.2.0 install script.
npm ERR! This is most likely a problem with the microtime package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-waf configure build
npm ERR! You can get their info via:
npm ERR!     npm owner ls microtime
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 4.9.24+
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "socket"
npm ERR! cwd /home/pi/Desktop/touchUI
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /home/pi/Desktop/touchUI/npm-debug.log
npm ERR! not ok code 0

Anyone could advise what might be a problem?


  Are you sure? yes | no

Andrew Barbosa wrote 07/26/2017 at 17:16 point

try updating node and npm I believe that is the problem

  Are you sure? yes | no

Teo Ruscin wrote 07/20/2017 at 09:38 point

A couple software things that will make this a little easier for everyone...when you clone the github files, clone into /var/www/html.  This will eliminate the need for VNC, simply log on to the appropriate network, then go to http://192.168.XX/ZeroBot/Touch.html.  Secondly, instead of changing the IP address in Touch.html, change the code to "http://localhost:9000".  Great work!

  Are you sure? yes | no

Max.K wrote 07/25/2017 at 08:19 point

Thank you for the tips! I will try to include that into the code.

  Are you sure? yes | no

Max.K wrote 07/29/2017 at 14:37 point

Someone else suggested to use a simple script to obtain the ip address for the stream. I updated the Github files and the sd card image based on this.

https://github.com/CoretechR/ZeroBot/issues/1

  Are you sure? yes | no