Notifications
Clear all

Analog to Digital Converters Overload???

57 Posts
4 Users
35 Likes
4,176 Views
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 7028
 

@inq I would imagine the hardware manufacturer specs might have the max allowable voltage specified somewhere.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
Inq
 Inq
(@inq)
Member
Joined: 2 years ago
Posts: 1900
Topic starter  
Posted by: @zander

@inq Ok, that's a little on the small size then but maybe not if you are close to the equator. Half my load is the residential refrigerator. It is one of the modern digital inverter types, but still consumes 1.5kWh's per day. For boondocking under normal (no furnace) conditions and no sun I can probably last 5 to 7 days.

I'm certainly closer to the equator than you.  😆 

As I mentioned, this boat is closer to a pop-up camper than yours probably being a plush motor coach.  My boat came from the factory with a 12V car starter battery to start the motor that was also hooked up to supply house voltage.  It came with a grand total of 5 internal car-type dome incandescent light bulbs along with the external boat marker lights (also incandescent).  You could not use even those for too long without drawing down the batter too far to start the motor so you could re-charge the battery.

As my boat is now configured (far above the norm usually modified) I have all LED lighting in and out and an electric chest fridge/freezer that if I set to fridge only mode, only averages using 15 Wh/hour in Florida summer heat.

I can easily sail and not use the motor for over a week without seriously taxing the battery.  I've purchased two 200W solar panels that should easily keep me off the motor.  

I've haven't tried it on the battery yet, but I purchased a 1200W induction stove top and an Induction Microwave that should be able to run off the Inverter.  Just not at the same time.  😋 

3 lines of code = InqPortal = Complete IoT, App, Web Server w/ GUI Admin Client, WiFi Manager, Drag & Drop File Manager, OTA, Performance Metrics, Web Socket Comms, Easy App API, All running on ESP8266...
Even usable on ESP-01S - Quickest Start Guide


   
Ron and Inst-Tech reacted
ReplyQuote
Inq
 Inq
(@inq)
Member
Joined: 2 years ago
Posts: 1900
Topic starter  
Posted by: @zander

@inq I would imagine the hardware manufacturer specs might have the max allowable voltage specified somewhere.

I tried, but haven't found anything yet.  You see... the A0 pin on the ESP8266 itself is only good from 0 to 1.0V.  The different manufacturers using it... WeMos, NodeMCU "typically" have a voltage divider in it so that you can hook up to their board with the standard 0 to 3.3V.  But they don't give any specs on the voltage divider.

3 lines of code = InqPortal = Complete IoT, App, Web Server w/ GUI Admin Client, WiFi Manager, Drag & Drop File Manager, OTA, Performance Metrics, Web Socket Comms, Easy App API, All running on ESP8266...
Even usable on ESP-01S - Quickest Start Guide


   
Inst-Tech reacted
ReplyQuote
Inst-Tech
(@inst-tech)
Member
Joined: 2 years ago
Posts: 554
 

@zander It's always advisable to put disconnects on the high side to isolate a voltage potential from possible shock.. as in most case, the negative lead is referenced to ground potential , so there is no possibility of shock, Unless it is a floating ground. ground potential varies somewhat, as you can drive a copper rod into the ground, and then drive another one a 100 feet away, and measure a voltage from one to the other, that too can be milli volts to several volts... I've even seen it more that 30 volts between two ground grid systems in the field..This is why we tied all our wire cable shield to the same ground plane.

Our Control systems triad ground grid system was common for all signal wires coming from, and going to the field. 

So, to answer your question..disconnects should be on the hot side of the circuit..

LouisR


   
Inq reacted
ReplyQuote
Inq
 Inq
(@inq)
Member
Joined: 2 years ago
Posts: 1900
Topic starter  
Posted by: @inst-tech

I've even seen it more that 30 volts between two ground grid systems in the field..This is why we tied all our wire cable shield to the same ground plane.

Are you saying I might could put to stakes at opposite places on my property and power something off the Earth?  Cool! 😎 

3 lines of code = InqPortal = Complete IoT, App, Web Server w/ GUI Admin Client, WiFi Manager, Drag & Drop File Manager, OTA, Performance Metrics, Web Socket Comms, Easy App API, All running on ESP8266...
Even usable on ESP-01S - Quickest Start Guide


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 7028
 

@inst-tech That is what I have and don't understand the people who recommend otherwise. This is in the RV world and the frame is often used as the return/-ve side of 12VDC. 

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
Inst-Tech reacted
ReplyQuote
Inst-Tech
(@inst-tech)
Member
Joined: 2 years ago
Posts: 554
 

@inq I found this in my research on the voltage tolerance of the ESP8266 AO pin..

"A NodeMCU already has a voltage divider built-in,
so you shouldn't use that voltage detection module (which also has a voltage divider).

Analogue input voltage of a NodeMCU, because of that built-in 220k:100k divider is about 0-3.2volt.
You should just use a single resistor between that voltage source and A0.
Value of that resistor should be 100k for every volt more than 3.2volt.
So for 15volt >> 15-3.2 = 11.8 * 100k = ~1200k (1.2Megohm).
Leo.."

So it looks to me that 100k ohm in series with the source battery voltage of 4.2V should work, as the A0 pin has very high input impedance..

regards,

LouisR

LouisR


   
Inq reacted
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 7028
 

@inst-tech Something doesn't look right to my eye. Try the math again with a max supply of 4.2V and nwhat is the assumption on current, ZI would assume 10 to 20 ma.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
Inst-Tech reacted
ReplyQuote
Inst-Tech
(@inst-tech)
Member
Joined: 2 years ago
Posts: 554
 

@zander That would be under the classification of a floating ground as your chassis isn't grounded..and no, you probably couldn't power anything from two stakes in the ground because the internal resistance would be to great and current in nano amps...lol

Best thing to do, is follow the manuf. guidelines, mostly because of warranty issues.. In the industrial world, we do things a little differently because of all the intrinsic hazards that we face with combustible chemicals, gases, and the like.. in those case, explosions are real.. and have very large consequences..so we take all the necessary precautions.  

regards,

LouisR   

LouisR


   
ReplyQuote
Inq
 Inq
(@inq)
Member
Joined: 2 years ago
Posts: 1900
Topic starter  

No guts... no glory!  😉 

Since I couldn't find anything about WeMos A0 voltage tolerance... AND... I accidentally did 3.6V on it with the last experiment, I decided to offer up the WeMos to the Smoke gods.

  1. Started out just hooking the battery shield to the WeMos.
  2. Then used the bench power supply to do 3.0 volts to see if I have the Sketch right.
  3. The Sketch reported back analogRead() of 966 => 3.11 Volts (4% Error)

I then hooked up the two stepper motors and wrote the Sketch to do their maximum speed.  I got 18 rpm.  The Internets says, their max speed is 10-15 rpm.  Although they're not loaded up trying to push a robot, they're pulling 0.6 Amps.

I now have it in a run-down test.  I should have calculated a theoretical time as I set the History meter for only one hour.  I was thinking I would be happy if it could run for one hour.  It blew through that easily... with the Voltage still showing above the nominal 3.7V.

rundown

 

3 lines of code = InqPortal = Complete IoT, App, Web Server w/ GUI Admin Client, WiFi Manager, Drag & Drop File Manager, OTA, Performance Metrics, Web Socket Comms, Easy App API, All running on ESP8266...
Even usable on ESP-01S - Quickest Start Guide


   
Inst-Tech reacted
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 7028
 

@inst-tech As I did when working as an industrial electrician. I had those special meter probes practically glued to my fingertips and checked everything, even ground to frame. when dealing with voltages that end in kVA you can't be too careful.

I just went outside and metered the AC side. The frame is connected to the neutral as I get 120V hot to frame, hot to neutral, hot to round receptacle ground. I thought it would have to since we have GFI's on board.

I don't think the DC side should use the frame, but that might be just me.

I made my own test rig, even though I have an autoformer with replaceable surge protector and EMS with EPO and replaceable surge protector. (just had the autoformer module replaced under warranty a month ago). The test rig and the EMS will tell me if the post I was going to plug into had a hot and neutral reversed. If ground is bonded to neutral then the RV frame is now hot, and if the utility has ground tied to THE ground, standing at the RV and touching metal now completes the path. I know of it happening a few times, but luckily in each case no contact with the earth was made due to shoes and a catastrophe was avoided. Some call this 'hot skin' (named after airstream aluminium trailers) but I don't. A friend lives under power lines and has hor skin due to the interaction of the power lines and his metal trailer. That is mostly harmless, the hot neutral/ground is NOT.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
Inst-Tech reacted
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 3 years ago
Posts: 7028
 

@inq So what was the max V seen by A0?

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
Sure you can learn to be a programmer, it will take the same amount of time for me to learn to be a Doctor.


   
ReplyQuote
Inq
 Inq
(@inq)
Member
Joined: 2 years ago
Posts: 1900
Topic starter  
Posted by: @inst-tech

@inq I found this in my research on the voltage tolerance of the ESP8266 AO pin..

"A NodeMCU already has a voltage divider built-in,
so you shouldn't use that voltage detection module (which also has a voltage divider).

Analogue input voltage of a NodeMCU, because of that built-in 220k:100k divider is about 0-3.2volt.
You should just use a single resistor between that voltage source and A0.
Value of that resistor should be 100k for every volt more than 3.2volt.
So for 15volt >> 15-3.2 = 11.8 * 100k = ~1200k (1.2Megohm).
Leo.."

So it looks to me that 100k ohm in series with the source battery voltage of 4.2V should work, as the A0 pin has very high input impedance..

regards,

LouisR

I knew about the boards using the ESP8266 (WeMos and NodeMCU) had voltage dividers, I hadn't found the details you were able.  That will be great information for other projects.  

As you can see from my last post, I tried it anyway.  Would it be fair to say that the 100k resistor just brings the 4.2V down so it can be within the A2D measuring range?  ... and not for voltage "safety" of the A2D?  Even free Harbor Freight volt meters just show zero when you go over the selected range.

I don't have any smoke, it doesn't feel warm to the touch and it's been running for over two hours.  

Can I get that reference from you?  I'd like to add it to my cheat sheets or I'll forget your equations.

VBR,

Inq

3 lines of code = InqPortal = Complete IoT, App, Web Server w/ GUI Admin Client, WiFi Manager, Drag & Drop File Manager, OTA, Performance Metrics, Web Socket Comms, Easy App API, All running on ESP8266...
Even usable on ESP-01S - Quickest Start Guide


   
Inst-Tech reacted
ReplyQuote
Inq
 Inq
(@inq)
Member
Joined: 2 years ago
Posts: 1900
Topic starter  
Posted by: @zander

@inq So what was the max V seen by A0?

The first test completed.  As I hoped it lived just fine between the 4.2V and finally into the range that it could handle below 3.3V.  As the A0 pin is a 10 bit A2D, and the nominal voltage is 3.3V, analogRead() always return 1024 while the voltage was above 3.3V.  It was perfectly clipped as one would expect.

I also learned:

  1. That the LiIon battery dropped off like a rock below 3.3V.  In fact, I want to run another discharge test to use a different time scale.
  2. That the Battery shield cuts out at 2.5V so the battery is protected from over discharge.
1st Test

3 lines of code = InqPortal = Complete IoT, App, Web Server w/ GUI Admin Client, WiFi Manager, Drag & Drop File Manager, OTA, Performance Metrics, Web Socket Comms, Easy App API, All running on ESP8266...
Even usable on ESP-01S - Quickest Start Guide


   
Inst-Tech reacted
ReplyQuote
Inq
 Inq
(@inq)
Member
Joined: 2 years ago
Posts: 1900
Topic starter  
Posted by: @inst-tech

Analogue input voltage of a NodeMCU, because of that built-in 220k:100k divider is about 0-3.2volt.
You should just use a single resistor between that voltage source and A0.

I think I want to fiddle with your technique.  The drop-off from 3.3V to the shield cutting off, is just two short and I'm not really loading up the motors.  

Seven minutes is just not enough notice.  I may eventually want to make it hunt for the charger like a Roomba.

2nd Test

3 lines of code = InqPortal = Complete IoT, App, Web Server w/ GUI Admin Client, WiFi Manager, Drag & Drop File Manager, OTA, Performance Metrics, Web Socket Comms, Easy App API, All running on ESP8266...
Even usable on ESP-01S - Quickest Start Guide


   
Inst-Tech reacted
ReplyQuote
Page 2 / 4