Sensor

Post your requests and ideas on the future development of mikroC.
Post Reply
Author
Message
bura
Posts: 1
Joined: 24 Apr 2009 00:29

Sensor

#1 Post by bura » 14 Aug 2009 13:15

Initially I built a line following robot successfully. With a perfect C language code everything went smoothly. But now I have a big challenge before me in which I am supposed to find a suitable sensor that can be used in a container to cause a microcontroller trigger sound production in three stages such that the first sound is produced when intrusion is sensed the first time, second time and finally the third time. The sound increases in volume sequentially. Can any one help me please to kickstart this work. :?

drdoug
Posts: 1074
Joined: 16 Aug 2007 03:49
Location: St. Louis, MO

#2 Post by drdoug » 27 Oct 2009 03:11

You may be able to use a digital pot to control the output volume and a simple counter for the sensor triggers. Each trigger corresponds to a volume settings on the pot. Check out the examples http://www.mikroe.com/en/tools/digitalpot/

Why the marketing chiropractic signature. What are the odds of finding a DC in this forum?

Mince-n-Tatties
Posts: 2780
Joined: 25 Dec 2008 15:22
Location: Scotland

#3 Post by Mince-n-Tatties » 02 Nov 2009 15:40

@bura

this should really be posted in the general section, next time!

check the compiler help file for sound library, this will give you a quick route to generating three different tones. If you have enough free pins you could look at a simple resistor network switching to produce differing impedance paths for the speaker to give 3 x fixed volume control, you only need 2 pins to have 3 options.

there are obviously a number of solutions, it really depends on what bits-n-bobs you are (allowed to use) using, for whatever reason, cost, PCB space, availability etc.

Post Reply

Return to “mikroC Wish List”