Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Which board? 24 Analog Inputs, 24 Multi Color LEDs, WiFi or Bluetooth and Battery Charging

Status
Not open for further replies.

MarkusK

New Member
Dear experts,

I'm building a prototype for an IoT project but I cant decide which hardware to use.

I need to connect 24 phototransistors to the board, so I think I need some solution with at least 24 analog inputs. However, I only need to access two phototransistors at a time (those are chosen by the user via connected Smartphone) - so do I really need 24 analog inputs?

I also need to control 24 multi color LEDs. Do you have an idea how to do this in a lean way?

I'm searching tgrothr boards and shields but I can't find a working solutuon.
What would you guys recommend?

If my prototype works, I'll go on to a small first batch (around 100 pieces), so the components should also be as cheap as possible (affordable for series production)...

Anyone here to help me?

Thanks, Markus
 
If you tell us what the problem is rather than your solution we will be able to help more.

As an initial guess, use 74138s to power individual photo transistors - this will require 6 outputs and 1 input to read 24 photo transistors.

Use WS2812 based RGB LEDs - this will need 1 output for 24 LEDs.

Use a mini Wemos board for everything as it has wifi built in.

Again, tell us what you are trying to do and we'll be able to help more.

Mike.
 
Hi Mike,

thank you so much for your answer: It already helped a lot.

I read a couple things about MUXes already, but it all seemed pretty complex. I haven't worked with them so far, so I hesitated to go for it. But powering the photo transistors with a 74138s sounds great (if I'll be able to make it work :nailbiting:)!

Sorry for being so unspecific - here's what I'm doing:

I'm working on a device that people can connect to with a smartphone app. The device will have (about) 24 points where people can physically touch it. Each touch point has a status LED and a proximity sensor (I chose photo transistors because I think those are the cheapest option to recognize that a hand or foot covers the surface).

Based on a routine selected in the smartphone app, the device will tell users, which points have to be touched (status LEDs of these points are yellow). Once the user touches these points, the LEDs will turn green and the app starts it's routine. So I need to access only the two (or four) sensors of the touch points that are activated by the app.

I need the sensors (photo transistors) to measure how long a certain point has actually been touched, to calculate success rates and optimize the routine structure and duration (all done by smartphone app) based on these metrics.

Although the photo transistor will be either uncovered or mostly covered, I chose not to simply use a photo diode because I want my device to work in different light environments. So I thought if I'd use a photo transistor, I could add an algorithm that detects brightness changes instead of making a decision on an absolute HIGH / LOW value. Am I right with this assumption?

There has to be a switch to turn on/off the board (I guess I don't need another button for pairing because it shall automatically enter pairing mode once it's turned on). Or do you think it should have a pairing button too?


Any tips? What would you do differently?

Thanks for your great help,

Markus
 
To be able to read multiple photo diodes/transistors is to tie all the emitters together and to a 1nF capacitor to GND. The collectors are powered one at a time by either a shift register or 3 to 8 decoder. To read the selected transistor you ground the emitter junction with an I/O pin - this discharges the capacitor and you then time how long it takes to reach logic 1 again. The more light on the transistor the quicker it will charge. This gives a surprisingly accurate value for the amount of light on the transistor. I found a good description of shift registers **broken link removed**. Note that the time to read a transistor should be around 1/2 mS so you can read all 24 about 50 times per second with time to spare. Edit- You could also replace the capacitor with a resistor and use an analogue pin to read level directly - not tried this.

The same can be done for the LEDs or you can use LEDs with the shift register built in - the WS2812 - a strip of 30 of these can be had for a few dollars - see ebay.

The Wemos board mentioned above does not have BlueTooth but does have WiFi. It can act as an access point and allow connections from an app OR with external WiFi can connect to the app via a server somewhere. You could also get a version of the Wemos board with BlueTooth but I've not played with them.

Mike.
Edit, found suitable board, **broken link removed**
 
Last edited:
You "brightness change" can be a comparison to a sensor that's known to be "uncovered". You also light have to calibrate for uniformity. The spectrum might have some influence as well. You might have to consider an optical filter.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top