Arduino Sensor Training Board

Tell us about your projects. Update us regularly.
Post Reply
parkview
Guru Maker
Posts: 603
Joined: Tue Jun 24, 2014 8:25 pm
Location: Busselton
Contact:

Arduino Sensor Training Board

Post by parkview » Sat Oct 31, 2020 12:09 pm

One day I might want to do some public Arduino training and I think it would be handy to have all the sensors I want to talk about on one handy PCB. This will help in packing and transportation and in losing a sensor or two here and there.

I am really enjoying the ESP32-WROOM MCU at the moment. It's currently at a nice price or around A$3.40. This is the plain little package, not a ESP32 Development Board. So I have based my Arduino Sensor Training Board around this micro controller. It's nice and fast and comes with wireless network interface built in.

The current list of sensors one the first beta version of the PCB are:
1) Accelerometer/Gyro - 6DoF
2) LUX light
3) MEMS i2S Microphone
4) i2S Speaker amplifier output
5) Dual DC Motor output
6) Pizeo Buzzer
7) 4 x User LEDs
8) 2 x User button switches
9) 2 x User Slide switches
10) 2 x Touch Pads
11) Air Temperature/Pressure/Humidity
12) Variable resistor
13) Hall effect sensor (built into ESP32)
14) 3 x WS2812B/Neopixel RGB LEDs
15) 5V Servo output
16) Sharp Infra-red Distance Sensor
17) OLED screen - 128px by 64px
18) A 16 pin breadboard expansion header plug

The sensor training board is 10cm x 10cm in size and is designed to fit onto a laser cut MDF base board. This will allow other larger components like the breadboard, loud speaker, servo to be mounted around the red PCB. Something like this:
PCB-Breadboard-layout.jpg
PCB-Breadboard-layout.jpg (9.03 KiB) Viewed 5316 times
The front side of the PCB will look something like this:
Arduino Sensor Training Board 3D layout - front.jpg
Arduino Sensor Training Board 3D layout - front.jpg (102.7 KiB) Viewed 5316 times
And the backside of the PCB looks like this:
Arduino Sensor Training Board 3D layout - back.jpg
Arduino Sensor Training Board 3D layout - back.jpg (71.7 KiB) Viewed 5316 times

parkview
Guru Maker
Posts: 603
Joined: Tue Jun 24, 2014 8:25 pm
Location: Busselton
Contact:

Re: Arduino Sensor Training Board

Post by parkview » Sun Jan 10, 2021 9:29 am

The PCB arrived a month or so ago. I used my hotplate to assemble components onto the PCB. There are a few IC footprint errors, but the rest looks ok. Next up is software. I have been busy writing Arduino based software functions to test out each of the sections and IC's on the PCB. I first used the i2c-scanner software to enumerate all the i2c addresses of the IC's around the board.
Arduino-Sensor-Board_V0.5_sml.jpg
Arduino-Sensor-Board_V0.5_sml.jpg (82.06 KiB) Viewed 5215 times
I might even have a go at writing my first Arduino library for the DRV8847 motor driver IC, as there isn't much software out there for it. Then it will be time to spin out a new beta version of the PCB. I see that there is a new MCU, the ESP32-S3 IC coming out later this year. Might have a look at using that IC for the final version of the board.

parkview
Guru Maker
Posts: 603
Joined: Tue Jun 24, 2014 8:25 pm
Location: Busselton
Contact:

Re: Arduino Sensor Training Board

Post by parkview » Sat Jan 23, 2021 8:38 am

I designed up a simple breadboard expansion header socket. I have some 16pin ribbon cables that will connect the breadboard to the Arduino Sensor board:
Arduino Header Extension_sml.jpg
Arduino Header Extension_sml.jpg (48.59 KiB) Viewed 5186 times

parkview
Guru Maker
Posts: 603
Joined: Tue Jun 24, 2014 8:25 pm
Location: Busselton
Contact:

Re: Arduino Sensor Training Board

Post by parkview » Sat Feb 20, 2021 8:32 pm

A new updated set of KiCAD Gerber files have been sent off to JLCPCB for manufacture. This will be version 0.7 and be manufactured with a blue solder mask. I find it's handy to have a different colour for each version as it quickly differentiates the few PCB versions you might have lying around on a desk.

Over the intervening months, I have written some Arduino code to test each function of the Arduino Sensor Board. I find this gives me time to thoroughly explore the project and out of the process, I have a list of changes for the next PCB version.

There are lots of tweaks, but the main ones being: corrected a few IC footprints, replaced the i2C DRV8847 motor driver IC (doesn't allow PWM of the motor), with two i2C driven DRV8830 IC's. added a larger finger-able potentiometer, changed some connectors with larger, more robust kind, moved the touch pads over the right a bit, changed the slide switches over to a DIP switch package and added more GPIO and pin data to the back of the PCB.

The next PCB will look something like this:
ArduinoSensorBoardV0.7.jpg
ArduinoSensorBoardV0.7.jpg (84.38 KiB) Viewed 5069 times

parkview
Guru Maker
Posts: 603
Joined: Tue Jun 24, 2014 8:25 pm
Location: Busselton
Contact:

Re: Arduino Sensor Training Board

Post by parkview » Sun Jan 09, 2022 12:09 pm

The version 0.7 blue PCB arrived earlier last year. It's been sitting around waiting for me to assemble it, which I did near the end of the year. After fixing the obvious solder shorts etc, it powered up ok, but for some reason i2C just wouldn't function. By that I mean there was zero clk and data waveforms. The first thing I did was to measure the resistance to GND and Vcc and to each other: SCL-SDA. These where all fine. After a couple of bouts of testing I found that if I isolated the boards i2C in half (cutting the i2C tracks), one half worked, so it didn't take long to isolate it down to the MPU-6050 GND pin not being connected properly. That was a first.

The assembled Arduino Sensor Training Board (ASTB):
ASTB-V0.7_sml.jpg
ASTB-V0.7_sml.jpg (90.56 KiB) Viewed 4309 times
Next up was testing each of the sensors to check that they all worked ok. I spent a LOT of time on the MPU-6050 (acceleromoter/gyro) and MCP23017 (i2C digital I/O expander). I presumed there was a hardware issue with them, but it turned out to be a software setup issue. It's handy to have the user LEDs and button switches working now.

Yesterday I spent most of the day trying to get the MX98357 i2S audio amplifier working. I couldn't even get the huge ESP8266Audio library to compile. This has always been an issue with me. Luckily I had previously put aside a clean working sketch that just played a memory based audio array. This helped me confirm that the hardware was ok. Six+ hours later I finally got the ESP8266Audio library compiled and running - Yay! It would be great if there was a version of it that didn't need WiFi to be compiled in just to play some memory based audio. Another thing I have yet to figure out how to convert a AAC based file into a memory based file header. I presume it's some sort of raw file format?

The DRV8830 i2C motor controller IC's work great. They have a built in PWM that can be set via i2C, along with a break function and coasting to a stop. The IC can output up to 1A and operate a small motor anywhere from 2.7V to 6.8V with i2C running at 3.3V. Unfortunately there are currently only 99 available in the world, with more stock due at the end of 2022 and 6,000 later in 2023!

Overall, the PCB works well and I am happy with the functionality of it. It's been a fun project and learning curve, but I do have a huge list (35+) of changes for the next version of the PCB. Some are cosmetic text changes, along with migrating the 0805 sized resistors and capacitors to 0603 size. I can get rid of a lot of the jumper options on i2C address selections. I might have a go at removing the Sharp IR distance sensor and adding a one dimensional gesture/distance sensor IC instead. They don't take up much space, are i2C based and are a lot more accurate than a 5V Sharp GP2Y0A21YK0F IR distance sensor.

Oh, and it might be handy to work out what the BOM costs are for the ASTB PCB? I think that the current design might be rather expensive due to the IC costs, even before the current silicon shortages.

User avatar
rick
Newbie
Posts: 9
Joined: Tue Aug 24, 2021 7:32 pm

Re: Arduino Sensor Training Board

Post by rick » Sun Jan 09, 2022 5:18 pm

Looks so cool, really solid looking learning platform.

parkview
Guru Maker
Posts: 603
Joined: Tue Jun 24, 2014 8:25 pm
Location: Busselton
Contact:

Re: Arduino Sensor Training Board

Post by parkview » Mon Jan 10, 2022 12:47 pm

So, while the board looks ok to me, it occurred to me yesterday that I have put no thought into how to protect it from bits of metal falling onto the board and shorting things out etc. You and I know not to do that, but accidents can happen and beginners in Electronics might not appreciate the expensive damage that would happen.

KiCAD is great, in that it can export a 3D STEP file of the PCB assembly:
KiCAD-StepFile.jpg
KiCAD-StepFile.jpg (23.56 KiB) Viewed 4304 times
I used Design Spark Mechanical to quickly mock up a 3mm acrylic cover. As the KiCAD model was missing the final large variable resistor, I had to add a slot in for that afterwards and after six test templates:
cover-tests.jpg
cover-tests.jpg (32.92 KiB) Viewed 4304 times
I had the current design which seems to work out well and still leave the necessary finger room to activate touch pads and switches etc:
acrylic-cover.jpg
acrylic-cover.jpg (74.25 KiB) Viewed 4304 times

Post Reply