Multiple counting of usage

Hello everyone,

For a project on the university I have the following challenge;

I need to measure how many times our prototypes are being used in different places in Europe.
For every use there is a 12v DC current pulse for about 10 seconds and after it will shut off.

My idea is to measure each pulse, send it by 3G (or WiFi) and collect the data from each machine (up to 20 machines).

So what I think I need is a sensor (current on/off), transmitter (pref 3G, otherwise WiFi) and software to receive all the statistics.

It needs to be low cost, but reliable.

I am new to this, but I am very interested in getting started with IoT.

Could you please give me some advice how I should do this?
Thanks in advance!

A rather obvious way is to simply connect the 12V input to the module to something like an ESP32 or an ESP8266 through a voltage divider, monitor that pin and send usage data over WiFi to your central database. It would be pretty simple to implement, can be made physically small and quite cheap given the low cost of ESP* modules.

umm no.
they all have to be iot count them when they boot
to get a total of each user thats booted it has to send a sig to a central sever.
assume 100 students all doing same test and no cheating.
Its an interesting problem but a lot must happen to tally its use for all users.
after each user boots and there arduino is running it then sends a code via iot as to what its doing.
(ICET marhand always add a fuse :slight_smile: )

So give each ESP module a unique identifier that it sends to the central database.

I'm not sure I understand your comment; what's so complicated about the situation? I have a feeling I'm missing something crucial here.

yes but to know the spike at 12v id use an op-amp buffer to the AD input.
peek and hold the spike via op-amps then your code can read the value ect of the spike.
Analog is your friend and 2 op-amps can be a memory as peek and hold
But thats a minor issue.
(ICET marhand, "always use a fuse")

What's the benefit of using opamps for reading out a fairly stable voltage that's there for 10 seconds?

Keep in mind the input impedance of a typical microprocessor pin is in the range of several MOhms. That doesn't really suggest the need for using a buffer, does it?

so that the slow program can loop and check "did it happen?" and when.
the peek and hold will hold the spike in its cap for many hrs and buffered to the adc so the program can read it in.
in that way it can know a spike and the real voltage no matter what state mcu is in.
but this is not the problem as to the org post.
peek and hold w voltage follower as a buffer will do just fine.

ICET marhand (always check earth/gnd leakage AC!)

Ok, I get the sample & hold strategy, but please note that the pulse OP is talking about lasts a whopping 10 seconds. Even a microcontroller from the early 1980s running way too many tasks concurrently would have no problem picking that up without a sample & hold circuit. Your solution is nice if you want to detect a pulse that lasts e.g. a fraction of a microsecond and for some reason the uC is expected to be too slow / incapable of using a pin change interrupt to pick it up.

For this particular application, something like this would be perfectly sufficient, unless you can convince me otherwise of course:


Resistor divider r3/r4 translates the 12V input to a safe logic level of about 3.2V. C1 filters out some spurious spikes, if present. D1 & D2 offer some protection on top of the already present protection diodes in the microprocessor. They shouldn't be needed, but are a cheap insurance.

low leakage plz but yah your getting the idea :slight_smile:
in fact an adc input should have a buffer follower. to its input.
your on the right track though.
(hint takes 2 op-amps that have almost no leakage as impedance)
Smile you almost got it now.
ICET marhand (electronics run on smoke, never let it out)

Who said anything about using an ADC input? It's unnecessary for this purpose. The circuit I showed as several orders of magnitude lower impedance than what a digital input needs. It'll work fine. There's absolutely no need to make it more complicated for OP by adding opamp buffers.

well thats how i do it, and works as a proof. if you want to record it using a mcu as a fact and also tell iot then ill use my op-amps.

For me on my mcu and if i want to know and prove it.. ill stick to my op-amps
my arduino can tell you all day long there was a spike and how big and when.
as long as the peek and hold has power it will hold it until my mcu is on again.

this dosent seem to be what your test is about though.
ICET marhand (never run out of coffee, your on call)

I think we'll have to keep it at that and that your and mine assessment of the functional requirements of OP's system are probably different.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.