Go Down

Topic: Raspberry Pi Zero as horse power coprocessor for Due? (Read 4158 times) previous topic - next topic

HermannSW

I have several ov7670 camera modules, some with Fifo. I have not started to get it working with my Arduino Due, but know the 790(!) posting thread on that subject:
http://forum.arduino.cc/index.php?topic=159557.0

Since I want to use camera for high speed autonomous robot control (Arduebot) I need high fps pictures sent to Due (the other Arduinos are no options because of lack of horse power). Pictures will be simple b&w, no high resolution is needed (80x60 or even 40x30 might be OK). Camera will be mounted sloped and take pictures from front of Arduebot (the "present") until a little ahead (in order to capture the "near future"):


I recently found this easier instruction on how to connect ov7670 with Arduino Due, and was able to understand what was stated there in Russian with the help of Google Translate:
http://privateblog.info/arduino-due-i-kamera-ov7670-primer-ispolzovaniya/

So I think that Due+ov7670 will do the job needed.


Recently I bought Raspberry Pi Zero for 5$(+5$ shipping). It has a camera connector, but only for >35$ cameras. Yesterday I googled and found this really simple instruction on how to use a simple USB webcam with Raspberry Pi:
https://www.youtube.com/watch?v=JnQh-o9aSD0

So I bought a 2$ USB webcam and a 0.31$ micro USB to USB connector yesterday, both with free shipping. This will give me a 1GHz 512MB memory camera "coprocessor" for less than 12.50$.

Pi Zero will only transmit the needed data to Arduino Due and that will use the data to decide on motor speed corrections.


I can think of other uses of Pi Zero as high performance coprocessor, and not only for Arduino Due. Transmitting the data should not be difficult given the 40 GPIO pins of Pi Zero.

Am I right with this "Pi Zero as coprocessor" approach, or do I miss some important fact?


Hermann.
https://forum.arduino.cc/index.php?topic=462107.msg3236016#msg3236016
http://stamm-wilbrandt.de/en/Raspberry_camera.html

HermannSW

#1
Jul 15, 2016, 04:30 pm Last Edit: Jul 17, 2016, 01:58 pm by HermannSW
Wow, just ordered another "coprocessor", this time a "Quad-core Cortex-A7 Up to 1.2GHz" for 8$ !!

The website of FriendlyARM seems to be totally overloaded by the big demand, it took me 40(!) minutes to complete an order of "NanoPi Zero", so you need to be very patient if you will visit that website (>30 "Gateway Timeout" and other browser errors):
http://nanopi.io/nanopi-neo.html

The "NanoPi NEO" features are unbelievable for 8$:
Code: [Select]
CPU: Allwinner H3, Quad-core Cortex-A7 Up to 1.2GHz
DDR3 RAM: 256MB[512MB sold out]
Connectivity: 10/100M Ethernet
USB Host: Type-A x 1, 2.54 mm pin x 2
MicroSD Slot x 1
MicroUSB: for data transmission and power input
Debug Serial Port: 4Pin, 2.54 mm pitch pin header
GPIO: 2.54mm pitch 36pin. It includes UART, SPI, I2C, IO etc
PCB Dimension: 40 x 40 mm
Power Supply: DC 5V/2A
OS/Software: u-boot and UbuntuCore


I did order two NanoPi Neo, with 7$ shipping for 23$ in total,

Hermann.

https://forum.arduino.cc/index.php?topic=462107.msg3236016#msg3236016
http://stamm-wilbrandt.de/en/Raspberry_camera.html

HermannSW

#2
Aug 11, 2016, 11:43 am Last Edit: Aug 11, 2016, 11:51 am by HermannSW
Yesterday I received new 2$ USB webcams and made them work with my NanoPi Neo received two days ago (they do not work with Raspberry Pi Zero). For details see this forum posting.

I recently connected to both, Raspberry Pi Zero as well as NanoPi Neo via USB2UART adapter:
http://www.friendlyarm.com/Forum/viewtopic.php?f=47&t=241


So this kind of "Arduino--(UART)--Pi" connection would allow Pi Zero and NanoPi Neo to be used as coprocessors for any Arduino. With 8$ NanoPi Neo and 2$ USB webcam this can be a 10$ camera coprocessor for Arduinos:


Btw, NanoPi Neo has no GPU and no HDMI, if you need that (I don't) the NanoPi M1 (13$!, plus 5$ shipping) does provide that as many other addons.

Hermann.
https://forum.arduino.cc/index.php?topic=462107.msg3236016#msg3236016
http://stamm-wilbrandt.de/en/Raspberry_camera.html

HermannSW

#3
Apr 26, 2017, 02:45 pm Last Edit: Apr 26, 2017, 02:48 pm by HermannSW
This posting shows Raspberry Pi Zero as camera slave of Arduino:
https://forum.arduino.cc/index.php?topic=462107.msg3232784#msg3232784

Only one wire is needed that signals by a pulse when and how long the Pi Zero should record:
https://www.raspberrypi.org/forums/viewtopic.php?f=43&t=181504

On the prototyping caterpillar robot I use an Arduino Uno, therefore a level shifter was needed.
The other caterpillar robot in that thread (Arduecat) is based on Arduino Due and does not need level shifter.

Hermann.

90fps video taken from on robot Raspberry camera, so what you see is slowed down by factor 90/25=3.6:
https://forum.arduino.cc/index.php?topic=462107.msg3236016#msg3236016
http://stamm-wilbrandt.de/en/Raspberry_camera.html

HermannSW

Updates:

"Re: raspiraw raw bayer data: how to use in callbacks for feature extraction and robot control"
https://www.raspberrypi.org/forums/viewtopic.php?f=43&t=189661#p1231151

automatic camera tilt calibration using Raspberry camera

"Howto capture 360fps (640x240) videos with Raspberry v1 camera"
https://www.raspberrypi.org/forums/viewtopic.php?f=43&t=199204&p=1242609#p1242609

(the animated .gif is slowed down by factor of 25)
"I hereby confirm that my finger that I moved quickly before the Pi Zero is NOT transparent" :lol:

The Raspberry Pi Zero can be bought for 5$ with 5$ shipping.
The v1 Raspberry camera can be bought for 5$ with free shipping on aliexpress.com

Will connect the Pi Zero with Arduino Due mounted on back of caterpillar robot for camera feedback PID controller on Due soon ...


... in order to get caterpillar robot do high speed U-turns under camera PID control:


Hermann.
https://stamm-wilbrandt.de/en/Raspberry_camera.html
https://forum.arduino.cc/index.php?topic=462107.msg3236016#msg3236016
http://stamm-wilbrandt.de/en/Raspberry_camera.html

Go Up