Pressure Triggered Countdown Timer and Alarm

What do you need Phidgets to do for you?
jschultz
Fresh meat
Posts: 3
Joined: Wed Jun 08, 2016 11:31 am
Contact:

Pressure Triggered Countdown Timer and Alarm

Postby jschultz » Wed Jun 08, 2016 11:46 am

Hi Everyone,

So I'm fairly new to this and could use some help. I've been asked to make a device that essentially starts a countdown timer once an object is placed on the load sensor. If the object is removed from the sensor, the timer resets. However if the timer reaches zero, I need an alarm to sound and preferably have some light flash. This unit would ideally be standalone against a wall and not be hooked up to a desktop PC.

For my research so far, I think I will need:

1. load cell: 3136_0 Button Load Cell (0-50 kg capacity)
2. interface/amplifier: 1046 phidget bridge 4 input interface
3. SBC: open to suggestions
4. Simple LED/LCD clock display: open to suggestions, but I would Ideally like it to be read from 10-20 ft away.
5. Small speaker: open to suggestions

I have some experience with MatLab, Python, and Visual Basic coding, but am curious what the best direction to go for all of this. I'm thinking of starting into c++ from some of the things I have read, but honestly am just looking for some feedback at this point.

Thanks in advance!

-JS

User avatar
mparadis
Site Admin
Posts: 656
Joined: Fri Oct 28, 2011 12:17 pm
Contact:

Re: Pressure Triggered Countdown Timer and Alarm

Postby mparadis » Thu Jun 09, 2016 7:41 am

Here are my thoughts:

1. How many digits do you need for the counter? Each digit requires 7 digital outputs (one for each segment) unless you get a clock module that communicates in some other way (like a binary input, or some sort of digital communication), and the SBC only has 8 digital outputs. Also, the larger 7-segment LEDs usually require 12V, so the digital outputs on the SBC wouldn't be powerful enough to turn on the LEDs. You'd need relays or transistors in combination with the SBC's outputs to switch up to 8 such LEDs. The open-collector digital outputs on the 1012 would be capable of this task. Here's an example of a big 7-segment LED.

2. Depending on how simple the sound can be, you can go simpler than a small speaker. A piezoelectric buzzer is a cheap way to make noise and all you need to do is apply voltage to it (5 or 12V depending on the buzzer- if 12V, then you'd need a relay or transistor to switch power to it). You may also be able to find digitally-triggered alarm modules that already contain a speaker and all of the necessary circuitry. If you must use a speaker, you'll need to get a USB-to-audio adapter for the SBC and install drivers and software libraries that enable its use.

3. Of the languages you know, I would recommend Python because Matlab and VB are a bit more limited in what they can do and it's harder to find programming help online. If you're looking for a new language to learn, C# has a wide user base so it'll be easy to find help when you're stuck. Either way, the code for this program should be straightforward enough.

jschultz
Fresh meat
Posts: 3
Joined: Wed Jun 08, 2016 11:31 am
Contact:

Re: Pressure Triggered Countdown Timer and Alarm

Postby jschultz » Thu Jun 09, 2016 10:52 am

mparadis - Thank you for your thorough response. I would ideally like to have a minimum of 2 digits in operation so it can count down the minutes and then the seconds. Ideally I would have 3, but I guess I'll have to do a little more research to see if that is possible considering the SBCs 8 outputs.

The example of LED clock you sent was what I had in mind.

As for the sound, it simply has to be a buzzing annoying/attention grabbing noise. Essentially this is going to serve as a preventative alarm system to prevent 5 gallon buckets or resin from exotherming by alerting our operators it's time to use it or loose it. So I will be opting for the digitally triggered alarm system.

Thank you for the recommendation on languages, I will look into C#.

frodegill
Phidget Mastermind
Posts: 114
Joined: Thu Mar 04, 2010 2:51 am
Contact:

Re: Pressure Triggered Countdown Timer and Alarm

Postby frodegill » Fri Jun 10, 2016 3:31 am

mparadis wrote:1. How many digits do you need for the counter? Each digit requires 7 digital outputs (one for each segment) unless you get a clock module that communicates in some other way

The MAX7219 is a good example of the latter. It only needs 3 pins in addition to Vcc and Gnd to control a 8x8 LED matric, and will daisy-chain commands so you can control multiple of them them. I have had a Coding For Kids class where 8-year-olds understood what was happening, so it's fairly trivial. Code for an Arduino scrolltext spanning three MAX7219 is available at https://github.com/frodegill/arduino-snippets/blob/master/vertical_scrolltext_multiple_MAX7219s.c (with no external dependencies. There are lots of other examples out there that uses communication libraries). Didn't make a video of it, but youtube has lots of them (first pick: https://www.youtube.com/watch?v=mSN6zbjlNVA). The MAX7219 is fairly large, bright, dirt-cheap and runs on +5V

jschultz
Fresh meat
Posts: 3
Joined: Wed Jun 08, 2016 11:31 am
Contact:

Re: Pressure Triggered Countdown Timer and Alarm

Postby jschultz » Fri Jun 10, 2016 5:06 pm

Forgive the probably obvious question, but is it possible to expand the number of digital outs on the SBC someway, so let's say I can utilize 3-4 of the 7 segment LED displays that requires 8 outputs?

User avatar
mparadis
Site Admin
Posts: 656
Joined: Fri Oct 28, 2011 12:17 pm
Contact:

Re: Pressure Triggered Countdown Timer and Alarm

Postby mparadis » Mon Jun 13, 2016 7:27 am

You could add on the 1032 - PhidgetLED, which has 32 LED outputs. If the SBC + 1032 is too expensive, you might want to try something like an arduino mega.

frodegill
Phidget Mastermind
Posts: 114
Joined: Thu Mar 04, 2010 2:51 am
Contact:

Re: Pressure Triggered Countdown Timer and Alarm

Postby frodegill » Mon Jun 13, 2016 7:51 am

mparadis wrote:You could add on the 1032 - PhidgetLED, which has 32 LED outputs.

..and, if it is just a matter of having a countdown timer, there are quite a few LCD displays available.


Return to “Phidgets”

Who is online

Users browsing this forum: No registered users and 2 guests