Looking for a board to emulate sensors - Page 1
Forum section: electronics / beginners

author: bonzer
author_rank: Regular Contributor
timestamp: June 07, 2022, 05:07:21 pm
content: Hello everyone, please help me to find what I'm looking for.I have a board that reads analog sensors, ntcs, thermocouples and I2C sensors and some digital signals ON/OFF and then performs specific tasks.I need to simulate the sensors. Is there any kind of like Labview board that is easily programmabile from PC and can perform like I2C comunication, emulate ntcs (using digital potentiometers), activate output DACs etc?

author: ledtester
author_rank: Super Contributor
timestamp: June 08, 2022, 01:33:45 am
content: Quote from: bonzer on June 07, 2022, 05:07:21 pmDo you mean act as an I2C slave?QuoteNot sure what you mean here.

author: bonzer
author_rank: Regular Contributor
timestamp: June 08, 2022, 08:05:37 am
content: Thanks for the reply. Yes, something that can emulate an I2C slave and contain values programmable from PC. Also it would be useful if this board could have some output analogue signals programmable from PC generated by DACs to emulate analogue sensors. This board can always be attached to the PC, it doesn't need to be portable. This would be useful to build in my case a sort of a test bench. Anyway I think I will have to build it by myself because it looks too specific and I don't find anything similar already produced, surfing on the internet

author: Terry Bites
author_rank: Super Contributor
timestamp: June 08, 2022, 10:56:39 am
content: Its a matter of writing some code and reading look up tables (mostly).Some sensor response modeling time might be handy.You could run it on an arduino+SDcard+display+some rotary encoders and buttons.The Arduino Uno Rev3 has i2c I belive.You only need slowly changing outputs, so you could use PWM for those.www.codrey.com/arduino-projects/arduino-advanced-16-bit-pwm/Or an external DAC module. egwww.devobox.com/en/shielden/193-innoesys-4-dac-shield-for-arduino.htmlUse data from eg.www.labfacility.com/downloadsGenerate interpolations from these or similar tables if you need to. Use excel FORECAST maybe.See IEC 584-1

author: ledtester
author_rank: Super Contributor
timestamp: June 08, 2022, 12:39:49 pm
content: Is there a simulator or emulator for your MCU? For instance, the Arduino has a bunch of simulators (search for "Arduino simulator") which also implement external hardware devices including slide switches, OLED displays, humidity sensors, etc. You might be able to write custom code for your own hardware devices to suit your test purposes.

author: bonzer
author_rank: Regular Contributor
timestamp: June 08, 2022, 07:49:45 pm
content: Thank you for your replies.MCUs that I use are mainly PIC24F and ARM Cortex M4 of TI.Anyway I didn't think about using Arduino for the emulation part. For I2C slave it seems a good idea but unfortunately it doesn't have some mounted DACs to be used to emulate an analog sensor. Taking into account that I only need a slow voltage change, maybe filtering the PWM modules could be a way to do it as suggested by Terry Bites.Regarding the digital sensor emulation: Arduino Uno has only one I2C module, Arduino Mega has more of them. Anyway, there's a trick that can be found surfing on the internet, to make the Arduino Uno I2C slave module respond to different slave addresses. By using this trick it could work to emulate multiple I2C sensors.I wanted to ask here, do anybody of you know any good and simple digital potentiometer? I think about emulating some of the thermistors by using them.If someone is curious, the reason why I want to avoid simulating all the sensors at "software level" by stub/mocking/faking etc, is because this would force me to create another version of software, something that is important for me to avoid - I have to use the original software. I wanted to point it out.

author: 8goran8
author_rank: Contributor
timestamp: June 08, 2022, 08:52:27 pm
content: My suggestion is RaspberryPi and some kind of AD/DA Expansion Board. SPI and I2C sensors can also be simulated easily.I considered that idea a few months ago and for this purpose I bought High-Precision AD/DA Board from Waveshare.https://www.waveshare.com/wiki/High-Precision_AD/DA_BoardUnfortunately, I did not go far in that project.