5 years, 3 months ago.

Connecting sensors to mbed

HI , I have done various experiments till now using arduino board. Now I am planning to do some experiments using mbed. I have couple of questions to get clarified before jumping to use it.

  • Does mbed provides support for connecting various sensors like flex force pressure sensor, DHT11 temperature sensor etc that are not in the component database provided in the mbed website.
  • Can we use mbed in the similar way as we use Arduino?
  • Does mbed allows connecting Arduino wifi shield for wifi connectivity with mbed board? please reply asap so that I can start quickly. I am Very much excited to work on mbed.

Regards Hema C Vadlamudi

3 Answers

5 years, 3 months ago.

The component database is relative new (okay by now already around for quite some time), and not nearly all components are in there (not to mention the initial idea was great, but it is now being filled with duplicates already, if only they would give me free reign to change the database :P). But there is alot more code, which you can simply search for: http://mbed.org/search/?type=&q=dht11. In general pick once with alot of imports, but if those don't work with latest mbed libs have a look at more recent ones.

I don't know how you use Arduino, but I guess so.

Sadly I don't think anyone has ported the Arduino wifi shield to mbed. Considering most of the heavy work is done on the shield, and it can be based on the Arduino code, I think it should be very well doable. But I don't have one myself, and no idea if I would get around to it anyway :). Considering there are cheaper alternatives I don't know if someone will write a library anytime soon. However the alternatives: http://mbed.org/components/cat/wifi/. And also the CC3000 thats there can be bought as shield from for example: http://www.adafruit.com/products/1491.

Hey Erik - Can you send me a list of the duplicates and how you think it could be better?

posted by Sam Grove 11 Sep 2014
5 years, 3 months ago.

Basically ANY thing can be connected to MBED, assuming 3V3 I/P signals, although SOME MBED pins are 5V0 tolerant.

as for pre-written code, you might be lucky, and there will be a piece of code already written ..

as far as I am aware the flex sensor is just a resistor, so no problem, but might need re-scaling.

As for dweeno shields, an adapter can be made/bought, or possibly look at LPCXpresso 1549, from Farnell #2399914.

Ceri

5 years, 3 months ago.

You can connect different analog sensors with your mbed board, without the use of any specific library. I have used different current voltage sensors with mbed. They will generate value b/w [0-1] then you have to figure out the gain value. For example you connect your temperature sensor with the analog pin and it gives value let say 0.67 volts and you know the current temperature of the room is 32 degree Celsius, then your gain factor will be 32/.67=47.7, so it means you need to multiply the voltage value with the gain facotr. Next time you goto some cold place and your sensor gives you 0.3 volts as now you know the gain factor just multiply it with the gain facor, so 0.3*47.7=14.31 degree Celsius.

But some sensors work in some different way as well you need some complex computations. but as far as hardware and software is concern you can do it easily.

hope it will help.


Assigned to Hema Vadlamudi 5 years, 3 months ago.

This means that the question has been accepted and is being worked on.