Close
0%
0%

BrainBox

An Experiment in Hardware AI

Similar projects worth following
BrainBox is the answer to the age old question, "What's in the box?!"

I'm back again with another project! If you know me you know I love to do these 24hr and 48hr challenges where I design something within that period of time. A couple examples are

PICxie, completed in 36hrs (https://hackaday.io/project/5702-picxie)
Erzielboard, completed in 29hrs (https://hackaday.io/project/5833-erzielboard)

It's been a couple years since I posted any projects so I figured I'd do one this weekend and in less than 24 hours created BrainBox!

What is BrainBox?

The short version is, BrainBox is PICxie on high powered steroids. The long version?

BrainBox is an ARM Cortex-M4 Development package with a Kinetis MK02FN128VLH10-ND processor running at 100MHz. It has a 1.8" color TFT display, 64Mb of onboard DRAM; a inertial measurement unit consisting of a 6-axis accelerometer, gyroscope and magnetometer/compass. A microphone and temperature sensor round out the package.

Honestly we could add more, we actually planned to have an onboard speaker and ambient light sensor but didn't want to push our luck with the price point. Currently for a prototype BrainBox it's ~$45. With demand this could be pushed less than $20!

Why did you create BrainBox?

A few weeks ago I created a neat little recurrent neural network simulation

This network has a lot of interesting features that surprised me. There are several "wave-like" components visible if you plot the average activity of the network. Because of the similarities to real brain waves, I wanted to feed real environmental data into the network. My computer seemed like a poor choice because while I could feed audio and video data into the network easily enough I couldn't tell it anything else about it's environment. I wanted to give a body to the brain, I needed to create some hardware and BrainBox was born!

Why choose an ARM Cortex-M4 over a PIC32?

I've been using Microchip PIC microcontrollers for over 15 years now. They are very powerful devices, but the fastest PIC is PIC32MZ series which can run at 250MHz, BUT since all PIC microcontrollers have their clock internally divided by 4 (FOSC/4) the instructions are actually being processed at .25x or 62.5MHz (unless I'm mistaken, please correct me if I'm wrong).

EDIT: As pointed out by ctnptr in the comments

PIC 14bit cores, yes the OSC Clock is divided by 4
24bit cores clock is divided by 2.
32 bit PICs (aka MIPS Core) are divided by 1.
"MIPS32 120 MHz/150 DMIPS"
"PIC32MZ 252 Mhz / 415 DMIPS Performance
DMIPS is that you may compared but mixed DMIPS with FOSC somehow ?
So i doubt a PIC32MX or PIC32MZ is running that slower than a ARM at same Clock.

So it seems that the PIC32MZ would indeed have been a valid selection. When I was making Muribot a lot of people were complaining about the fact I was using a PIC over ARM and it seems that in reality the similarities between the two are greater than a simple glance would suggest.

Why aren't you using a bootloader?

Honestly I thought about it, but having the JTAG/SWD interface exposed makes it easier to debug and allows you to use all the memory. The cost of a good JTAG programmer isn't much more than the PICKit and far less expensive than Microchips ICD3.

BrainBox Digikey BOM.csv

A importable BOM for Digikey, my preferred electronics part supplier.

Comma-Separated Values - 4.32 kB - 04/25/2017 at 03:34

Download

  • 1 × MK02FN128VLH10 Kinetis K02 ARM Cortex-M4 Processor
  • 1 × S27KL0641DABHI020 64Mbit DRAM Memory
  • 1 × DT018ATFT 1.8" 128x160 color TFT display
  • 1 × INMP510ACEZ-R7 5Hz-20kHz MEMS Microphone
  • 1 × LSM6DS3TR 6-axis MEMS Accelerometer and Gyroscope

View all 8 components

  • Cleanup Finished

    Crypto [Neo]04/25/2017 at 03:47 0 comments

    I finished cleaning up the part designations on the printed circuit board.

    I also finished the Bill-of-Materials and the cost of everything for a one-off production run is ~$40 using Elecrow as the board manufacturer and Digikey as the components supplier. There is also a cost of $70 for the educational version of the Segger J-Link from the Adafruit website. This has been added to the files section.

    Is there anything you'd like to see added to the design? Let me know in the comments!! I'd love to hear your thoughts.

View project log

Enjoy this project?

Share

Discussions

Crypto [Neo] wrote 04/25/2017 at 22:45 point

Ah! Good information, it was late and admittingly I didn't feel like looking up the datasheets to check and verify. When I get a chance I'll update above! Thanks!

  Are you sure? yes | no

ctnptr wrote 04/25/2017 at 19:10 point

Hello 

>BUT since all PIC microcontrollers have their clock internally divided by 4 (FOSC/4) the instructions are actually being processed at .25x or 62.5MHz (unless I'm mistaken, please correct me if I'm wrong).

"all PIC microcontrollers" ? really ?

this seems horrible wrong!

PIC 14bit cores, yes the OSC Clock is divided by 4

24bit cores clock is divided by 2.

32 bit PICs (aka MIPS Core) are divided by 1.

"MIPS32   120 MHz/150 DMIPS"

"PIC32MZ 252 Mhz / 415 DMIPS Performance

DMIPS is that you may compared but  mixed DMIPS  with FOSC somehow ?

So i doubt a PIC32MX or PIC32MZ is running that slower than a ARM at same Clock.

;-)

  Are you sure? yes | no

Crypto [Neo] wrote 04/26/2017 at 05:30 point

Hey thanks! I didn't have time to take a look last night so I appricieate the clarification :D

  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