New IP Camera OSHW board in design RFC


img2

We started recently new design with Allwinner S3 SOC.

The board have these features:

  • Allwinner S3 Cortex-A7 running at 1.2Ghz
  • AXP209 PMU with Lipo charger and step-up for UPS
  • internal 1Gb DDR3 RAM at 1333Mhz
  • 100Mb Ethernet interface with PoE option
  • NAND/eMMC/SPI Flash on socket
  • WiFi / BT module with RTL8723BS
  • Audio In and Out
  • UEXT connector
  • Lipo battery connector
  • Configuration EEPROM
  • LCD connector for LCD-OLinuXino
  • MIPI camera connector with RPi pinout
  • CSI camera connector
  • Dimensions: 60 x 50 mm

img1

S3 SOC is on bottom so heatsink could be add if overheating due to the small PCB area.

img3

We want to build intelligent camera solution which can be powered by PoE and can work with both wired and wireless Ethernet connection.

We add MIPI camera connector with RPi pinout as there are plenty of cheap 5Mpix cameras available.

We also will provide CSI camera with 5-8Mpix separately.

Why we do this board? We want to have intelligent IP camera among our tools and we put features which are necessary to fit our potential projects. This board have also potential for Voice over IP , Video over IP, Security, Home remote monitoring etc.

Initial upload on GitHub is with our schematic and components put on PCB locations, routing is ahead, so we would like to hear your opinion.

Did we forgot something?

Can we do something differently or better?

Let us know what do you think.

64 Comments (+add yours?)

  1. Eduardo Ruiz
    Oct 25, 2019 @ 19:17:27

    Infrared/termal capability?

    Reply

  2. tcmichals
    Oct 25, 2019 @ 19:30:41

    What version of Linux is supported? Does Allwinner provide all source code for video compression?

    Reply

  3. jonsmirl
    Oct 25, 2019 @ 19:34:15

    The Allwinner SDK for this chip is from 2012 and it uses Kernel 3.4. Key bits of it are closed source.

    Mainline support for this chip is good h.264 decode is working, Blueberry Pi guy has the code. CSI parallel camera is supported.

    However…. h.264 encode, ISP and MIPI are not supported. So maybe Olimex can contact bootlin about finishing those items? I have client who is working with this chip and they will contribute to help pay bootlin.

    Reply

  4. jonsmirl
    Oct 25, 2019 @ 19:39:14

    Note, Kernel 3.4 is from before Bluetooth was sorted out. BLE does not work at all. And normal BT is hard to set up.

    Reply

  5. xemilo
    Oct 25, 2019 @ 20:22:23

    Congrats Olimex for doing this!
    As the one who asked for NAND/eMMC on module four (4) months ago,
    I like to believe I have a little impact 🙂
    https://www.olimex.com/forum/index.php?topic=7167.0

    NAND/eMMC on module = upgradability & lower board price.
    SPI – footprint and price is so negligible? that all Allwinner boards should have 16MB (128Mb) soldered.

    Neat/Nifty idea: low profile Ethernet port/connecter – sturdy/solid , half height 🙂
    (as Khadas VIM3 / VIM3L)

    Thanks, good luck and have fun.

    Reply

  6. jonsmirl
    Oct 25, 2019 @ 20:27:25

    And please expose the I2S pins on the header.

    Reply

  7. NGR
    Oct 26, 2019 @ 06:35:33

    Great Move! Keep it coming. A few of thoughts:

    1. A second ethernet port please – even over USB lines would be fine – will make a great board for Industrial IoT projects
    2. Dual band Wifi (2.4 GHz + 5 GHz) – critical for uses in crowded 2.4GHz spaces
    3. Industrial grade varient

    Thank You.

    Reply

    • Another Mouse
      Oct 26, 2019 @ 13:28:53

      Why not making wifi a module like emmc? Like this board costs are lower and the rtl wifi cam be offered as a mofule and maybe for those requiring dual band an ampak module can be offered at a later point?

      Reply

      • Another Mouse
        Oct 26, 2019 @ 13:31:23

        Also forgot to mention, those modules could also be used for other boards over time and this wifi can be upgraded or removed depending on requirements

  8. Lucio De Re
    Oct 26, 2019 @ 08:44:29

    Zoom, Pan, Tilt options. I know what I’m asking and why, I’m not sure this is the right place to ask (my ignorance). Please feel free to educate me.

    Reply

    • jonsmirl
      Oct 26, 2019 @ 16:09:08

      The chip supports 4K sensors. You can implement PTZ in software. Use a fisheye lens (155-180 degrees). Then uses code to PTZ a 1080P frame around inside that 4K sensor. This can be done with the ancient Allwinner SDK, but code is missing in mainline to do it.

      If you want more, hook it to a robot arm.

      Reply

      • Lucio De Re
        Oct 27, 2019 @ 17:07:38

        Thank you, that was quite instructive and appreciated, all of it. I’m interested in such matters, but not yet in a position to experiment, which makes learning a much slower process than asking.

      • jonsmirl
        Oct 27, 2019 @ 18:05:49

        Buy a cheap (under $50) “4K sports cam” on Amazon. Almost all of them have the Allwinner V3 in them. V3 is same chip as S3. These cameras work as USB cameras when plugged into host. That is very inexpensive way to get started. As you figure more out, disassemble the camera and put a better lens on it.

  9. jonsmirl
    Oct 26, 2019 @ 19:35:21

    An alternative to the S3 is the MSTAR SSC8339D (Sigmastar is brand of MSTAR, MSTAR now owned by Mediatek). This chip is supposed to have a Linux SDK somewhere in the 4.4-4.6 range. Pricing is identical to S3.

    https://drive.google.com/open?id=0B-2Z6FDzyIwrbFBycndYQ3hhRkN2Z180VklOU0RvdVM3QUZv

    Reply

  10. JoeNinety
    Oct 27, 2019 @ 20:10:01

    This board has much potential besides being used as an IP camera. With 128Mb of RAM, RGB LCD out and a USB host it’s a small general purpose linux computer and just needs user input devices, which could be via bluetooth.

    I am interested in it to host a DOS emulator under linux to make a portable non-networked mini laptop running DOS abandonware for just getting work done without complications then transfer it off onto a USB stick. A similar idea to freewrite (getfreewrite.com) but not costing $550. Your board has lipo and a charger, but would need a separate 5v input so the existing micro usb can host a USB stick via an adapter. Maybe another micro USB for power input only?
    Not only could this host DOS abandonware but also use linux itself with basic programmes with eg. tinycore linux and also the Oberon system under linux (http://oberon.wikidot.com/oberon-linux-revival-olr)
    To use a desktop monitor an LCD flex connector to VGA R2R DAC adapter would be useful.

    Another use is as a mini gamepad. All the software has been done for the same processor (more or less) by the FunKey project (https://hackaday.io/project/164934-funkey-project-all-your-games-on-your-keychain), but they’re having problems getting the hardware built. Instead of a key chain gamepad you could have a gameboy sized gamepad with a suitable size lcd, say 3.2 inch 320×240. The FunKey project has done all the game controller input design via an i2c gpio expander (https://hackaday.io/project/164934-funkey-project-all-your-games-on-your-keychain/log/163047-schematics-buttons). The game controller could be a daughter board for the Olimex board connecting via the pin header if i2c is present. A speaker would also be needed somewhere.

    What is the target price of this board approximately? Could you provide a bare bones variant with not all of the hardware mounted eg. without wired ethernet, POE, CSI connector, eMMC connector?

    A similar idea is the PapayaPi (https://github.com/PapayaPI/PapayaPI) but it’s larger and, I assume, more expensive,

    Reply

    • jonsmirl
      Oct 27, 2019 @ 20:49:15

      The Allwinner V3S has been discontinued. The S3 is its replacement. The S3 is the same chip as the V3S, it is just in a different package — BGA. All of the software from PapayaPi should work with minor tweaks. The internal DRAM die is different on S3 (uboot tweak), and the LCD will likely be different.

      I don’t know Olimex’s pricing, but my guess it that board will be around $20 not including camera sensors.

      Reply

      • mlopez
        Nov 26, 2019 @ 11:44:55

        Hi. Why do you say that V3S is discontinued? In april, SoChip said to me:
        For V3S processor,please don’t worry,it is expected that its obsolescence will be after 2-3 years.

      • jonsmirl
        Nov 26, 2019 @ 15:05:44

        There are two parts to this, the chip and the package. The V3 chip is still being made. The V3S package is not. The replacement for the V3S is the S3 and S3L from Sochip or the R11 from Allwinner. All of these have the same V3 chip inside, it is just the packaging that is changing. The problem with the packaging changing is that the pin out changes and you need different PCBs.

  11. tcmichals
    Oct 28, 2019 @ 17:02:22

    Looks like Bootlin will be starting some encoding work: https://bootlin.com/

    Reply

  12. Trackback: Olimex open source hardware IP camera – Firmware Security
  13. ChasX
    Oct 30, 2019 @ 16:21:26

    It would be terrific if there would be a SOM version of this in small size with 2.54 headers and castellations (like the ESP8266 board from Olimex) with power management controller and SD card on the board (and maybe the wifi/bt board as well) so it can be used for all kind of interesting projects of mine that need an OS instead of bare ESP8266!

    Reply

  14. Trackback: Olimex OSHW Allwinner S3 IP Camera Board in the Works - Feedback & Suggestions Welcomed
  15. e97
    Nov 01, 2019 @ 04:45:22

    1) Is 100M a limit of the chip? Would like 1000M Ethernet – to support 8MP Pi camera v2 and offloading of raw footage to a NVR that can encode h265

    2) A 1000M gigabit PoE adapter with 5Vdc micro USB is ~USD$4, no need to complicate the board with built-in PoE unless its cheaper and doesnt make the board larger.

    3) Built in mics would be nice, USB multi directional mics are cheap though

    Reply

    • OLIMEX Ltd
      Nov 01, 2019 @ 08:00:18

      1. S3 have no Gigabit
      2. please show me isolated $4 Gigabit PoE which is 803.af compliant
      3. thanks for the tip

      Reply

      • e97
        Nov 06, 2019 @ 00:49:13

        > 2. please show me isolated $4 Gigabit PoE which is 803.af compliant
        How many are you looking for?

      • lightelf
        Dec 09, 2019 @ 17:31:54

        As I can see from S3 datasheet – it have RGMII interface, pin shared with LCD/LVDS.

    • jonsmirl
      Nov 01, 2019 @ 14:57:02

      Just buy off-the-shelf Hisilicon board with h.265 video out. They cost $20. Trying to ship uncompressed video over a LAN is not going to work very well.

      If you want a chip with h.265 support the Ingenic T30 is probably the lowest cost option. http://www.ingenic.com.cn/en/?product/id/16.html This chip is MIPS based and it does not have an LCD controller.

      Reply

      • e97
        Nov 22, 2019 @ 16:06:54

        Got a link to those Hisilicon boards? What kind of latency does it add?
        Testing raw video over gigabit -> x86, gets us <100ms latency for processed footage and near real-time viewing without overheating the camera

      • jonsmirl
        Nov 22, 2019 @ 17:23:49

        Search for hi3518e on aliexpress

      • pboddie
        Jan 13, 2020 @ 19:50:02

        Sorry to bump an old discussion thread, but is there any public documentation for the Ingenic encoders or decoders?

        There is MPlayer source code out there that supports the JZ4780 and maybe other SoCs, but it isn’t likely to be the basis of any mainline support for the hardware, and the Web only provides mentions of documents covering the VPU functionality, not the documents themselves.

        Having programming manuals publicly available for this kind of Ingenic product functionality would make quite a difference to the appeal of those products. Otherwise, everyone is relying on blobs and ultimately unmaintainable code drops.

  16. Thomas
    Nov 01, 2019 @ 20:58:13

    Nice….when is it available?

    Reply

  17. et9000
    Nov 02, 2019 @ 00:25:45

    This looks great! I am very interested to find a solution which has the following: 2 camera inputs (preferably parallel or 1 parallel and 1 mipi), hardware video encoding, LCD controller, Wifi. Could this be it?

    Reply

  18. Luc Verhaegen
    Nov 03, 2019 @ 13:35:55

    et9000: you can have this with an a20 device, like the lime2.

    Reply

    • et9000
      Nov 04, 2019 @ 19:51:29

      Thanks for the pointer Luc, will check that out. I am still interested in the V3/S3 as I believe that the power consumption may be lower than the SoCs with dual or quad cores?

      Reply

    • et9000
      Nov 12, 2019 @ 18:50:40

      (the Lime2 does not have camera inputs btw)

      Reply

  19. et9000
    Nov 06, 2019 @ 00:57:39

    Thanks for the pointers guys.
    One more question about the S3 chip. The product brief (for the V3, on AW website) says that it supports two channel encoding, for front and rear cameras. But how is that possible, there is only one ISP, can you connect more than one camera or video source?

    Reply

    • jonsmirl
      Nov 06, 2019 @ 01:18:16

      A simplified explanation… A frame comes in from sensor to DRAM. You tell ISP to do something to it, output to DRAM. That output in DRAM is processed by h.264 which ends up again in DRAM. Note that each stage gets stored in DRAM. So if you have two incoming sources for video you have two frames in DRAM. You can then process them sequential using the ISP. The same can be done with the h.264 hardware. In fact the frame don’t even have to originate from an image sensor, you could compute them with CGI code.

      The ISP is not tied to a specific sensor, it just works on a frame in DRAM. Why the statement about two channels? Speed. To do two channels at 30FPS, the ISP needs to be able to run at 60FPS. The answer to this is complicated on S3, because if one channel is 4KP20 then there is no extra time available to process a second channel.

      Note the A20 encode hardware is only 1080P 30FPS and the S3 hardware is 1080P ~240FPS. So S3 has much more ability to handle multiple streams. This is a difference in the V3 family – encode speed varies from 1080P 60FPS upto 240 FPS by clocking the encoder faster. Different packages deal differently with the heat.

      The V5 is different in this respect, it has two ISP units and two h.264 units and two h.265 units. So you can do a whole lot of stuff in parallel (like dual 4KP30) If you want high performance dual cameras, I recommend the V5.

      Reply

      • et9000
        Nov 07, 2019 @ 21:37:50

        Thank you Jon, that explanation really helped. In my case both the cameras are quite low resolution so I will probably still consider the V3/S3 part.

      • mgilge
        Dec 01, 2019 @ 14:00:54

        So if I understand correctly, the S3 could interface to 2 cameras, one MIPI CSI and another parallel one with up to 16bit?

      • jonsmirl
        Dec 01, 2019 @ 16:16:48

        You need the V5 for that. With S3 both camera interfaces are on the same pins and there is only a single video pipeline.

      • mgilge
        Dec 01, 2019 @ 17:03:50

        Hi Jon, the pins for the MIPI CSI interface are different from the pins for the parallel CSI interface (port E). Also the S3brief mentions “dual- channel
        1080p@30fps encoding, or front & rear 1080p@30fps encoding.”

      • jonsmirl
        Dec 01, 2019 @ 19:13:13

        Maybe you can get dual camera to work on S3. I have never seen anyone do it. You are in for some significant software development.

        Buy why do through that kind of pain? A Lindenis V5 board is around $100 with dual 4K camera support and it was designed to do that using dual video pipelines. It even has hardware binocular depth mapping support. All of this works out-of-the-box and the SDK is on Github.
        http://www.lindeni.org/lindenis-v5.html

      • mgilge
        Dec 01, 2019 @ 19:30:11

        Hi Jon, thanks fro pointing me to the V5.

  20. Oliver
    Nov 13, 2019 @ 20:58:49

    I also think that having an onboard SPI flash connected to the boot port SPI0.0 instead of the i2c eeprom maybe even. For our board(s) I think having 64 of even 32 KiB would be enough. The SPL only has to fit, which is limited to 24K on A10/A20, and possibly slightly more on newer boards? For example, the BBB can load upto 109 KiB into it’s SRAM. Having 128K means you can store the entire SPL there, and use the rest for config.

    Having said that, the BBB can do network booting, and having that in the SPL (code-wise) means you probably need a bigger SPL. Since there’s only 24 KiB of sram, a bigger SPL won’t work, and so u-boot proper would need to fit. A massive u-boot binary can take ujpto a few 100 KiB, so 512 KiB or 1024 KiB flash should be more then plenty for SPL and U-Boot proper.

    How does that matter? PXE booting of course. So while yes, you could put this on an expansion board, having it available, always, natively is pretty neat.

    Reply

  21. mlopez
    Nov 26, 2019 @ 11:40:19

    Very interesting board.
    Just a comment: looking at the image, it seems that there isn’t enough isolation in ethernet interface. In a non PoE device, between client side and line side, you must comply an isolation of 1500V by 802.3 normative. In the PoE connector it seems that it’s not the case, because ground is too near.

    Reply

  22. Fearless Dragon
    Nov 26, 2019 @ 16:01:20

    I see a market for IP camera’s not based on Chinese technology so I’d prefer you’d base your board on an Atmel / Microchip or NXP ARM processor.

    Reply

    • OLIMEX Ltd
      Nov 26, 2019 @ 16:03:54

      which SOC you have in mind?

      Reply

      • Fearless Dragon
        Nov 27, 2019 @ 11:08:03

        i.MX 6Solo which has an industrial temperature range.

      • jonsmirl
        Nov 27, 2019 @ 14:58:43

        Cheapest imx6 solo industrial range is $23.75. iMX6 is about 9X more expensive than S3. Plus S3 has a better camera system. If S3 running 100% open source software I don’t see a a major problem. At extreme levels of hacking all of these chips are vulnerable since ARM is also vulnerable to SPECTRE class attacks. It you want that kind of security the only solution is to not hook the cameras to the Internet.

      • Fearless Dragon
        Nov 28, 2019 @ 07:18:59

        Price isn’t really an issue, as governments are willing to pay extra for a non-Chinese based camera system. As someone already suggested above the AllWinner software stack isn’t entirely open-source and contains closed-source firmware BLOBs.

      • Fearless Dragon
        Nov 29, 2019 @ 07:10:15

        I will *not* go into a discussion whether or not we should be boycotting Chinese-based IT products. But the fact is, our governments and companies don’t want Chinese based stuff and therefore a market exists which is potentially lucrative.

    • jonsmirl
      Nov 26, 2019 @ 16:16:34

      What choices are there? Note that the chip has to have an h.264 encoder, not just a camera interface. All of the non-Chinese solutions I am aware of will add over $20 to the product cost. Cheapest iMX6 SOC with camera support is $17 plus DRAM.

      Reply

  23. Fearless Dragon
    Nov 26, 2019 @ 17:53:55

    The NXP i.MX6 family springs to mind. It has H264 hardware support. Price shouldn’t be a problem since many government entities would be willing to pay more for a design not based on Chinese hardware / software.

    Reply

  24. Klaas
    Nov 28, 2019 @ 16:33:06

    Consider voip use cases :
    – Intercom : add speaker amplifier and screw terminals for connecting miç’s and speaker. and a button input for push to call.
    – Camera with audio interface : expose all mic input’s for far field/ beam forming audio processing.
    – Voip phone : screw terminals for audio in out, display with touch screen , speaker amp for handsfree operation, SOC is powerfull enough for the echo cancellation.

    In practice board can be used for industrial or special projects with custom casing, I don’t see it used in mass quantity projects, so mechanical aspects should be prepared for that usage. (led next to Ethernet connector so it can exposed through casing for user interface)

    MIC_N inputs with 2k to gnd
    MIC input caps 1 uF
    MIC_n inputs on terminal for differential input handset mic
    MBIAS should be very clean

    Reply

    • jonsmirl
      Nov 28, 2019 @ 18:39:09

      Here are the options for adding array mics to the S3….
      The first three need software. All of these pieces (DOA, AEC, beamforming, WWE) are floating around in github but they have not been integrated together. librespeaker has integrated them all but they won’t publish source. The binary librepeaker will work with these first three.
      1) Use the two existing analog mic inputs — $1
      2) Use x-powers AC108 and four analog mics — $2
      3) Use four I2S MEMS mics that support TDM. — $4 (can they be had for less than $1?)
      4) Knowles IA8201. Three mic beamforming solution with Amazon certification. But it runs a binary firmware blob inside the IA8201. — $4 inclusive.

      Reply

  25. jonsmirl
    Nov 28, 2019 @ 20:15:21

    Here is schematic for AC108 board that should work on S3. The device driver will need to be ported but that should not be too difficult. It needs to turn on the TDM bit inside the S3 I2S driver.

    Click to access ReSpeaker%204-Mic%20Array%20for%20Raspberry%20Pi%20%20v1.0.pdf

    Complicating this — there is only one I2S port. So if output codec also attached, it too has to support TDM I2S. About half of available codecs support this.

    Downside — some hacking is needed to piece together the necessary open source software for hot word and beamforming.

    BTW — this AC108 design should work on any Allwinner SOC. But.. a cheaper solution is to use PDM mics (under $1 for four) Unfortunately S3 does not support PDM mics.

    AC108 is about $0.85 plus four mics, $0.20 total about $1.75

    Reply

  26. mgilge
    Dec 01, 2019 @ 16:50:36

    Is there an industrial version of the S3 available, just like the T2 for the A20?
    +70 deg. C is not good enough for outside applications.

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: