Adafruit Board for use with Communications App

Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
bakergofast
 
Posts: 3
Joined: Tue Apr 19, 2022 1:06 pm

Adafruit Board for use with Communications App

Post by bakergofast »

Hey all!
I'll preface by saying I'm pretty much a newbie when it comes to circuit boards/coding-- although I have a vast background in wiring and electrical systems.
I'm currently working on a project which will set up a basis of communication within the all-deaf (except myself) race team I started with my father. Where all other teams would utilize radio headsets to communicate with the driver, we cannot.
My solution is developing an app that allows the driver to receive large text prompts on a tablet mounted in the cockpit, as well as use buttons integrated on the steering wheel to select from a number of on-screen preset prompts to send text messages to the pit crew.
I'm in development of the app, and have it functioning with the use of the touchscreen, however I know I'll need a programmable PCB to have the steering wheel buttons communicate with the app.

Essentially, there will be 6 (backlit) buttons, each color-coded to match the screen prompts with which the driver chooses the given prompts which automatically sends a text message to all the phone numbers in the app.

My goal is to have a PCB connected to the tablet via USB connection. For the application, hardwired is preferred over Bluetooth, although not entirely a deal breaker as I'll have to simultaneously have the tablet plugged in for charging. My thought is to use a USB splitter but that may or may not create complications.

I'm wondering whether the Adafruit Metro 328 Experimentation Kit would be a good fit for this sort of application (usage in conjunction with an Android app)?
Additionally, what are some other options I should look into? The Metro kit piques my liking as it will also provide a means for me to learn how to code and program it. Of course there may be better options I haven't found on the website yet.

Also, here's a pic of the layout of the app. Super straightforward, each prompt, when selected, opens a subsequent page that has additional info in regards to each main prompt for the driver to also select from.

Cheers!
Screenshot_20230208-040312.png
Screenshot_20230208-040312.png (187.84 KiB) Viewed 148 times

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: Adafruit Board for use with Communications App

Post by adafruit_support_mike »

The Metro 328 is a good platform for basic development, and should work for the project you described.

For deployment in a vehicle, you might want to swap over to the Metro Mini, which is the same hardware on a smaller PCB:

https://www.adafruit.com/product/2590

There's a chance that your project will grow to require more memory than the Metro 328 has. If that happens, we have many other microcontrollers that can take over.

Moving to a different board will force you to make some changes, but nothing major.. you'd probably need to change the GPIO pin numbers, but little more. All of the boards support the Arduino convenience functions, so it's fairly easy to write code that moves easily from one kind of microcontroller to another.

User avatar
neradoc
 
Posts: 542
Joined: Wed Apr 27, 2016 2:38 pm

Re: Adafruit Board for use with Communications App

Post by neradoc »

One way to communicate to the Android device would be keyboard HID, sending key presses through USB like an external keyboard, which would probably be the simpler way to develop and test a program like that.
For that you can't use a 328, you need a board that supports native USB, like a 32u4 or SAMD21 (M0) based board. Or even RP2040, which would be overpowered, but quite available in this day and age, and cheap, like the Raspberry pico itself (and pico W that is in the process of having Bluetooth support - soon - in case you want to try that in the future).
Now I don't know a good kit to direct you to for the pico specifically, but you could make a shopping list...

User avatar
bakergofast
 
Posts: 3
Joined: Tue Apr 19, 2022 1:06 pm

Re: Adafruit Board for use with Communications App

Post by bakergofast »

adafruit_support_mike wrote: Sat Feb 11, 2023 12:14 am The Metro 328 is a good platform for basic development, and should work for the project you described.

For deployment in a vehicle, you might want to swap over to the Metro Mini, which is the same hardware on a smaller PCB:

https://www.adafruit.com/product/2590

There's a chance that your project will grow to require more memory than the Metro 328 has. If that happens, we have many other microcontrollers that can take over.

Moving to a different board will force you to make some changes, but nothing major.. you'd probably need to change the GPIO pin numbers, but little more. All of the boards support the Arduino convenience functions, so it's fairly easy to write code that moves easily from one kind of microcontroller to another.
neradoc wrote: Sat Feb 11, 2023 1:12 am One way to communicate to the Android device would be keyboard HID, sending key presses through USB like an external keyboard, which would probably be the simpler way to develop and test a program like that.
For that you can't use a 328, you need a board that supports native USB, like a 32u4 or SAMD21 (M0) based board. Or even RP2040, which would be overpowered, but quite available in this day and age, and cheap, like the Raspberry pico itself (and pico W that is in the process of having Bluetooth support - soon - in case you want to try that in the future).
Now I don't know a good kit to direct you to for the pico specifically, but you could make a shopping list...

Thanks for the responses!
I did see the Metro Mini, and I like that it's already set up to utilize a USB Type-C connection.
In response to both of you, I agree that having the board set up as an external keyboard would simplify a lot of things, and that was actually what I had planned to do. Getting it to communicate with the app I'm building in MIT App Inventor may be a challenge as it will require external coding (not impossible, but with no coding experience it will be a good learning curve) versus the preset building blocks of code they have available.

In most cases, a Bluetooth connection would serve something like this very well. Given there's no need for extra wires. However in my case, with races ranging from 8 to 24 hours long, I'm not sure how long a Lithium Ion battery would last with constant use, although with the right battery, it would probably be fine.
In racing, there's a big focus in eliminating any foreseen possible failure points, given the possibility of Bluetooth randomly disconnecting, or the battery running out of juice, a direct connection to the mobile device is preferred-- I've got some CAD designs to keep all the cables secure already made up (thread-in connections to their respective mounting locations).

That brings me to my next circuit-related question-- is it possible/ a good idea to use a USB-C (power/data) splitter? The in-car tablet will need to be charging while also receiving data from the PCB for the steering wheel. I've seen a few splitter boards around the web (such as this: https://hackaday.io/project/26263-pd-buddy-wye) but I've also read about possible issues regarding the negotiation processes that take place with the USB-C connection.
The bare-bones purpose of this board would be:
1.) Charge the tablet
2.) Allow tablet to receive data from the PCB
3.) Provide power to the PCB
Of course, this would only allow a specific orientation of the USB-C connection, but that isn't an issue. Just seeing if it's a viable option in my case, as otherwise I would have to go the route of a Bluetooth connection to the steering wheel.

Attached some pictures of an example of one of these splitter boards--

The route of USB-C splitter will require some more research on my part to fully understand the function of each pin in a USB-C connection to ensure whatever board I go with has that capability-- or if I go the route of having one built/integrating USB-C breakout boards into the PCB I get for the steering wheel. It's possible that I won't be able to provide power to both the tablet AND the steering wheel's PCB (unless more splitters were added?...hmmm)
If it turns out to be a solution that requires too many extra components, I'll go the route of Bluetooth. If I need the steering PCB to be constantly charged I can hook it up to its own USB charger.
Attachments
USB-C Splitter Board.PNG
USB-C Splitter Board.PNG (574.47 KiB) Viewed 102 times
USB-C Splitter Diagram.PNG
USB-C Splitter Diagram.PNG (87.56 KiB) Viewed 102 times

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: Adafruit Board for use with Communications App

Post by adafruit_support_mike »

Generally speaking, you can't split USB data signals. They need specific circuits at both ends of the connection. The tool for splitting USB data is a USB hub.

Regarding USB-C, I'd say avoid it as long as you can. Pragmatically, you don't need any of the features it provides. Keyboard connections are handled by the low-speed 1Mbps protocol, and you won't need any of the USB Power Delivery features. The first rule of robust system design is to eliminate as much complexity as possible.

As neradoc mentioned, the Metro 328 and Metro Mini can't act as keyboards, so you'll need a microcontroller that can handle USB communication internally (the '328 models have a Serial connection to a separate USB chip). There are many boards that can work as USB keyboards though, with our Feather M0 Express being a good starting point:

https://www.adafruit.com/product/3403

You can program it in C, or with a built-in CircuitPython interpreter.

Locked
Please be positive and constructive with your questions and comments.

Return to “Metro, Metro Express, and Grand Central Boards”