Voltage from serial port




















I have created adc coding for reading analog voltage varies from 0 to 5volts. I have printed the values on serial monitor. But there are some variation occurs when reading the analog voltage.

For example, instead of getting 4. It is not unusal to get small variations in readings from an ADC. You could write some code that only prints a new value if it differs from the previous value by X. When you measure the voltage with a multimeter or better yet an oscilloscope is it completely steady? If so, maybe the connection is bad. I have posted my code here. Pls read it and tell how to avoid voltage variations and how to implement in coding. Part of the problem may be due to the ADC switching between pins.

Try reading each pin twice in succession like this. I am using 12v Sealed Lead-Acid Rechargeable battery and i used voltage divider circuit for converting 12V to 5v. If i read this value and display it on lcd there are variations I have modified the code as per your suggestion but still variations are there when reading the data on tft lcd.

Please read the first post in any forum entitled how to use this forum. To do the conversion you have to make the following modifications to the circuit pinout: 25 pin 9 pin 2 3 4 7 7 5 20 4 Modification idea: Get more current You can get a little bit more current from the circuit if you leave out the resistors R1, Rs, R3 and replace them with short piece of wire.

Other circuits Some small circuits signal input circuit I have seen have taken positive and negative supplies for simple operational amplifier circuit just by using DTR and RTS lines.

Just by driving one of them to 1 and other to 0 using suitable software routine, there are available positive and negative voltages from those pins.

That circuit is based on two standard transistors and few other components. How much you can really draw from a serial port depends on the circuit technology used in the serial port.

Here is another table how much power is available from different computers form RS port RTS line and how the load affect the available voltage. Information is collected from the RS powering articles posted to sci. Computer no load 8mA load Toshiba Laptop 8. Beware of combining pins for more output because using two pins does not necessarily give double the power. If you have only one line activated at the time there is no guarantee if the relay is activated or not if it takes more than 5 mA.

Sensitive reed relays You can drive directly a sensitive 12V reed relay that has a minimum coil resistance of Ohm. Carries data from the Data Terminal to the Data Set. Carries data from the Data Set to the Data Terminal. Data Terminal signals the Data Set to prepare for data transmission. Data Set signals to the Data Terminal about the detected carrier of another device.

Data Set signals to the Data Terminal about a detected ringing condition. All the clock signals on serial cable pins 15, 17, and 24 of the COM port pinout are for synchronous communications only.

So here is a simplified version of the serial connection pinout used on personal computers: the RS 9 pin pinout. A communications protocol has to be specified by RS Plus, RS has multiple handshaking lines to use with modems in most cases.

According to the RS standard, all data is bi-polar. And sometimes smaller voltages can be enough to achieve the ON state. In other serial port pinouts similar to RS this range can be different e. A whole lot of RS receivers can easily sense differentials of 1 V, or even less.

There are no cable length limits defined directly by the RS standard, so the main determining factor is the maximum capacitance tolerated by a compliant drive circuit. As a general rule, the critical length will be 15 m or about m provided that only low-capacitance cables were used.

In some cases, only the trial and error method can help to find the right cable to connect each pair of devices. Also, in common use are cables with a pin D-sub connector on one end and a RS 9-pin connector on the other. There is mention of the Max, but there are other possibilities as well.

For the 2. In fact, all of the Casio stuff seems to be pretty outdated with loads of dead links - the Waybackmachine is really your friend. You apparently aren't the first to have problems with the Casio devices. Fortunately, a lot of people put their efforts on the Internet where it can be found. This page says that your SF uses the same cable as a metric crap load of other Casio devices. The fuzzy picture of the adapter also gives a US patent number, which leads to this patent which includes a circuit diagram of the adapter, and which matches the one that that I linked to from the Waybackmachine.

In your place, I'd use the Waybackmachine link since it includes some notes on the parts and values used. In general, all the parts look like garden variety parts you should be able to order from any supply house. More info that you can only get from the Waybackmachine. Includes more tips on the FET and D1. For completeness, here's the circuit diagram from the patent:.

Resistor dividers would work for going from 12 V output to 6 V input, but then you run into an issue going from 6 V output to 12 V input. I've linked to a search for MAXA on digikey.

I figured that'd be easier to solder to than surface mount. Probably be easier to use a breadboard anyways though.

Sign up to join this community. The best answers are voted up and rise to the top. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams?

Learn more. Asked 6 years, 4 months ago. Active 6 years, 3 months ago. Viewed 3k times. At first glance, it may seem as an computer-related question, but please bear with me.



0コメント

  • 1000 / 1000