Close
0%
0%

BeeStalker UsbLog

A battery powered Raspberry Pi3 with 7 USB ports, 6 holders for 18650 batteries and some useful accessories

Similar projects worth following
This project actually evolved from a GSM Terminal which was capable of executing JAVA code to a Raspberry Pi Hat (my last years entry) to a fully standalone system driven by a Compute Module 3.

Currently working hardware:
- the main unit (called UsbLog)
- a Hx711 interface
- a BME280 interface
- a Si7021 interface (which needs some integration work)
- GPS support
- cheap 18S20-usb adapters

Some supporting software:
- a nice software handling all the measurement stuff, all that security nightmare, some database handling and some server-side stuff. All written in Qt5
- a light CouchDB layer
- a light PHP layer
- some javascript voodoo

Some basic keyfacts:

2 board design: 1 double sided PowerBoard and a 4 Layer PCB with a Compute Module 3 on it

Everything is built do be modular. So you can easily exchange the Powerboard with an 5V regulator, connect your mouse, a keyboard and an USB-Graphics adapter to get a Raspberry Pi powered PC :)

The design concepts

Everything is USB

Well, that's not totally correct. The battery-voltage is read using I2C but otherwise, currently all sensors are connected by USB. BTW, we have 4 Ports: on the front, 1 inside and 2 on a header connector with standard pinout as found on a PC mainboard.

Speaking of the internal USB, this should be used in future revisions of the software for the 3G/4G uplink... currently I use a dongle which presents itself as ethernet device... less software but bigger dongle.

Everything is Secure

The internet connection now brings in some problems. First we need to get every network device safe. The good thing here is that Slackware Linux (I use this for now since it makes a great and fast solution for prototyping) is quite safe out of the box and 3g/4g networks with their NATs help us a lot.

The data transmission on the other side will need some more work. Here we use (and force!) TLS 1.2+. Both, the server and client have own certificates which are checked against the preshared CA certificate.

Everything is easy

Over the last years I found my biggest problem to be the time to get everything done right. Every time I had to make some ugly design decision just because of the time it would have needed to really make everything great. This time I tried to avoid this by making everything easy.

For example, I again use JSON as my communication format to the server. But with websockets, I now can now much easier make 2 way communication.

JSON seems to be odd for such M2M, IOT application if you do some research on that. MQTT for example is very often used because of its efficiency.

But what is efficient? For me it's the time I need to write and debug everything!

So I use JSON which is easy to read, easy to write (thanks to the Qt) and debug.

To make it efficient in terms of data-size... well, you can use websockets for binary data and Qt lets just make a gzip'ed string from an JSON object in 1 line :)

Everything is relaxed

That was my very first intention but because we make everything easy, only most parts are relaxed :)

So let's see, we cache all sampled data in a local Sqlite database. So we're relaxed here.

The data comes from USB sensors... so no low-level stuff like timing-issues,... => relaxed :)

We use all standardized protocols and formats (JSON, websockets, TLS) => relaxed

The serverside caches incoming data in a Sqlite databse (just in case) and pushes everything into a CouchDB. That's relaxed squared :)

Now for the not-so-relaxed parts: We have to make some of these Sensors... this is not so relaxed...

Everything is open

I'm busy at my day-job and I'm doing my PhD thesis in parallel... So I'll definitly make everything available online but this will come in small doses.

Licenses are not all clear for now... maybe Creative Commons NC or so for the PCBs and GPLv2/BSD for the Software... not yet decided.

Everything should be usable and buyable

Well, to be honest, this is not yet the case... I'll definitely will crowdfund a bigger batch of PCBs when I have all V2 board tested. If I'll try to get them assembled... not so sure.

Demo

Well, everybody whats to see something... as long as my VPS is capable of the traffic, you can see some live data here:

https://stalker.beestalker.eu/

This data (you see mostly test data... there's more in the background) is actually used in a professional apiculture.

Downloads

Give me some time...

some more information can be found in the old project (https://hackaday.io/project/10145-cm3-board-backend-library-bee-hive-monitor)

UsbHx711.pdf

This is the Hx711 interface bringing up to 2 weight scales (and their temperature) to UsbLog via USB (hence called UsbHx711). The firmware uses the v-usb library...

Adobe Portable Document Format - 105.98 kB - 05/24/2017 at 17:39

Preview
Download

UsbLogger.pdf

This is the mainboard of UsbLog. You could use this with a Compute Module 1 or 3 but since a SD-Card socket is available, a Compute Module 3L seems most appropriate to me.

Adobe Portable Document Format - 362.25 kB - 05/22/2017 at 16:33

Preview
Download

PowerBoard.pdf

This is the PowerBoard providing 5V and doing some management and protection functions.

Adobe Portable Document Format - 123.40 kB - 05/17/2017 at 00:45

Preview
Download

  • The project lives!

    johann.wilhelm05/16/2018 at 23:08 0 comments

    It's not dead... it just needs time to get data from the fields...

    That's where problems start... It took time after I designed the CM3 base board (mother board you could call that) and now Farnell (element14 in some countries) does not supply them any more... well that led me to reinvent the wheel _again_ and stick to the common RPi boards...


    So we have again new boards out and we maybe get new (and hopefully similar) data...


     Btw the old ones were good... depending on the cellular reception we get 4-6 months of runtime from the 6 Lipo cells! The only problem were the SMD USB connectors... They just died and stripped from the PCB. => Fixed due to the THD connectors on the normal RPi!

    Stay tuned, after I've a month or so of experience, I'll publish schematics,...

  • First results from field-tests

    johann.wilhelm06/30/2017 at 08:30 0 comments

    Well, 4 Stalkers are out there and now the first one drained its batteries.

    The images are creenshots from the webinterface... for convenience reasons I do not produce real images for displaying them in the browser but I do use the JavaScript library dygraphs.

    This gives zoomable graphs and reduces load on the server (and the network).

    As you see below, a sampling rate of 0.28mHz (1h :) gives exactly 4weeks of runtime (with the currently unoptimized system!).

    I need to say, that I use a ZTE "router" stick.. so there's that 2nd linux running on that stick that makes the UsbLog think it has a USB-ethernet device connected... That draws roughtly the same current as the RPi!

    This will definitly change, but was the fastest way to get it ready for the first tests.

    73

  • 4 Stalkers are out in the fields...

    johann.wilhelm05/29/2017 at 16:45 0 comments

    So, the first batch of 4 BeeStalkers are out in the fields to gain some experience with the new UsbLog.

    Up to now, I only regret making an smd-only board. It sounds like an good idea, but giving the USB connections some rougth treatments, I already had some copper stripping from the FR4.

    This means I did right in not publishing the V2 gerbers since I'll change the USB connectors and the DC-plug to THT versions.

    The Web-Application is getting better as well. Experimental Google-Maps integration (I track the GPS location) works - so selecting the BeeStalker by its location is possible.

    As I find it would not be a good idea to share this nformation ith the whole world, I'll just make some screenshots... so the links to the demo only gives you weight and stuff but hides the cool features :/

    73

  • UsbHx711 Schematic online

    johann.wilhelm05/24/2017 at 17:46 0 comments

    The next step is done... the UsbHx711 interface is online (only schematics for now).

    I actually have the firmware already quite polished... just give me some more days...

    The BME280 and Si7021 interfaces will follow soon.

    73

  • Mainboard V2 schematics online

    johann.wilhelm05/22/2017 at 16:40 0 comments

    Here it is, the schematics of the mainboard are finally online.

    I really thought I would be able to do this on my last weeks business trip to Korea, but there was too much else to do...

    The layout is mostly ready but I think I'll start making the schematics of the sensors ready.

    73

  • PowerBoard V2 seems to be ready... at least for the schematics

    johann.wilhelm05/17/2017 at 00:58 0 comments

    Hi there!

    A little update: the PowerBoard V2 schematics (see public-file section here), ironing out some shortcomings, is ready.

    Currently I'm abroad for the job I'm making from my living from - so the next update will take some time. This wil be the V2 schematics of the mainboard containing the Compute Module 3.

    So far die V1 prototypes are doing mostly fine. I tried to get a small research-grant to give me more time and money for spending more time ob the BeeStalker, but that was not granted due to shortage of public money. But actually 2 research institues are very interested and give this project a try.

    Regards,

View all 6 project logs

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates