Close
0%
0%

Box0

Free and open source tool for exploring science and electronics anytime anywhere

Similar projects worth following
Box0 is a Free/Open Source Data Acquisiton platform.
All software (GUI, libraries) and hardware is ready.
Soft start for beginner while being flexibility for advance users.

Note: We have a few assembled boards for beta testers, lets us know if you want to participate. :)
Read more on https://www.madresistor.com/box0


The problem

The current model of scientific and technical education focuses more on preparing students to copy classroom notes and undergo theoretical exams rather than actually doing science and learning about the process in a manner similar to practicing scientist or engineer.

The laboratory is seen as a less important component and the list of so called standard experiments have documented outcomes and use ready made setup for the sake of "convenience" and compensating for shortage of time that occurs due to exam preparation.

This negatively affects the shaping of students as scientific thinkers, takes out the joy of learning from science education and creates a negative perception of the field being rather dry and boring.

we decided to solve the problem by designing a personalized and affordable educational platform for aspiring scientists and engineers that supports independent learning, freedom to learn anytime anywhere and enables multidisciplinary and open ended explorations.


Box0

Started with the idea of providing learners educational resources and tools that gives the freedom to discover science, technology and electronics by doing and sharing knowledge with others.

As students, we wanted to have something that is affordable and help us learn not only in classrooms and restricted labs but anytime anywhere and can be used with a variety of open coursewares.

Box0 helps you learn about electronics and computers and how these are useful for studying physical, biological, chemical or some other phenomena.



Learn by doing

Learning should be active, playful and enjoyable.

With Box0 you can create, learn concepts by doing experiments and make interesting projects.


Your lab in a Bag

Box0 give you the Freedom to learn anytime anywhere.

Learning can happen anywhere, be it classroom, labs or park.

Let your creativity and curiosity come outside.


Not just a tool for electronics

Box0 is a tool for bridging the physical world with digital.

Its not limited to just electronics, you can equally learn physics, chemistry, biomedical.

You can use Box0 for citizen citizen science or for your DIY lab experiments, with MOOC and open source tutorials.


Beginner friendly

Box0 comes with multifunction, free and ready to use software GUI.

You can use setup experiments using software instruments in minutes.

We have included everything you need to start.


Box0 is Extendable

You can program Box0 for custom applications. For example you can build your own low cost instruments.

Box0 works out the box with Jupyter notebook which can be used to Interface, control, visualise easily.


Software

  • Box0 Studio (Qt) - Common Instruments GUI
    • Oscilloscope
    • Function Generator
    • PWM Generator
    • Digital I/O
    • Voltmeter
    • Power Supply
  • Box0 Studio (Android) - Box0 Studio for Android
  • LiaB Studio (Qt) - Data Logging Software
    • Capture and store in table
    • Visualize Table Data
    • Import/Export Data
  • LiaB Studio (Android) - LiaB Studio for Android
  • libbox0 - Communication library
    • All Hardware communication via libusb
    • Driver for Precision ADC, DAC
  • pyBox0 - Python binding for libbox0
  • Box0.jl - Julia binding for libbox0
  • jBox0 - Java/Android binding for libbox0
  • node-box0 - NodeJS binding for libbox0
  • box0-utils - Shell utilities for Box0
    • b0i2c - Interactive BusPirate like shell
    • b0ain2csv - Capture and store signal to disk
    • b0aout - Generate signal from shell
    • b0v5power - control different power section
    • b0pwm - Generate PWM signal
  • libreplot - C Plotting library for GPU/OpenGL


Hardware

All source code, hardware design are released under a Free/Open Source software, hardware licence.


Logs

Read more »

  • 1 × STM32F072 Microcontroller / ARM
  • 2 × TLV274 Amplifier and Linear ICs / Operational Amplifiers
  • 1 × TLV272 Amplifier and Linear ICs / Operational Amplifiers
  • 1 × LM2776 Bulk/Boost or Inverting Charge Pump
  • 3 × RT9728A Interface and IO ICs / Peripheral Drivers and Actuators

View all 36 components

  • FFT and Box0

    Kuldeep Singh Dhaka02/10/2017 at 21:26 0 comments

    What is FFT?

    Wikipedia says (Fast Fourier transform):

    A fast Fourier transform (FFT) algorithm computes the discrete Fourier transform (DFT) of a sequence, or its inverse.
    

    Im not going to bombard you with mathematical details (its for another day ;).
    What we are today going to do is, capture some real electrical signal with Box0 and visualize it.

    There are alot number of education video on Fourier transform on the Internet (example: Youtube).

    So, here are some plot that i captured with the code i wrote (code at the end of page).

    Sine wave (15.6 KHz)



    Square wave (15.6 Khz)

    Saw tooth wave (15.6 Khz)

    Triangular wave (15.6 KHz)

    Python Code

    import box0
    import numpy as np
    import matplotlib.pyplot as plt
    import scipy.fftpack
    
    ##### PART 1 - Capture
    
    # Allocate resources
    dev = box0.usb.open_supported()
    ain0 = dev.ain()
    
    # Prepare AIN0 for snapshot mode
    ain0.snapshot_prepare()
    
    # Read data from AIN0
    bitsize, sampling_freq = ain0.bitsize_speed_get()
    data = np.empty(1000, dtype=np.float32)
    ain0.snapshot_start(data)
    
    # Free the resources
    ain0.close()
    dev.close()
    
    ##### PART 2 - Process
    
    # perform FFT on captured data
    fft_amp = np.abs(scipy.fftpack.fft(data))
    fft_freq =  np.linspace(0, sampling_freq, len(fft_amp))
    
    ##### PART 3 - Visualize
    fig, ax = plt.subplots()
    
    # Show the time domain results (unable to show both plot at once - fix later!...never ;)
    #time_x = np.linspace(0, len(data) / sampling_freq, len(data))
    #ax.plot(time_x, data)
    
    # Show the frequency domain results
    ax.plot(fft_freq, fft_amp)
    
    plt.show()
    

    Julia Code

    import Box0
    import Gadfly
    
    ##### PART 1 - Capture
    
    # Allocate resources
    dev = Box0.Usb.open_supported()
    ain0 = Box0.ain(dev)
    
    # Prepare AIN0 for snapshot mode
    Box0.snapshot_prepare(ain0)
    
    # Read data from AIN0
    bitsize, sampling_freq = Box0.bitsize_speed_get(ain0)
    data = Array(Float32, 1000)
    Box0.snapshot_start(ain0, data)
    
    # Free the resources
    Box0.close(ain0)
    Box0.close(dev)
    
    ##### PART 2 - Process
    
    # perform FFT on captured data
    fft_amp = abs(fft(data))
    fft_freq =  linspace(0, sampling_freq, length(fft_amp))
    
    ##### PART 3 - Visualize
    
    # Show the time domain results (unable to show both plot at once - fix later!...never ;)
    #time_x = linspace(0, length(data) / sampling_freq, length(data))
    #Gadfly.plot(x=time_x, y=data, Gadfly.Geom.line)
    
    # Show the frequency domain results
    Gadfly.plot(x=fft_freq, y=fft_amp, Gadfly.Geom.line)
    

    Note: Though you see – the time domain signal is ideal (mathamatically),
    the noise from enviroment and inherit limitation of the signal generator and analog input,
    the readed signal is not same as the ideal one.
    So it will have minor difference from the “ideal” (mathamatically expected) plot.

    Note: The graphs show data above sampling frequency ÷ 2.
    You will see: symmetry (called “folding”) around the Nyquist frequency.
    Read more on this Wikipedia article

    Note: Examples were run in Jupyter Notebook

    Note: You can use Box0 – Box0 Studio (Function generator) to generate signal with easy to use GUI.

    Hope you like the nerdy post!

    Originally posted on https://madresistor.com/blog/fft-and-box0/

  • Hacking wall clock with Box0

    Kuldeep Singh Dhaka01/25/2017 at 19:15 0 comments

    A few days ago, i found a wall clock thrown in garbage (while i was looking for one of the community dog puppy :).

    From past experience, i was sure that the internal mechanism is still functional.
    (people usually throw clocks due to the broken glass or old body).

    I salvaged the electro-mechanical mechanism from the garbage and cleaned it up.
    After inserting an AA battery, it started its usual sound: tik, tik, tik….

    So, i just kept it on the shelf.
    then a idea struck to my mind! Why don’t i take it apart (which i would have later anyway), and drive the motor with Box0!

    So first, i removed all the gear mechanism and made it to minimal so that the motor can work.
    Now, the motor is functional, i soldered two wires to the coil solder pad (coming out of the IC underneath epoxy).

    Attached the wires to Box0 (AIN0.CH0 and GND pins) and started Box0 Studio – Oscilloscope to see the driving signal.

    The signal is pretty simple (see video):

    1. generates a 32ms pulse with around +1.4V.
    2. wait 1 second (from the start of the pulse)
    3. generates a 32ms pulse with -1.4V
    4. wait 1 second (from the start of the pulse)
    5. goto “1”

    Easy peasy, i can generate that signal with AOUT0 (Analog OUT module of Box0).

    Now, with an idea about the signal, i completly removed the driver circuit.

    And attached two wires to the coil copper wire, and connect them to Box0 (AOUT0.CH0 and GND).

    I glued the wire to body with glue gun so that copper wire don’t break.

    Now, i wrote a little Python script, and it started working as expected!

    Now, with able to drive the motor with Box0, i can start abusing it ;)

    import box0
    import numpy as np
    
    # python2 raw_input and python3 input
    try: input = raw_input
    except: pass
    
    # 10ms, 25ms (Demo 3 - Fastest)
    signal = np.empty(50)
    signal[:] = 0
    signal[15:25] = 1.5
    signal[40:50] = -1.5
    
    SPEED = 1000
    BITSIZE = 12
    CHAN = 0
    
    # Get resources
    dev = box0.usb.open_supported()
    aout = dev.aout()
    
    # output signal
    aout.snapshot_prepare()
    aout.bitsize_speed_set(BITSIZE, SPEED)
    aout.chan_seq_set([CHAN])
    aout.snapshot_start(signal)
    
    input("Press any key to exit")
    
    # deallocate resources
    aout.snapshot_stop()
    del aout
    del dev
    

    So, i made multiple similar looking waveform, and i was able to control motor speed.

    # 32ms, 1000ms (Demo 1 - Original)
    #~ signal = np.empty(2000)
    #~ signal[:] = 0
    #~ signal[968:999] = 1.5
    #~ signal[1968:1999] = -1.5
    
    # 32ms, 500ms
    #~ signal = np.empty(2000)
    #~ signal[:] = 0
    #~ signal[468:500] = 1.5
    #~ signal[968:1000] = -1.5
    #~ signal[1468:1500] = 1.5
    #~ signal[1968:2000] = -1.5
    
    # 20ms, 100ms (Demo 2)
    #~ signal = np.empty(200)
    #~ signal[:] = 0
    #~ signal[80:100] = 1.5
    #~ signal[180:200] = -1.5
    
    # 20ms, 50ms
    #~ signal = np.empty(100)
    #~ signal[:] = 0
    #~ signal[30:50] = 1.5
    #~ signal[80:100] = -1.5
    
    # 10ms, 25ms (Demo 3 - Fastest)
    signal = np.empty(50)
    signal[:] = 0
    signal[15:25] = 1.5
    signal[40:50] = -1.5
    

    Here you have!

    1. a seamingly useless little clock motor get to see another day!
    2. I found the puppy.:)

    Btw,
    Before actually driving the motor with AOUT0.CH0, i connected AOUT0.CH0 -> AIN0.CH0 pin, and checked if im not generating a faulty signal.
    Thanks to the modular architecture of Box0, i was able to run AOUT0 module with Python code and AIN0 with Box0 Studio – Oscilloscope.

    Note: All above code under GPLv3+

    Originally posted on: https://madresistor.com/blog/hacking-wall-clock-box0/

  • Beta testing update!

    Sandeep Kumar01/20/2017 at 15:18 0 comments


    Last week we announced Box0 beta testing on Hackaday and assembled a few boards for the same.

    We are looking for awesome people who are interested in making some projects or perform experiment/activity with Box0 and document them.

    The software is working nicely on GNU/Linux and has been tested with Arch and Ubuntu though things are a bit sluggish on Microsoft Windows 10.

    Its not a hard core requirement but initally we are mostly looking for people who are comfortable with using GNU/Linux and also understand a
    bit of programming, electronics and compiling source code. Even if you are a beginner but still interested then we are there to help you :)
    You can use Ubuntu as your OS which is considered friendly for beginners.

    All your contributions in form of tutorials, schematics, code and other material will be completely attributed to you.
    We just want community work to be available under free/libre/open-source licence for others.

    We are also sending a 1.5 Farad super capacitors to all the beta testers as a new years gift so they can try some weird stuff with them :}

    If you would like to know anything more come over and say hi on #madresistor at IRC Freenode or drop us an e-mail at contact@madresistor.com.


    Originally posted on: https://madresistor.com/blog/box0-beta-testing/

  • High voltage analog IO for Box0

    Kuldeep Singh Dhaka01/12/2017 at 12:34 0 comments

    Surprise! We have something to show you :)

    Recently, [Ferix] (one of our beta tester) shared hardware design of Box0 shield on his github Repository.

    [Ferix] writes:

    A breakout board for the Box0 so the Box0 is able to handle higher analog voltages With this it can handle -33 to +33V on the input and output -33V to +33V as well.
    
    The hardware is simple, 2 switching power supplies to boost the 5V in to +-33V, possible +-35V After that 2 +-50V 50mA output capable opamps with a gain of 10 and a divide by 10 voltage devider so the analog inputs can handle +-33V as well
    
    An USB port is added to supply the board with 5V as the 5V pin of the Box0 is unable to deliver enough current. A small example:
    
    10mA at 35V means that, at 100% efficiency, 70mA is needed at 5V, in practise this figure is closer to 90mA With 2 opamps being capable of delivering 50mA a total of 100mA at 35V is required, meaning 900mA at 5V as input.
    
    Current limit is implemented by using a 1A polyfuse, minimal but better then nothing.
    

    His design is lm2733 for generating +33V and -33V for Analog out OpAmp’s.
    And using voltage divider for analog in.

    He is using an USB micro for more power.

    [Ferix] has used KiCAD (Free/Open source PCB designing software) for designing his PCB.

    What is on your mind?
    You can install KiCAD, download Ferix repo, tweak the design for your needs, get it manufactured and do something wonderful – let us know what you did :)
    You will also need a Box0 for using [Ferix] shield, for which you can sign up for the crowdfunding campign or get a beta tester board by contacting us at contact@madresistor.com.

    We will write a follow up post when [Ferix] get the design into reality and share what he is upto!

    Originally posted on: https://madresistor.com/blog/high-voltage-analog-box0/

  • Arch AUR packages for Box0!

    Kuldeep Singh Dhaka01/08/2017 at 01:44 0 comments

    Looking for Arch GNU/Linux package for Box0?
    See: Arch AUR package list

    You can install the packages using AUR package installer like, pacaur.

    $ pacaur -S libbox0-git lmfit-git libreplot-git
     $ pacaur -S box0-studio-qt-git liab-studio-qt-git box0-utils-git
    

    Note: The two command need to execute in the order as above.

  • Box0 - 3D printed enclosure (prototype)

    Kuldeep Singh Dhaka09/30/2016 at 07:21 0 comments

    In the second run, we will improve the design and

    will be commit the design files to box0-v5 repo. stay tuned!

    Made using OpenSCAD.

    Thanks to folks at Meerut Maker Space!

  • PCB (& 3D) ride!

    Kuldeep Singh Dhaka09/21/2016 at 00:55 0 comments

    3D Top - with components

    3D Top - with components (computer generated)

    3D Top - without components

    3D Top - without components (computer generated)

    3D Back - with components (computer generated)

    Filled Top

    Filled Top

    Filled Back

    Filled Back

    Unfilled Top

    Unfilled Top

    Unfilled Back

    Unfilled Back

    You get the KiCad files from git repo here.

    2 Layer design, while designing, it was a goose chase to get the right position and connection!

    In the charge pump (-5V from +5V) block [and other power management block]:

    Special care have been taken to reduce the loop (high current path). by using Via and minimal cut in ground plain.

    To make the connector even more stronger, we placed copper under it.

    So that the connector can get even more strength from the solder.

  • Schematic ride!

    Kuldeep Singh Dhaka09/20/2016 at 20:01 0 comments

    Click on image for higher resolution.

    (For complete schematic in PDF click here)


    The first sheet contains a high level overview of the schematics.
    The design has been divided into different subsystems which interact with each other in an abstract manner.The schematic for these subsystems has been put in their respective sheets.This helps to reduce the clutter, provides better design management, ease of readability and usability.

    We will explain a bit about different subsystems one by one to help you get an idea.

    Sheet: uC

    This block mainly does the following

    • Communication (USB, SPI, I2C...)
    • Control and coordination of power management ICs
    • ADC input and DAC output.
    • Digital input and output


    Top Left: The microcontroller STM32F072 - ARM Cortex M0.

    • USB FS (12Mbit)
    • ADC 1MSPS, 12 bit
    • DAC 1MSPS, 12 bit
    • DMA 7 channel
    • I2C upto 400Khz
    • SPI upto 36MHz
    • CAN
    • Alot more, see full specification.


    Top Right
    : Proper power supply decoupling and bypassing capacitors for analog and digital parts of microcontroller as per recommendations in datasheet.

    Top Right extreme corner: if you noticed there is a schottky diode BAT54SW connected between VDDA and VDD of the uC to make sure the potential difference between both the pins remains within safe limit (mainly during startup when power supplies are from different sources, fro e.g when the optional voltage reference for VDDA is used on Box0)

    Bottom Left: These are led for activity, power, power-fault indication.

    Middle Right: Various pins of microcontroller connected/named/converted according to Box0 pins specification.

    Bottom Middle: The list of DMA channel, Timers used for which task and which peripherial pins are being used for what purpose.

    At bottom and right to the led is the crystal oscillator for a clean and stable (10-30 PPM)clock signal to the microcontroller.This works well for our requirements.Though the microcontroller has a RC oscillator built-in but it is no match for a good crystal.


    Sheet: Internal power

    Box0 consist dedicated power supplies for internal and external use.

    The internal power supply sheet consist of power managements parts to power the board components only (includes microcontroller).

    The power supply automatically turns itself off in case of short circuit or if the current limit exceeds above a certain programmed level.

    Top box: RT9728 for active current limit on power coming from USB (in case something bad goes on the board).

    Middle box: a 3.3V regulator

    Bottom box: a 3.3V [optional] precision reference.

    If the precision reference is not populated, it can be connected to the above 3.3V voltage regulator.

    The (virtual) power output from this sheet is not provided to user (ie external use).

    (except - precision reference which can be used for external use too via "VREF" pin which at the output of which a resistance is placed to limit the currents to safe level during accidental shorts circuits by the user)


    Sheet: Extra

    The USB connector, debug pin (SWD) and the BOOT0 (for DFU) button.

    Special story for BOOT0 button:

    If you are familiar with BadUSB which has also been documented by hackaday here (which @Kuldeep Singh Dhaka tipped off ;).

    In order to prevent BadUSB, the BOOT0 button is placed.

    When user press the button, the device boot from ROM (proprietary* code by ST).

    When it boot from ROM it comes up as a DFU device (USB DFU class - Device Firmware Update).

    Only the firmware can be updated when the user want to. There is no possibility of automatic firmware update which do not fullfill the BadUSB requirement.

    and btw, if someone can flash malice code to your device, they can do more nasty things.

    * = though the ROM is proprietary, just trade-off.

    In future we can implement the functionality via flash code.

    Also, we can even start a full-fledged project that allow [same flashing api, multiple vendor support] for ARM microcontroller - something like UBOOT for microcontroller ;).
    future is bright, lets see!


    Sheet: Power

    Having onboard short circuit protected and commonly used 3.3V , +5V, -5V is a very helpful for the user...

    Read more »

  • MCP3421-low cost 18 bits delta sigma ADC

    Sandeep Kumar07/10/2016 at 18:19 0 comments

  • Millo - Proto board type II for DIY projects

    Sandeep Kumar07/10/2016 at 18:11 0 comments


    The board is an outcome of "Box0 intrument interface" + "Perf+"

    (the vertical-track[on-front] / horizontal-track[on-back] between drill is of Perf+)

    You can read more on Perf+ here http://hackaday.com/2016/06/16/evaluating-the-unusual-and-innovative-perf-protoboard/

View all 23 project logs

  • 1
    Step 1

    Building the hardware:

    1. Clone the following repository box0-v5-hardware.
    2. Send the box0-v5-hardware/manuf/ files for manufacturing.
    3. Buy the components as given in BOM (or hackaday page) box0-v5-hardware/box0.csv
    4. Populate the components.
    5. Clone the following repository box0-v5-firmware
    6. Flash the firmware (via DFU - see README) as given in box0-v5-firmware/extra/dfu-script
    7. At this point, after re-plugging, the blue LED should come up
  • 2
    Step 2

    Building libbox0 (cmake build system)

    1. Clone the repository libbox0
    2. see README and install all required dependencies
    3. goto the root of the repository.
    4. `$mkdir build` - make a directory to keep build files.
    5. `$cd build` - enter in build directory
    6. `$cmake ..` - tell cmake that build files are in parent directory and prepare for build
    7. `$make` - build libbox0. (you can use `make -j4` to speed up. the 4 signify the number of processor to use. warn: it can hang while building.
    8. `$make install` - install the binary and header

    You can install the binaries and header to non-standard location but require advanced steps. (only simple for now)

  • 3
    Step 3

    Building libreplot (cmake build system)

    1. Clone the repository libreplot
    2. see README and install all required dependencies
    3. goto the root of the repository.
    4. `$mkdir build` - make a directory to keep build files.
    5. `$cd build` - enter in build directory
    6. `$cmake ..` - tell cmake that build files are in parent directory and prepare for build
    7. `$make` - build libbox0. (you can use `make -j4` to speed up. the 4 signify the number of processor to use. warn: it can hang while building.
    8. `$make install` - install the binary and header

    You can install the binaries and header to non-standard location but require advanced steps. (only simple for now)

View all 7 instructions

Enjoy this project?

Share

Discussions

Kaspar Emanuel wrote 02/10/2018 at 21:54 point

Hi Sandeep, are assembled box0s available to buy? I tried messaging you on the kitspace IRC but you seem to have fallen off that.

  Are you sure? yes | no

Nathan Gaul wrote 01/08/2017 at 00:50 point

First of all, great project! I have been making a BOM on digikey for all the parts and I am not able to find a push button switch that fits the footprint from Mouser or Digikey. I'm hoping to make my own but this one part is holding me up. Could you inform me on which push button part you used? Thanks!

  Are you sure? yes | no

Hans Meier wrote 09/19/2016 at 11:23 point

Seems really interesting - thx for the pm! I'll work on a project in the near future where this might be suitable for! Keep on going ;)

cheers!

  Are you sure? yes | no

Sandeep Kumar wrote 10/14/2016 at 21:58 point

Cool!
Do watch the video :)

  Are you sure? yes | no

Pranshu Malik wrote 07/31/2016 at 14:44 point

Really awesome work. Can't wait to get my own Box0 !

  Are you sure? yes | no

Sandeep Kumar wrote 08/03/2016 at 18:40 point

\o/
Thanks Pranhsu.
Box0 has been selected for exhibiting at Delhi Mini Maker Fair going to be Held on this Saturday( 6th aug).
See you there :)

  Are you sure? yes | no

Phil Hazur wrote 07/13/2016 at 14:57 point

Hi Sandeep, it looks like you all are doing a very good job on your project. I hope that is is successful. Anything that benefits STEM, benefits us all.

Best of luck,

Phil Hazur

  Are you sure? yes | no

Sandeep Kumar wrote 08/03/2016 at 18:33 point

Hi Phil
Thanks For those nice words :)
We are actually a small not-for-profit organization From India.http://madresistor.org/
Box0 is a first in series of projects, we hope to come with many other open source tools.This is our way to give something back to the open source community we have learned so much from.

Sandeep Kumar

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

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