OT, I want to make a simulator.

Join Date
Apr 2002
Location
No income tax, no capital gains tax. Freedom!
Posts
8,389
I have seen too many threads where people say they can't simulate a temperature system or similar. I know how to write the software for the most complex systems but I need cheap hardware that people will buy. Think Arduino, Raspberry PI, Propeller chip etc.


For temperature control systems I don't need a very fast micro controller. Updates every second are fast enough and this should be easy. The problem is that for temperature control systems I need an analog input or digital input from the PLC ( analog 0-10v or PWM from the PLC). The output to the PLC, PLC input, should be 16 bit analog 0-10 volts.


I need suggestions for cheap micro controllers and cheap AtoD cards for the output to the PLC.


I would also like to know if any of these cheap micro controllers have a real time clock 1ms loops can be handled for motion control simulation. A lot of cheap micro controllers cannot handle 1 ms interrupts.


At work we use our motion controllers since they can do anything but they are too expensive to use as play things or something to test against.


I want to know of cheap hardware that will do the job. I can provide the software.


BTW, I recently bought a Raspberry PI 4. It is good for what it is but it doesn't have a real time clock and only one timer input. I was disappointed. However, if you want a cheap PC then the Canakit Raspberry PI is a good deal and highly recommended, it just doesn't work for my project.


I have also bought a Nvidia Jetson Xavier kit. It cost $700. It cost too much for a cheap simulator.


There must be a few of you that get into real time control with cheap controllers.
 
Does the real time kernel get you anywhere with the pi? What about https://learn.adafruit.com/adding-a-real-time-clock-to-raspberry-pi

It would be better if it fit on the Raspberry PI pins.
This would avoid the need for a separate wiring board that cost $$. Also, I hate those wiring boards. When I was in college years ago different century. I was one of the first to design an 8080 system but I did it on one of the wiring boards. The capacitance of the board was so high that is slowed the clock frequency down that we could achieve. We, I had a lab partner, could only achieve 250KHz instead of 2MHz. 250 KHz was as slow as the 8080 could go. We got the 8080 to work but the best we got is to do was a 3 by instruction to jump to 0. This was in 1974-1975. I did two senior projects since the first I did during the summer working at Tektronix.
The result is I don't like wiring boards for anything that is close to a high frequency.

We need to meet again at the Fortside. This time I buy. Let me know when. I have more time now and even though I am retarded, I mean retired I still program.

Also, dmroeder doesn't look like his icon or picture.
 
https://www.google.com/search?client=firefox-b-1-d&q=raspberry+pi+realtime+linux


three of the first four hits there claim latency near 0.1ms or better.


0.1ms is good enough for a cheap simulator.
I will check it out.
Raspberry PI would still be my first choice because even if your aren't using it simulation it is still a good PC.



However I am still shocked that they can't do much better when there are 8 arm cores.


There is a company called Parallax that makes the propeller chip. It has 8 very crude cores but 8 cores in parallel can still do a lot. There are no interrupts. One of the cores simply polls all interrupt sources. Crude but effective. The problem is that I haven't found a good analog output yet.


One of the guys at work but a cheap microcontroller with analog I/O but it was so noisy it was useless.


A simulator for hydraulics is done like
https://deltamotion.com/peter/Mathcad/Mathcad - Hydraulic Cylinder.pdf
There are 9 differential equations that are solved in parallel.
Some are non-linear.


A temperature simulator is much simpler.
 
Why not go real basic and get an AVR/PIC on a bread board?
Then you can scale a timer interrupt exactly how you want it (1ms for example).
I've dabbled some with the AVR ATTINY84 and it has a 16-bit timer/counter for PWM.


If you want something more complete i suppose a standard Arduino board can do what you are after. If you want real power there is one based on Arm Cortex-M0 (i belive its called arduino zero).
 
Good to see you still at it Peter.

I used the Parallax Basic Stamp a couple decades ago to make a custom controller for an automatic door company. Did a few hundred units, and the chip was flawless. That's about the end of my development, since the brick PLC's plunged in price and didn't make sense to design a custom for a low volume product. But, since I grew up in the old analog/cmos days, it was fun!

I'm just a slide rule guy in a microprocessor world!
 
Good to see you still at it Peter.

I used the Parallax Basic Stamp a couple decades ago to make a custom controller for an automatic door company. Did a few hundred units, and the chip was flawless. That's about the end of my development, since the brick PLC's plunged in price and didn't make sense to design a custom for a low volume product. But, since I grew up in the old analog/cmos days, it was fun!

I'm just a slide rule guy in a microprocessor world!


I have looked at that but I need more power. Basic will not be good enough. I have looked at the Propeller Chip 2 which is a HUGE improvement over the original Propeller Chip. I have looked at Beagle Bone, NXP, Arduino etc. The problem I have with all of them is that the analog support is poor. I want to be able to have +/- 10 volt inputs so a motion controller or PLC can output a control signal directly to the hardware simulator. I also want to output at least 0-10 volts to the PLC or motion controller to represent a position or temperature. The both the output and input need to be at least 16 bits. That can't be had for cheap. I can get it on a PC104 card for $700.


BTW, we already use RT Linux at Delta on our french fry scanning and cutting machines. The problem I have with RT Linux on a Raspberry PI is that it doesn't appear to make 1 ms interrupts easy. However, I have done some research on that. Internally, each of the 4 cores of the Broadcom Arm chip have their own high resolution timers. I could make this work but it would be complicated to implement the shared code. In any case I would need to design an AtoD and DtoA card. I can copy existing designs we have but this is pain and then how could this be share.
For me, it would be easiest to just use one of our motion controllers since it will do everything I want and it is cheap to me, but these are too expensive to just play around with. I already have a very good temperature simulator written for our motion controllers. I did a webinar about 10 years ago on temperature control but only 2 people showed up so I didn't do another. Now I can make YouTube videos but they aren't interactive.
 
I have looked at that but I need more power. Basic will not be good enough. I have looked at the Propeller Chip 2 which is a HUGE improvement over the original Propeller Chip. I have looked at Beagle Bone, NXP, Arduino etc. The problem I have with all of them is that the analog support is poor. I want to be able to have +/- 10 volt inputs so a motion controller or PLC can output a control signal directly to the hardware simulator. I also want to output at least 0-10 volts to the PLC or motion controller to represent a position or temperature. The both the output and input need to be at least 16 bits. That can't be had for cheap. I can get it on a PC104 card for $700.


BTW, we already use RT Linux at Delta on our french fry scanning and cutting machines. The problem I have with RT Linux on a Raspberry PI is that it doesn't appear to make 1 ms interrupts easy. However, I have done some research on that. Internally, each of the 4 cores of the Broadcom Arm chip have their own high resolution timers. I could make this work but it would be complicated to implement the shared code. In any case I would need to design an AtoD and DtoA card. I can copy existing designs we have but this is pain and then how could this be share.
For me, it would be easiest to just use one of our motion controllers since it will do everything I want and it is cheap to me, but these are too expensive to just play around with. I already have a very good temperature simulator written for our motion controllers. I did a webinar about 10 years ago on temperature control but only 2 people showed up so I didn't do another. Now I can make YouTube videos but they aren't interactive.


I thought you retired and are scooting around in a camper? Hard to give up 'eh?
 
I thought you retired and are scooting around in a camper? Hard to give up 'eh?
No, I went camping when it was 105 degrees F at Beaver Creek. I didn't use my air conditioner. People survived without them before. Some people did leave the campground for home or didn't show up. Then I went to Panther creek. It was nice. Normally I try to get out every other week. This week I was busy.


This week I went to Reno, NV but I flew. This was my first plane trip in years. My suit still fits so I am not getting any fatter.
 

Similar Topics

Showing a new guy basic programming and remembered the simulator here. But nothing happens when selecting the link. "Try our online PLC Simulator-...
Replies
25
Views
1,591
My PLC (S7-1200) and HMI (KTP-1200 Basic) has been delivered on-site to the customer. To be able to do "off-line" updates to the code, I am using...
Replies
4
Views
218
hi everyone please give me a solution to timeout error in delta plc simulator,i have a doubt about firewall and antivirus we r using.
Replies
2
Views
760
I'm trying to look at some G5 and XIO configs offline with PCCU and I understand that I need a simulator for that purpose. I haven't contacted my...
Replies
7
Views
740
Is it possible to run a project in Softmaster that will communicate with an external HMI?
Replies
0
Views
392
Back
Top Bottom