Hackaday Prize Entry: Electronics Anywhere, Any Time

There has always been a need for electronic graph paper – a digital device that records ones and zeros, writes bits, and keeps track of analog voltages. Many moons ago, this sort of device was graph paper, wrapped around a drum, slowly spinning around once per day. With the advent of cheap, powerful microcontrollers and SD cards these devices have become even more capable.

For their entry to the Hackaday Prize, [Kuldeep] and [Sandeep] have built Box0. It’s a lab in a bag, an open source data acquisition unit, and a USB device that toggles pins, all in one simple device.

The hardware for this devices consists of an STM32F0 microcontroller, a USB port, and enough pins to offer up a few SPIs, an I2C bus, eight channels of digital output, two PWM channels, a UART, analog in, and analog out.

Of course, hardware is the easy part. If you want to do something useful with a device like this, you need some software. Here is where the project really shines. They have libraries for Python, Julia, C, Java, and JavaScript. That’s enough to make anyone happy, and makes this Box0 exceptionally capable. For a demonstration, they’ve built a curve tracer for transistors and red, green, and blue LEDs with the Box0. It works, and it looks like this actually is an exceptionally useful device.

11 thoughts on “Hackaday Prize Entry: Electronics Anywhere, Any Time

  1. I think that beginners will become disappointed by this box quickly:
    – Digital I/O’s are only 3.3V, without protection. One wrong connection, and the micro goes kaboom.
    They have 510 ohm resistors in series, but that doesn’t help much against 12V or higher.
    – Analog I/Os are +/- 3.3V, but at least offer some weak protection.

    This is a microcontroller board, not a lab tool. A lab tool has protections against everyday stupidity. It happens to the best.

    1. I had a few mishaps with wiring up my STM32F0 on a breadboard. I had reverse the polarity of the power supply resulting in a small blister on the chip packaged I had accidentally hook up 5V rail to the chip a couple of times. I keep them around for breadboarding as mishaps are more likely. I actually used them for development until I have proper PCB done. I haven’t seen anything weird. I wouldn’t recommend them for anything permanent or for someone else.

      There are actually 5V tolerant pins digital for the STM32F0 chip. 3.3V output is more than enough for interfacing to 5V TTL parts as the VIH for those families are usually around 2.0V (min).

      5V CMOS input threshold are a different matter. While officially they are 66% (or 70%), but most have transition point around 50% if they have done their homework.

  2. First of all, this is *not* a microcontroller board! and *neither* it is a “lab tool”.

    Box0 comes with firmware for acquiring data, controlling and reporting stuff to usb host and easy to use software.
    It is an intrumentation interface.

    You need 100V protection, go design a board on top of Box0 and you have it!
    Box0 is modular, we didn’t want to push everything on one pcb.

    For beginners
    – getting starting
    – learning something
    – educational material friendly
    is a bigger and wider problem.
    btw, how much protection does Raspberry Pi or Arduino or Microbit comes with?

    We discovered that most of the activities can be explored at voltage below 5V.
    Therefore, we provided +5V, -5V, +3.3V power supply for user.
    Short circuit is generally a problem, so we provide seperate active current protection on all power supply.
    It cut of power supply in case current limit exceed. (and blink the appopriate led, user can re-enable power via software).
    We wanted user to plug Box0 into usb port and use it as a source of power supply and communication, making it portable and cost effective.

    Also, this is for learners in economically developing nation, NOT for Science/Engineering research facility.

    Optimizations factor:
    – Cost
    – Modularity
    – Board Space
    – Portable

    Thanks for you inputs, if you have more suggestions we will be happy to consider them. :)

    1. Kuldeep, sorry to break your bobble but without protection circuitry this is a microcontroller board not a lab tool. You proved it yourself by comparing it with an arduino and a raspoberry pi instead of a National Instruments board or even a Dataq DAQ… I’m sorry but i fail to understand how different this is to an arduino with Firmata or the very useful PyMCU, even though this little board hasn’t been updated for some time now, I’ve got two of them as core components in a test instrument and a physiology instrument prototype I built some time ago. Also, I don;t know where the “activities can be explored at voltage level under 5V” comes from… Most standard scientific equipment i use on any every day basis like amplifiers, microscope controllers, sensors etc either use analog voltages or 5V TTL. Have you used industrial control systems like 4-20nA or CAN? the voltages are from 12V to 24V and of course you have to account for overvoltage spikes etc and protect for at least 50V if not higher…
      If this little board was “marketed” as a development board with a bunch of libraries to support its “Firmata” type firmware and priced accordingly, it would be a big success!

      1. > You proved it yourself by comparing it with an arduino and a raspoberry pi instead
        > of a National Instruments board or even a Dataq DAQ
        see next comment.
        also, customer segment is different (though may overlap)

        > sorry to break your bobble but without protection circuitry this is a microcontroller board not a lab tool
        You want a beefy protection, attach one on top of it. (as i said in earlier comments).
        We are expecteding enduser in a “home” like enviroment.
        “protection circuitry” is relative term.

        > I’m sorry but i fail to understand how different this is to an arduino with Firmata or the very useful PyMCU,

        Some points:

        (Hardware/Board side)
        – use DMA to copy and send data (CPU mostly does sync task or sleep)
        – there is a USB vendor class specification (https://gitlab.com/madresistor/box0-usb-specs)
        (provide extendibility, hardware independence, multiple interface, inherit all usb benifits)
        – use USB directly for communication.
        * example: no serial2usb, so no serial related shit
        * better error handling
        * optimize for bandwidth via different endpoint as per requirement
        * not a single usb interface to do everything (common problem with serial2usb boards)
        – This is not a microcontroller + LDO + USB-connector!
        Box0 has Input and output buffer opamp’s. (the output opamp can source 20mA+ current easily)
        – To prevent charge injection, we have place fly wheel capacitor before the ADC.
        many people do not realize that there is a problem of charge injection in arduino and other boards.
        (low distortion C0G/NP0 type capacitor ceremic)

        (Software – computer side)
        – libbox0 (computer side library) is communication protocol independent (by design).
        though, currently USB is the only interface to communicate (via libusb-1.0).
        https://hackaday.io/project/11074-box0/log/36150-read-why-box0-is-by-design-and-implementation-is-powerful
        https://hackaday.io/project/11074-box0/log/36101-know-how-box0-i2c-spi-is-different
        https://hackaday.io/project/11074-box0/log/37264-lag-free-gpu-based-data-plotting
        we had to write a GPU library for plotting.
        many libraries are available that support GPU as one backend.
        but problem with those libraries is, they abstract GPU so much that, user could not effeciently use GPU.
        – data logging studio, with analysis features like fitting.
        – common instruments software on top of box0 modules
        * Oscilloscope
        * Function Generator
        * PWM Interface
        * Power supply control
        etc..

        there are some points, that may help you understand the difference.

        > Also, I don;t know where the “activities can be explored at voltage level under 5V” comes from…

        Task such as
        – Reading data from I2C/SPI sensors
        – reading analog sensors
        – controlling experiments
        – designing analog circuit

        > Most standard scientific equipment i use on any every day basis like amplifiers, microscope controllers,
        > sensors etc either use analog voltages or 5V TTL
        “Most standard scientific equipment” – did you just say `costly` “standard scientific equipment” ?
        “analog voltages” – it can be anything, not just high voltage. i do not know what voltage you are talking of.
        “5V TTL” – sorry if you are using old/industrial sensors.
        sensors are now a day 3.3V and are widely available and are low cost.
        most the 3.3V sensors are being made compatible by providing a 3.3V-5V bidrectional interface.
        go see sparkfun and adafruit products.

        btw, with the help of a resistive divider (or use PGA), you can extend box0 analog input voltage to anything.
        Anything preventing you from designing an extension customized for your usecase?

        >Have you used industrial control systems like 4-20nA or CAN?

        I would be more happy to *not* brag about our specialities.
        In current senario, as engineers we are optimizing for affordability, portability, accessibility, educational value.
        [typo] “4-20nA” should probebly be “4-20mA”.

        > the voltages are from 12V to 24V and
        > of course you have to account for overvoltage spikes etc and protect for at least 50V if not higher…

        Again, i would repeat! – we are making it for “home” enviroment.
        If you need it for industrial enviroment, make as rugged as you want and as much as voltage range you want!

        > If this little board was “marketed” as a development board with a bunch of libraries to
        > support its “Firmata” type firmware and priced accordingly, it would be a big success!

        box0 != Firmata, Please read the code & documentation and see hardware more deeply.
        you will realize the difference. (probably by now you have)

        and talk of economics and social factors:
        i have seen product that are sold at 2x price to non-US students. (by the same company and are close source)
        mostly affected are the economically developing nations learners.
        in India case, incur 60x (because 1USD = INR 60) [in Africa, this factor is much heigher]
        so a total of 120x (theoritcal – atleast have to pay if someone from India buy it).
        btw, i have not included shipment, handling, import duty and importing company charges.

        so, when someone compare with NI or DATAQ, they are not taking account into other factors. :)

    2. You contradict the scope of intended use in both the git repo and your website.The design is usable, not not suitable for stated purposes. And 12bits does not make a ‘precision’ measurement. ENOB for ADCs embedded in processor would probably be no better than 7 to10. And even if the embedded ADC was 16b, as internal digital noise issues of the IC can only be mitigated by severe over-sampling and statistical processing. The grouping of the descriptors ‘precision’ and ‘cost’ indicate a denial of physical reality. Do not believe that this is the best community of people to make an attempt at misleading. FWIW, have made an ARM4-based datalogger for use by our customers intended to operate in PV combiners while connected to 1500Vdc bus and can measure I & V with 18 significant bits (and other parameters), can withstand 8kV surges, and is rated for di-electric withstand test of 5000Vac.
      Now that’s a field-able lab tool .

      1. > You contradict the scope of intended use in both the git repo and your website.
        > The design is usable, not not suitable for stated purposes.

        I will Repeat!

        – Educational value
        – Learning
        – Getting starting
        – Exploration
        – Affordability
        – Accessibility

        > And 12bits does not make a ‘precision’ measurement. ENOB for ADCs embedded in processor would probably be no better than 7 to10.

        That is why we never marketed it as “‘precision’ measurement” instrument. (we have never made such a statement! – go find one! :)

        Our customers cannot afford those extra 8 bits if i put an 18bit data converter there.
        Will you like to pay for the extra bits? :p

        External precision data converters and signal conditioning parts are one of the most expensive piece of silicon out there.
        so we kept them optional, anyone who require better resolution and understand what they are doing are free to make there own extensions.
        btw, we have already added supported for external data converters (delta sigma) from TI and Microchip.

        “ENOB for ADCs embedded in processor would probably be no better than 7 to 10 bits” (sic) yes that is widely know. [generally, see below]
        (for readers: ENOB = Effective Number Of Bits)

        > And even if the embedded ADC was 16b, as internal digital noise issues of the IC can only
        > be mitigated by severe over-sampling and statistical processing.

        It all depends on requirement and specification (it all depends on the goal).
        Even if you use external data converters, there are issues.
        example:
        https://en.wikipedia.org/wiki/Johnson%E2%80%93Nyquist_noise
        – shielding from common mode noise
        – ground loops etc..

        also, over-sampling and statistical processing has their own limits.

        > And even if the embedded ADC was 16b, as internal digital noise issues of the IC

        btw, the generalization that embedded data converters are noisy is INCORRECT.
        You can find microcontroller from TI & ADI that has high resolution, onchip, specified properly in the datasheet
        BUT, they are expensive!
        When it comes to microcontrollers, most companies use low cost CMOS processes optimized for mass production of digital electronics.
        therefore the microcontroller manufactured using those processes have analog peripherals which affect the quality of onchip analog peripherals.
        Also, companies have a habit of not specifying the characteristics of these peripherals because testing and characteristics is expensive.
        But, that does not mean that the are useless. It all depends on requirement.

        > The grouping of the descriptors ‘precision’ and ‘cost’ indicate a denial of physical reality.
        > Do not believe that this is the best community of people to make an attempt at misleading.

        “precision” is relative! and has non-linear relation with Cost (usually exponential).

        Btw, it is not just about the accuracy&precision&resolution of the instrument but the whole setup.
        for example: someone can use the 32bit data converter from TI and with a crappy pcb design can make it work but will it still be 32bit?

        We are sad that you said “make an attempt at misleading”.
        Which statement is misleading?!&%#
        We have released the design under FLOSS license. Anyone can verify the claims, nothing is hidden.
        Im sorry if you did not do any research before posting.

        > FWIW, have made an ARM4-based datalogger for use by our customers intended to operate in PV combiners while connected to
        > 1500Vdc bus and can measure I & V with 18 significant bits (and other parameters), can withstand 8kV surges, and is rated for
        > di-electric withstand test of 5000Vac. Now that’s a field-able lab tool .

        You didn’t disclose the price? (how many significant figures were there in price? :p)
        Your customer paying capacity?
        Good to read that you can design such stuff.
        – So when are you going to release it under Free/open-source license?
        – and the characterization data?
        – and the documentation?
        So, that we and other can reuse, learn, contribute back to the project. :)

    1. Yes!
      You can directly collect data from sensor without writing any code. alot of sensors are already supported.
      Comes with superb visualization capabilities.
      and perform data analysis to extract information from data (like curve fitting, Fourier transform).
      example: http://imgur.com/DVpr00G
      The software uses libreplot [OpenGL based plotting library which i wrote] and can handle large dataset without lag.

      Or write custom python code to collect data from sensor.
      lots of code/stuff here: http://madresistor.org/box0/learn/

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.