Blog

Learn something new with our collection of blog posts centered around various topics on PSpice® technology.

PSpice Simulates with Arduino-Driven Sensors

Have you ever wanted to simulate a design with existing hardware? 

 

Sure you can create a stimulus of what you expect from the hardware then simulate in PSpice®, but sometimes there’s no substitute to the real thing.  Ideally what engineers want is a blend of virtual and physical prototyping—something possible in PSpice.  Since many IoT innovators use inexpensive development boards to develop their idea, I thought it would be instructive to show how one can develop new hardware in OrCAD® and PSpice, then integrate the simulation with real sensors driven by an Arduino board(link is external).

 

In the picture below, the Arduino Uno is connected to a small breadboard with a few sensors as input and an LED as output. 

blogema_imag1.jpg

 

The schematic for this design (below) is based around a symbol for the Arduino Uno with pins for its analog and digital I/O.  To create new hardware for simulation, you can just add parts to the OrCAD Capture design and wire them to the Arduino symbol.  In my example two of the sensors— the tilt sensor and the thermal sensor—are just for input to display in a Probe window.  The optical sensor, or Detector, is reading the value of the photo resistor, running it through the circuitry I’m designing—which for my simple example is mainly just an op amp—and then driving an LED on the breadboard.

 

blogema_image2.jpg

 

As you can see in the picture below, when I run the simulation, I can see how my interactions with the sensors affect my simulation:

 

blogema_image3.jpg

 

  • Each time I tilt the board beyond a threshold, I see the green trace drop from 1V to 0V
  • I can block the LED lighting the photo resistor and see the yellow trace drop from about 2V to about 0.5V
  • I can hold the thermal sensor staring at the three second mark to heat it up from my fingers and see the light blue trace slowly increase in voltage.
  • The red trace verifies that my LED output does not change.

 

The key to making this work with PSpice is the relatively new device model interface or DMI capability.  DMI replaces the old Device Equations Developer’s Kit (DEDK) feature that allowed customers to modify the PSpice intrinsic models to create new models.  DMI is a better, more flexible solution allowing engineers to create new models in C/System C/C++ independent from the internal PSpice models.  This Arduino example utilizes the DMI capability to create a model for the Arduino Uno schematic symbol in our design to give function to the pins we are using.  The basic implementation of the model is to connect our PSpice design to the Arduino board through Arduino’s serial link.  This allows us to see inputs from the board and drive outputs to the board.

 

Using DMI this way is not exclusive to an Arduino board.  Because the interface is written in C, other development boards can be accessed in a similar fashion. So if you’re designing your next great product withRaspberry Pi(link is external) or a BeagleBone(link is external), rest assured you too can design and simulate your custom hardware with PSpice.

 

You can view this demonstration live by watching the video below.

blogema_image4.png

 

Wed, 2020-09-02 04:37
Sydni Kirlin
Offline
Last seen: 4 years 2 months ago
Joined: 2020-09-02 04:24

This is an amazing type of

This is an amazing type of post.
Safe

Thu, 2023-02-23 04:50 (Reply to #4)
IngeWakita
Offline
Last seen: 2 days 13 hours ago
Joined: 2023-02-23 04:20

hanafuda earrings

hanafuda earrings

Tue, 2021-03-23 04:38
JoyC
Offline
Last seen: 3 years 8 months ago
Joined: 2021-03-23 04:34

cool one..

cool one..

Tue, 2021-03-23 04:38
JoyC
Offline
Last seen: 3 years 8 months ago
Joined: 2021-03-23 04:34

https://www.google.com/

https://www.google.com/

Tue, 2021-08-24 08:58
Kameskim
Offline
Last seen: 3 years 1 month ago
Joined: 2021-08-24 08:06

I am not yet familiar with

I am not yet familiar with this and I am so glad that you discussed it here. 

Cheers!

Tree Removal Service

Sat, 2021-10-30 12:00
aisonwrnerxbg
Offline
Last seen: 2 years 5 months ago
Joined: 2021-10-30 11:50

The key to making this work

The key to making this work with PSpice is the relatively new device model interface or DMI capability.  DMI replaces the old Device Equations Developer’s Kit (DEDK) feature that allowed customers to modify the PSpice intrinsic models to create new models.| Mobile Truck Repair

Fri, 2022-04-22 22:26
OttoOsborn
OttoOsborn's picture
Offline
Last seen: 11 months 2 weeks ago
Joined: 2022-04-22 21:43

If your sensor has an SPI

If your sensor has an SPI interface, you may use the same pins (a bus) for numerous devices, but each one will require a chip choose PIN linked to a digital I/O pin on your Arduino so that it can 'select' each device. You can usually only have one device if your sensor has a serial port. Anyway, if you love playing mobile games on your computer, you should definitely try MLBB on PC. It is better to play the game on the PC than in mobile in my opinion.

Click here https://township.games/

Wed, 2022-06-01 02:03
neebwhitlinger25
Offline
Last seen: 2 years 2 months ago
Joined: 2022-06-01 01:42

Nature, by and large, is not

Nature, by and large, is not linear and straight lines are rarely, if ever, ob- served in the natural World. In essence, electrical engineers have dismissed nature’s evolutionary design techniques and mainly considered linear designs. 

 

Suspension Repair

Mon, 2022-08-08 03:02
basit khatri66
basit khatri66's picture
Offline
Last seen: 2 months 6 days ago
Joined: 2022-06-28 05:48

i never know the use of adobe

i never know the use of adobe shadow until i saw this post. thank you for this! this is very helpful. Žádost o vízum do Turecka

Mon, 2022-08-08 15:48
basti
Offline
Last seen: 2 years 2 months ago
Joined: 2022-07-27 12:52

what are the arduino driven

what are the arduino driven sensors? can anyone help? cleanout Baton Rouge

Sun, 2022-08-14 10:35
basit khatri66
basit khatri66's picture
Offline
Last seen: 2 months 6 days ago
Joined: 2022-06-28 05:48

Hello, this weekend is good

Hello, this weekend is good for me, since this time i am reading this enormous informative article here at my home. JAUNZĒLANDES VĪZAS PRASĪBAS

Mon, 2022-08-15 03:44
basit khatri66
basit khatri66's picture
Offline
Last seen: 2 months 6 days ago
Joined: 2022-06-28 05:48

We are really grateful for

We are really grateful for your blog post. You will find a lot of approaches after visiting your post. I was exactly searching for. Thanks for such post and please keep it up. Great work. 123 movies

Mon, 2022-08-15 09:30
basit khatri66
basit khatri66's picture
Offline
Last seen: 2 months 6 days ago
Joined: 2022-06-28 05:48

If you are looking for more

If you are looking for more information about flat rate locksmith Las Vegas check that right away. Láminas de de seguridad

Sat, 2022-08-20 07:35
basit khatri66
basit khatri66's picture
Offline
Last seen: 2 months 6 days ago
Joined: 2022-06-28 05:48

I have read all the comments

I have read all the comments and suggestions posted by the visitors for this article are very fine,We will wait for your next article so only.Thanks! Cats with down syndrome

Mon, 2022-08-22 06:32
basit khatri66
basit khatri66's picture
Offline
Last seen: 2 months 6 days ago
Joined: 2022-06-28 05:48

Cool stuff you have got and

Cool stuff you have got and you keep update all of us. indian visa for austrian citizens

Sun, 2022-08-28 04:56
basit khatri66
basit khatri66's picture
Offline
Last seen: 2 months 6 days ago
Joined: 2022-06-28 05:48

Thanks for sharing this

Thanks for sharing this information. I really like your blog post very much. You have really shared a informative and interesting blog post with people.. ИНДИЙСКА МЕДИЦИНСКА ВИЗА

Wed, 2022-08-31 09:06
basit khatri66
basit khatri66's picture
Offline
Last seen: 2 months 6 days ago
Joined: 2022-06-28 05:48

Thanks for posting this info.

Thanks for posting this info. I just want to let you know that I just check out your site and I find it very interesting and informative. I can't wait to read lots of your posts. Turkey Visa Talosaga

Thu, 2022-09-01 03:25
basit khatri66
basit khatri66's picture
Offline
Last seen: 2 months 6 days ago
Joined: 2022-06-28 05:48

I think this is one of the

I think this is one of the most significant information for me. And i’m glad reading your article. But should remark on some general things, The web site style is perfect, the articles is really great : D. Good job, cheers borsalo

Thu, 2022-09-01 07:55
basit khatri66
basit khatri66's picture
Offline
Last seen: 2 months 6 days ago
Joined: 2022-06-28 05:48

This article gives the light

This article gives the light in which we can observe the reality. This is very nice one and gives indepth information. Thanks for this nice article. 威而鋼價格

Wed, 2022-09-07 02:12
basit khatri66
basit khatri66's picture
Offline
Last seen: 2 months 6 days ago
Joined: 2022-06-28 05:48

I got too much interesting

I got too much interesting stuff on your blog. I guess I am not the only one having all the enjoyment here! Keep up the good work. شرایط ویزای نیوزلند

Sat, 2022-09-10 02:23
basit khatri66
basit khatri66's picture
Offline
Last seen: 2 months 6 days ago
Joined: 2022-06-28 05:48

Nice post! This is a very

Nice post! This is a very nice blog that I will definitively come back to more times this year! Thanks for informative post. מרכז בקשת ויזה לטורקיה

Wed, 2022-09-14 12:08
basit khatri66
basit khatri66's picture
Offline
Last seen: 2 months 6 days ago
Joined: 2022-06-28 05:48

Some truly wonderful work on

Some truly wonderful work on behalf of the owner of this internet site , perfectly great articles . 印度签证在线流程

Sun, 2022-09-18 09:15
basit khatri66
basit khatri66's picture
Offline
Last seen: 2 months 6 days ago
Joined: 2022-06-28 05:48

This is a great inspiring

This is a great inspiring article.I am pretty much pleased with your good work.You put really very helpful information. Keep it up. Keep blogging. Looking to reading your next post. INDIA VISA eligible countries

Mon, 2022-09-19 01:11
basit khatri66
basit khatri66's picture
Offline
Last seen: 2 months 6 days ago
Joined: 2022-06-28 05:48

Please let me know if you’re

Please let me know if you’re looking for a article writer for your site. You have some really great posts and I feel I would be a good asset. If you ever want to take some of the load off, I’d absolutely love to write some material for your blog in exchange for a link back to mine. Please send me an email if interested. Thank you! selling credit card processing

Thu, 2022-09-22 08:56
basit khatri66
basit khatri66's picture
Offline
Last seen: 2 months 6 days ago
Joined: 2022-06-28 05:48

Great job for publishing such

Great job for publishing such a beneficial web site. Your web log isn’t only useful but it is additionally really creative too. Канадын визний асуултууд

Wed, 2022-09-28 02:04
basit khatri66
basit khatri66's picture
Offline
Last seen: 2 months 6 days ago
Joined: 2022-06-28 05:48

You make so many great points

You make so many great points here that I read your article a couple of times. Your views are in accordance with my own for the most part. This is great content for your readers. Turkey Visa Application

Sat, 2022-10-01 02:10
basit khatri66
basit khatri66's picture
Offline
Last seen: 2 months 6 days ago
Joined: 2022-06-28 05:48

Your blog has piqued a lot of

Your blog has piqued a lot of real interest. I can see why since you have done such a good job of making it interesting. I appreciate your efforts very much. selling credit card processing

Mon, 2022-10-03 07:28
basit khatri66
basit khatri66's picture
Offline
Last seen: 2 months 6 days ago
Joined: 2022-06-28 05:48

Very useful post. This is my

Very useful post. This is my first time i visit here. I found so many interesting stuff in your blog especially its discussion. Really its great article. Keep it up. Nueva Zelanda VISA

Tue, 2022-10-04 03:21
basit khatri66
basit khatri66's picture
Offline
Last seen: 2 months 6 days ago
Joined: 2022-06-28 05:48

Everything has its value.

Everything has its value. Thanks for sharing this informative information with us. GOOD works! 토토사이트추천

Thu, 2022-10-06 07:06
basit khatri66
basit khatri66's picture
Offline
Last seen: 2 months 6 days ago
Joined: 2022-06-28 05:48

Thanks a lot for sharing this

Thanks a lot for sharing this excellent info! I am looking forward to seeing more posts by you as soon as possible! I have judged that you do not compromise on quality. payment processing iso

Fri, 2022-10-14 03:45
basit khatri66
basit khatri66's picture
Offline
Last seen: 2 months 6 days ago
Joined: 2022-06-28 05:48

All your hard work is much

All your hard work is much appreciated. Nobody can stop to admire you. Lots of appreciation. ВИЗА ДЛЯ ИНДИИ

Sat, 2023-02-11 03:27
safetycasino13@...
Offline
Last seen: 1 year 6 months ago
Joined: 2023-01-02 02:33

온라인바카라

I’m not sure exactly why but this weblog is loading incredibly slow for me. Is anyone else having this problem or is it a problem on my end? I’ll check back later on and see if the problem still exists.온라인바카라

Thu, 2023-07-13 02:04
topseo323
Offline
Last seen: 1 month 4 days ago
Joined: 2022-11-05 19:28

Top SEO

I’m going to read this. I’ll be sure to come back. thanks for sharing. and also This article gives the light in which we can observe the reality. this is very nice one and gives indepth information. thanks for this nice article... EMPLEOS DE CHOFERES 2023-2024 / Trabajo para choferes conductores C/S experiencia / empleo chofer

Sun, 2024-06-02 07:28
sharonfrankklin
Offline
Last seen: 4 months 2 days ago
Joined: 2024-04-27 02:44

The pervasive popularity of

The pervasive popularity of vape products Shop among youth has raised concerns about nicotine addiction and long-term health effects. Regulators are grappling with strategies to mitigate youth initiation while ensuring adult access to harm reduction alternatives.

 

Wed, 2024-07-24 08:51
sharonfrankklin
Offline
Last seen: 4 months 2 days ago
Joined: 2024-04-27 02:44

Smokers World HW

Future Bar

Download PSpice and try it for free! Download Free Trial
Cadence