MCP23017 question
Moderators: grovkillen, Stuntteam, TD-er
- Sasch600xt
- Normal user
- Posts: 164
- Joined: 10 Sep 2018, 16:37
MCP23017 question
Hello all
may i have a probably dumb question but i cant find the answere.
i need to send out 4 analog values from ESP (0-3.3V / 0-255)
I have a MCP23017 connected to ESP.
Can i do it with a MCP ?
And if yes, how would the syntax look like ?
If NO, is there a way to get 4 analog output pins working with ESP (like a "analog output port expander") ?
See ? Dumb question
Thanks for help
Sascha
may i have a probably dumb question but i cant find the answere.
i need to send out 4 analog values from ESP (0-3.3V / 0-255)
I have a MCP23017 connected to ESP.
Can i do it with a MCP ?
And if yes, how would the syntax look like ?
If NO, is there a way to get 4 analog output pins working with ESP (like a "analog output port expander") ?
See ? Dumb question
Thanks for help
Sascha
"the flat earth society has members all around the globe"
- budman1758
- Normal user
- Posts: 301
- Joined: 15 Apr 2017, 05:13
- Location: Riverside CA USA
Re: MCP23017 question
Methinks the best way is to use an ADS1115 A-D Converter chip. MCP23017 is only for on,off or pulse stuff.
No such thing as a dumb question. Nobody falls out of their mama knowing everything.
No such thing as a dumb question. Nobody falls out of their mama knowing everything.
"The glass is twice as big as it needs to be".
Re: MCP23017 question
ADS is an AD.
In this case the question is for an DA output stage.
I am also interested if anybody has the answer.
In this case the question is for an DA output stage.
I am also interested if anybody has the answer.
Belgium and land of ESP ... counting
- budman1758
- Normal user
- Posts: 301
- Joined: 15 Apr 2017, 05:13
- Location: Riverside CA USA
Re: MCP23017 question
What is the source of these values? How does the ESP get the values in the first place?
"The glass is twice as big as it needs to be".
- Sasch600xt
- Normal user
- Posts: 164
- Joined: 10 Sep 2018, 16:37
Re: MCP23017 question
i want to send MQTT Messages to the ESP.
like:
http://192.168.123.45/control?cmd=ANALOG_OUT,1,255
http://192.168.123.45/control?cmd=ANALOG_OUT,2,127
http://192.168.123.45/control?cmd=ANALOG_OUT,3,0
http://192.168.123.45/control?cmd=ANALOG_OUT,4,200
this sends the value to a 4ch dimmer (0-3.3volt expected)
So lets google for a ADS1115 A-D Converter chip
Is there a plugin already for ESP Easy ?
Thank you all for your Help
Sascha
like:
http://192.168.123.45/control?cmd=ANALOG_OUT,1,255
http://192.168.123.45/control?cmd=ANALOG_OUT,2,127
http://192.168.123.45/control?cmd=ANALOG_OUT,3,0
http://192.168.123.45/control?cmd=ANALOG_OUT,4,200
this sends the value to a 4ch dimmer (0-3.3volt expected)
So lets google for a ADS1115 A-D Converter chip
Is there a plugin already for ESP Easy ?
Thank you all for your Help
Sascha
"the flat earth society has members all around the globe"
- budman1758
- Normal user
- Posts: 301
- Joined: 15 Apr 2017, 05:13
- Location: Riverside CA USA
Re: MCP23017 question
Not sure you need the ADS1115 here as I am still a bit confused as to what the ESP is actually doing here. You say you want to send these analog values TO the ESP. I assume they then go out to a dimmer of some sort?
Maybe a picture or a diagram or schematic would be helpful.
Maybe a picture or a diagram or schematic would be helpful.
Last edited by budman1758 on 02 Mar 2019, 22:18, edited 1 time in total.
"The glass is twice as big as it needs to be".
- Sasch600xt
- Normal user
- Posts: 164
- Joined: 10 Sep 2018, 16:37
Re: MCP23017 question
http command ---> ESP Easy -----> 4 times analog 0-3.3Volt out ------> 4 CH Dimmer
I see the ADS1115 is for analog INPUT, but i need to have analog OUTPUT.
I see the ADS1115 is for analog INPUT, but i need to have analog OUTPUT.
"the flat earth society has members all around the globe"
- budman1758
- Normal user
- Posts: 301
- Joined: 15 Apr 2017, 05:13
- Location: Riverside CA USA
Re: MCP23017 question
I think what you need to do is convert PWM output to a voltage.
See this for inspiration.
https://www.instructables.com/id/Analog ... o-Voltage/
See this for inspiration.
https://www.instructables.com/id/Analog ... o-Voltage/
"The glass is twice as big as it needs to be".
- Sasch600xt
- Normal user
- Posts: 164
- Joined: 10 Sep 2018, 16:37
- Sasch600xt
- Normal user
- Posts: 164
- Joined: 10 Sep 2018, 16:37
Re: MCP23017 question
Now another question
i dont understand in doku:
MCPPulse,<pin>,<value>,<duration> 1,0 Pulse control on MCP23017 output pins (duration in mS, MILLIseconds)
so how would a http command look like for MCP port 1 with a pwm of 127 ( i assume value can be from 0-255) ?
Thank you so much
Sascha
i dont understand in doku:
MCPPulse,<pin>,<value>,<duration> 1,0 Pulse control on MCP23017 output pins (duration in mS, MILLIseconds)
so how would a http command look like for MCP port 1 with a pwm of 127 ( i assume value can be from 0-255) ?
Thank you so much
Sascha
"the flat earth society has members all around the globe"
- budman1758
- Normal user
- Posts: 301
- Joined: 15 Apr 2017, 05:13
- Location: Riverside CA USA
Re: MCP23017 question
I'm not sure the MCP23017 supports PWM. That's a question for the devs. Some of the native ESP GPIO support PWM. Might be easier to use those.
Or a dedicated PWM output chip module.
Or a dedicated PWM output chip module.
"The glass is twice as big as it needs to be".
- Sasch600xt
- Normal user
- Posts: 164
- Joined: 10 Sep 2018, 16:37
Re: MCP23017 question
i have a PCA9685 here and i will try one of those
"the flat earth society has members all around the globe"
- Sasch600xt
- Normal user
- Posts: 164
- Joined: 10 Sep 2018, 16:37
Re: MCP23017 question
i do not get a signal out of the PCA9685 ?
It shows up after "scan for i2C device".
So i try:
http://192.168.123.45/control?cmd=PCAPWM,1,4095
and get:
{
"log": ": PWM 1",
"plugin": 22,
"pin": 1,
"mode": "PWM",
"state": -1
}
any ideas ?
Thank you for your help
It shows up after "scan for i2C device".
So i try:
http://192.168.123.45/control?cmd=PCAPWM,1,4095
and get:
{
"log": ": PWM 1",
"plugin": 22,
"pin": 1,
"mode": "PWM",
"state": -1
}
any ideas ?
Thank you for your help
"the flat earth society has members all around the globe"
Re: MCP23017 question
You can use this motor PWM like DA converter for convert digi to analog via i2c:
https://www.letscontrolit.com/wiki/inde ... 2#Hardware
So by TB 6612
https://www.letscontrolit.com/wiki/inde ... 2#Hardware
So by TB 6612
- Sasch600xt
- Normal user
- Posts: 164
- Joined: 10 Sep 2018, 16:37
Re: MCP23017 question
yes, but i have already a PCA9685 and there is a plugin for in ESP Easy.
plus budman showed a very good and very small solution to get a analog signal out of a pwm signal.
the only question right now is why does the PCA9685 not work ?
i must do something wrong here.
Thanks for help
Sascha
plus budman showed a very good and very small solution to get a analog signal out of a pwm signal.
the only question right now is why does the PCA9685 not work ?
i must do something wrong here.
Thanks for help
Sascha
"the flat earth society has members all around the globe"
Who is online
Users browsing this forum: Ahrefs [Bot] and 2 guests