Jump to content
Electronics-Lab.com Community

HarryA

Members
  • Posts

    298
  • Joined

  • Last visited

  • Days Won

    11

Everything posted by HarryA

  1. You can use the serial commucations control in VB (Visual Basic) to commucate with an Arduino board. This allows one to make a more formal interface to the board. The serial comm control is found in project/component/Microsoft Comm Control 6.0 in the VB visual studio. Selecting it adds it to the tool box. It can then be dragged on to the form. Its symbol looks like a telephone. In this example an Arduino board is controlling an electric motor via an H bridge circuit. The inputs to the bridge circuit are from pins 4, 5, 6, and 7 from the Arduino board. In the VB code below, the serial interface is setup on loading the form. And four buttons are added: forward, reverse, stop, and exit. On selecting a button it sends a signal to the board which in turn outputs signals to pairs of pins to the transistors in the H bridge. A more practical interface would have code to ask the user which comm port to connect with. ' VB 6 -motor control via Arduino UNO/Mega 2560 Private Sub Form_Load() MSComm1.RThreshold = 3 MSComm1.Settings = "9600,n,8,1" MSComm1.CommPort = 6 'use the one IDE uses MSComm1.PortOpen = True MSComm1.DTREnable = False Text1.Text = "" End Sub Private Sub FORWARD_Click() Text1.Text = "FORARD DIRECTION WAS SELECTED" MSComm1.Output = "f" End Sub Private Sub REVERSE_Click() Text1.Text = "REVERSE DIRECTION WAS SELECTED" MSComm1.Output = "r" End Sub Private Sub STOP_Click() Text1.Text = "STOP WAS SELECTED" MSComm1.Output = "s" End Sub Private Sub EXIT_Click() MSComm1.Output = "s" 'make sure motor is stopped Unload Me End Sub On the board side the Arduino code waits for a serial signal then sets or clears the outputs as required. //this program receives commands via the visual basic program running on the pc //based on: Patel, Ujash.: "Arduino + Visual Basic 6.0:Make your own software to control Arduino Robot //outputs to the four transistors in the // H bridge controling the motor int pin7 = 7; int pin6 = 6; int pin5 = 5; int pin4 = 4; void setup() { Serial.begin(9600); pinMode(pin7, OUTPUT); pinMode(pin6, OUTPUT); pinMode(pin5, OUTPUT); pinMode(pin4, OUTPUT); //all low/off = stopped digitalWrite(pin4,LOW); digitalWrite(pin5,LOW); digitalWrite(pin6,LOW); digitalWrite(pin7,LOW); } void loop() { if (Serial.available()) { int command = Serial.read(); //all low/off = stopped digitalWrite(pin4,LOW); digitalWrite(pin5,LOW); digitalWrite(pin6,LOW); digitalWrite(pin7,LOW); if (command=='f') //forward { digitalWrite(pin7,HIGH); digitalWrite(pin4,HIGH); } if(command=='r') //reverse { digitalWrite(pin5,HIGH); digitalWrite(pin6,HIGH); } //we initialize to stop with all LOWs above if(command=='s') command = 's'; //dummy statement }//end if(serial) }//end Loop() This project is based on Ujash Patel's book: "Arduino + Visual Basic 6.0: Make your own software to control Arduino Robot" . Amazon.com Kindle Edition.
  2. This site gives the MPXV7002DPT1 as an alternative to the MPXV7002DP see: https://www.apogeeweb.net/circuitry/mpxv7002dp-transducer-datasheet-features-pinout.html#product-overview This one has a list of exact alternatives also: https://www.newark.com/nxp/mpxv7002dpt1/pressure-sensor-2-to-2kpa-sop/dp/28X3717
  3. The 2sc5200 is a large "High-Fidelity Audio Output Amplifier" it would be used as the last stage in a mullti-transistor amplifier. What is the input in to your amplifier? Consider using an op amplifier that would give you a simple amplifier that could use a low level input and give you 5 watts or more output. The LM383/TDA2002 is an 8 watt power amplifier that uses 5 capacitors and 2 resistors. You can drive a 4 ohm speaker directly with It. As it is an old op amp you may find a more modern version of it. The LM383 is available on Ebay.
  4. You can find information on the subject at the NI subforum: https://forums.ni.com/t5/Instrument-Control-GPIB-Serial/bd-p/140?profile.language=en The NI discussion forum starts here: https://forums.ni.com/t5/Discussion-Forums/ct-p/discussion-forums?profile.language=en
  5. You can use the 1N5408 in place of the 1N5404 and you can use the 1N5404 in place of the 1N5408 if the voltage is less than a peak reverse voltage of 400 volts.
  6. Can you copy this code and paste it into the IDE and get it to compile? Be sure to select nano in the IDE tools->board = "Arduino Nano". This is for an ultrasonic device but for testing you do not need the device: #define trigPin 9 #define echoPin 10 long duration; int distance; long firstoff; int distancefirst; void setup() { Serial.begin(9600); pinMode(trigPin, OUTPUT); pinMode(echoPin, INPUT); delay(1000); digitalWrite(trigPin, HIGH); delayMicroseconds(10); digitalWrite(trigPin, LOW); firstoff = pulseIn(echoPin, HIGH); distancefirst = firstoff*0.034/2; // cm digitalWrite(trigPin, LOW); delayMicroseconds(2); digitalWrite(trigPin, HIGH); delayMicroseconds(10); digitalWrite(trigPin, LOW); duration = pulseIn(echoPin, HIGH); distance= duration*0.034/2; // cm //distance = duration * 0.0133 / 2; // in Serial.println(distance); delay(1000); Serial.println(distancefirst); if (distance <= distancefirst - 5) { tone(3, 500, 500); delay(500); tone(3, 800, 500); delay(500); delay(50); } } It is the first project from: https://create.arduino.cc/projecthub/projects/tags/nano
  7. Try https://search.yahoo.com/ I found all four that way!
  8. Hello everyone, good afternoon. I am new here. And I've been researching a common defect in a polk dsw pro5000 board. Whoever has the schematic diagram or gives me the list of the following components, I'm very grateful. D4 (?) C7 (?) Diodo? D5 (?) That is a 5000 not a 500? see: https://hardforum.com/threads/polk-audio-dsw-pro-500-no-power.1978149/
  9. If you download the lm3914.pdf file from TI you will see directions on how to program the current. I believe it is sinking current not supplying voltage. Also there are numerous web sites on how to build an LM3914 dot/bar display driver circuit. See: https://www.ti.com/product/LM3914 For others; this is what it looks like:
  10. This works well in the simulator using the transistors shown:
  11. Making your R1 2000 ohms from 1000 ohms improves the output with slightly less output power. What do you expect for output power and what do you have for input voltage? Also the transistors are large current perhaps some thing smaller? The circuit you are using has a base current of about 1.8 ma for the 2SC5200 at 150 mv peak input that is quite low.
  12. The circuit below is similar to what you want to do. Using a 4 input NAND gate you can connect it to the 4 outputs that represent the valve you want. Your NAND gate output would connect to the clr line.
  13. The output looks good in the simulator at 120mv(peak to peak) the current through the 8 ohm resistor is about 500ma pp which is about 1 watt. At 150mv the output is starting to clip on the bottom. This is do to the PNP Q3 having more base current than Q2. Q3 is directly connected to Q1 while Q2 is off from Q1 by the two diodes or 2 * 0.7 volts I would think. The base currents; green is Q3 and yellow is Q2. I like this circuit better as it is symmetrical; both transistor get the same amount of base current I would think.
  14. So you have a double pole single throw switch. There are two sets of contacts in the switch. Two of the connectors connects to one set of contacts and the other pair of connectors connect to the other set of contacts. You need to know which pair of connectors connects to each set of contacts. I believe.
  15. Do you have a number/ID for the 4 pole switch?
  16. Using what I could find for similar transistors in the simulator I used your circuit: Green trace is the current through the NPN and yellow the PNP. The current through the 8 ohm load looks good inspite of the asymmetry in the transistor currents. Connecting the PNP between the two diodes removes the asymmetry but changes the output current:
  17. What are you connecting it to? Perhaps the impedance is to low?
  18. see "Simple Way to Fix Out of sync stepper motors" at: https://www.youtube.com/watch?v=U_RiwMSG9rE
  19. Good quality and cheap price do not go together. I buy cheap from Ebay but not always good. I buy some from Amazon.com because I have prime and can get things quickly. Jameco.com is a good hobbies supplier but they are on the west coast and I am on the east so delivery is slow; also digikey.com is high quality but to slow for me.
  20. I believe what you are looking for is an Automatic Transfer Switch. see: https://en.wikipedia.org/wiki/Transfer_switch see examples at: https://www.amazon.com/s?k=automatic+transfer+switch+solar&crid=3KACGYWUM874&sprefix=Automatic+Transfer+Switch+%2Cautomotive%2C514&ref=nb_sb_ss_ts-doa-p_6_26
  21. The 5 relays on the board are single pole - single throw. You wish to expand the number of contacts with you switch? What type are the switches? You mention schematics? Where does the latching come in?
  22. Looks like you will have will have to draw it out yourself. If you have photoshop or The GIMP you can use the photographs and lay one (as a transparent layer) over the other; that helps. Else buy a new one: https://www.ebay.com/itm/283527434087?hash=item42038d4f67:g:unQAAOSwh4ZfImWk
  23. I lost my modem so I am down until this weekend or Monday. I will help answer questions then. I am using the library's wi-fi today.
  24. I wonder if you could gleam some useful information from this article; it's for the CS5464. https://corgitronics.com/2014/06/30/using-the-cirrus-logic-cs5464-for-ac-current-measurement/
  25. Try https://github.com/stamp/CS5484.git At on clicking the [code} button see download ZIP I see I am now Rank: Newbie(1/14). Does that mean all my past sins have been forgotten?
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.