How to Monitor Classic 200SL

Started by justinbowser, April 16, 2020, 12:32:42 PM

Previous topic - Next topic

justinbowser

OK, I'm trying to wrap my head around this and am a little confused.  I take it I need to order a ESP-WROOM-32 ESP32-S Development Board and an RS232 board.  Will the following work?

Serial module - https://smile.amazon.com/Anmbest-Converter-Connector-Raspberry-Microcontrollers/dp/B081T8P395

ESP32 Dev Module - https://smile.amazon.com/dp/B0718T232Z

Is there no Arduino board needed as a controller?
Justin B. - KI5GKD
Classic 200SL, 2.9 KW of Mission Solar panels
Samlex PST-1500-24W inverter
Specialized Power Systems 800 AH 24 V LiFePO4 battery bank (4x200)

ClassicCrazy

#16
Quote from: justinbowser on May 13, 2020, 11:36:36 AM
OK, I'm trying to wrap my head around this and am a little confused.  I take it I need to order a ESP-WROOM-32 ESP32-S Development Board and an RS232 board.  Will the following work?

Serial module - https://smile.amazon.com/Anmbest-Converter-Connector-Raspberry-Microcontrollers/dp/B081T8P395

ESP32 Dev Module - https://smile.amazon.com/dp/B0718T232Z

Is there no Arduino board needed as a controller?

I think you have it right .
The only thing to double check when you get it is that the GPIO pins are the same on your ESP32 board as the one in the documentation . I think it will be but some Esp32 boards could have pins in different positions  but that one should be the same as in documentation. ( edit - I see on Amazon page they show the pinouts and that board is different positions where the pins are from the one in wiki below. It will work but you need to make sure you hook up to the correct pins)
Did you see this  info page ?
https://github.com/ClassicDIY/ModbusAdapter
Keep us posted on how it goes .  I have the things to try this - but haven't had time - plus I have regular Classic so no hurry on it for me.

Larry
system 1
Classic 150 , 5s3p  Kyocera 135watt , 12s Soneil 2v 540amp lead crystal for 24v pack , Outback 3524 inverter
system 2
 5s 135w Kyocero , 3s3p 270w Kyocera  to Classic 150 ,   8s Kyocera 225w to Hawkes Bay Jakiper 48v 15kwh LiFePO4 , Outback VFX 3648 inverter
system 3
KID / Brat portable

justinbowser

Larry,

Thanks, yes, I looked over that page but didn't see any mention of a controller even though there is a section for code.  I am used to doing stuff like this with an Arduino but I'm at the deep end of the pool with this!

I am back at our off-grid cabin but did not bring any of my Arduino prototyping stuffs with me so i need to figure out exactly what I need so I can order it.

Arduino?
ESP32
Serial module
RJ11 cable
Misc wire, etc.
Justin B. - KI5GKD
Classic 200SL, 2.9 KW of Mission Solar panels
Samlex PST-1500-24W inverter
Specialized Power Systems 800 AH 24 V LiFePO4 battery bank (4x200)

ClassicCrazy

you dont' need the arduino . you program the esp32 using a micro usb to usb cable like most phones use these days.  I forget but I think you need to hold down one of the buttons when you flash it with the code. I wrote what I did to flash esp32 in the forum on Grahams Classic Android app - I think that is where . There is an easy to use flash utility to flash it . I have to run back outside now but will have to look at the wiki for that project again  later.

Larry
system 1
Classic 150 , 5s3p  Kyocera 135watt , 12s Soneil 2v 540amp lead crystal for 24v pack , Outback 3524 inverter
system 2
 5s 135w Kyocero , 3s3p 270w Kyocera  to Classic 150 ,   8s Kyocera 225w to Hawkes Bay Jakiper 48v 15kwh LiFePO4 , Outback VFX 3648 inverter
system 3
KID / Brat portable

justinbowser

Larry,

Thanks.  I have ordered the ESP32, Serial module, RJ11 cable, DB9, and some jumpers.  Should be here in about a week.

Justin B.
Justin B. - KI5GKD
Classic 200SL, 2.9 KW of Mission Solar panels
Samlex PST-1500-24W inverter
Specialized Power Systems 800 AH 24 V LiFePO4 battery bank (4x200)

ClassicCrazy

Quote from: justinbowser on May 13, 2020, 08:07:11 PM
Larry,

Thanks.  I have ordered the ESP32, Serial module, RJ11 cable, DB9, and some jumpers.  Should be here in about a week.

Justin B.
Justin
Great - you should have your monitoring going soon.
I found the post I made where I flashed the Esp32 . Take a look here
http://midniteftp.com/forum/index.php?topic=4817.msg44671#msg44671
I was having trouble until I figured out I need to hold the button in. Some Esp32 boards you might  not need to hold that button in. I used Platformio to flash it, but the flash utility tool Graham talks about in the wiki will be the easiest . I have used that for other Esp stuff before.  The Arduino IDE programmer would work too if you added the  EspBoards libraries to it.
Graham has excellent step by step documentation on this page so let us know if you have any problems getting it going.
https://github.com/ClassicDIY/ModbusAdapter/wiki

Larry
system 1
Classic 150 , 5s3p  Kyocera 135watt , 12s Soneil 2v 540amp lead crystal for 24v pack , Outback 3524 inverter
system 2
 5s 135w Kyocero , 3s3p 270w Kyocera  to Classic 150 ,   8s Kyocera 225w to Hawkes Bay Jakiper 48v 15kwh LiFePO4 , Outback VFX 3648 inverter
system 3
KID / Brat portable

justinbowser

Larry,

Duh, I feel dum dumb!  I looked over everything on the github page except the WIKI!  Looking at the board inputs do I need to supply iot with both 5V and 3.3V?  Can these voltages be easily tapped off the Classic or do I need to use a wall-wart or power supply?

Thanks for your help on this and hopefully I will be able to monitor this thing in a few weeks and then turn off "Chatty Kathy!"  I don't think my wife doesn't like how she says, "We're going to be best friends..."

Justin B. - KI5GKD
Classic 200SL, 2.9 KW of Mission Solar panels
Samlex PST-1500-24W inverter
Specialized Power Systems 800 AH 24 V LiFePO4 battery bank (4x200)

ClassicCrazy

yeah I turned off Chatty Cathy long time ago -some of sound effects would sometimes make me jump.

The way I am seeing the wiring on the wiki you need to power the Esp32 with the micro usb port ( which is 5v ) and then you are taking the 3.3v from the Esp32 to power the RS232 converter.  The 3.3v doesn't need a separate supply - it is converted on the board from the 5v input.
I am not sure if there is 5v output available on the Classic.  If your battery is 12 or 24 should  be easy to use an automobile power plug to micro usb - - or there are also inexpensive buck converters available . I am always picking up cords and cables everyone tosses in electronic recycling bins so I have collected lots and use them to power my esp boards.

Larry
system 1
Classic 150 , 5s3p  Kyocera 135watt , 12s Soneil 2v 540amp lead crystal for 24v pack , Outback 3524 inverter
system 2
 5s 135w Kyocero , 3s3p 270w Kyocera  to Classic 150 ,   8s Kyocera 225w to Hawkes Bay Jakiper 48v 15kwh LiFePO4 , Outback VFX 3648 inverter
system 3
KID / Brat portable

Graham

The wiki documentation at https://github.com/ClassicDIY/ModbusAdapter/wiki can be edited by any github user, please feel free to add more detail as you see fit...

I found that some RS232 interface modules label the tx & rx inconsistently. Some have tx to represent pin 2 (tx) of the db9 connector and some label it as rx since it receives data from the ESP device. Very confusing!

If you use the one from Canakit as described on the github page, then GPIO16(RX) goes to RX of the adapter and GPIO17(TX) goes to TX.

Graham.
Off-Grid Island cottage, Lac Simon QC Canada
370 Ahrs @ 24V (4 8L16 batteries)
4 x 250watt panels on dual axis trackers http://tinyurl.com/hfpkgr5
Classic 150, Whizbang Jr.
Android Monitor: http://tinyurl.com/lomzq3s

justinbowser

I ordered a couple of DC-DC variable converters so should have the power situation covered.  You're right, a couple of the sound effects made me a little twitchy the first time they surprised me!
Justin B. - KI5GKD
Classic 200SL, 2.9 KW of Mission Solar panels
Samlex PST-1500-24W inverter
Specialized Power Systems 800 AH 24 V LiFePO4 battery bank (4x200)

ClassicCrazy

I am putting this project  together . ( rain day here which we needed )
Just flashed the ModbusAdapter using the flash tool provided - couldn't be easier. The only thing I had to make sure of was the right serial port for my ESP32 which I did using Device manager - unplugged Esp32  and saw which one disappeared because I have a few ports being used.  I held down Boot button on my Esp32 and flashed with tool and waited till it was done and then let go of boot button and pressed the other button to reset. I was able to see the Esp32 on my Wifi but instead of connecting to it with computer and setting up that way , I used the Wifi setup on the flash tool . I didn't need to hold the boot button in - just did the wifi setup and entered my wifi ssid and password and it worked. 

Now on to doing the wiring from esp to the RS232 converter and to plug for Classic.

Larry
system 1
Classic 150 , 5s3p  Kyocera 135watt , 12s Soneil 2v 540amp lead crystal for 24v pack , Outback 3524 inverter
system 2
 5s 135w Kyocero , 3s3p 270w Kyocera  to Classic 150 ,   8s Kyocera 225w to Hawkes Bay Jakiper 48v 15kwh LiFePO4 , Outback VFX 3648 inverter
system 3
KID / Brat portable

ClassicCrazy

Quote from: Graham on May 16, 2020, 08:10:41 AM
The wiki documentation at https://github.com/ClassicDIY/ModbusAdapter/wiki can be edited by any github user, please feel free to add more detail as you see fit...

I found that some RS232 interface modules label the tx & rx inconsistently. Some have tx to represent pin 2 (tx) of the db9 connector and some label it as rx since it receives data from the ESP device. Very confusing!

If you use the one from Canakit as described on the github page, then GPIO16(RX) goes to RX of the adapter and GPIO17(TX) goes to TX.

Graham.

I am checking out the wiring since I am planning on using the MNGP port because the other two ports won't work since they are in Follow Me mode.  The wiring for the top port is different. Also wondering if the 9v there could be used as power source via converter to power the Esp32 ?
Here is from the manual.  But I have to look back at my notes when I used the bottom jack to see if the manual is correct -it shows different from the other two ports but I think the MNGP works in any of the ports ( though without LED backlight )

Larry
system 1
Classic 150 , 5s3p  Kyocera 135watt , 12s Soneil 2v 540amp lead crystal for 24v pack , Outback 3524 inverter
system 2
 5s 135w Kyocero , 3s3p 270w Kyocera  to Classic 150 ,   8s Kyocera 225w to Hawkes Bay Jakiper 48v 15kwh LiFePO4 , Outback VFX 3648 inverter
system 3
KID / Brat portable

ClassicCrazy

#27
I got the hardware wired up - will give a try tomorrow. I wired it according to top jack pinout . In the photo below was a power converter board I had laying around so I am going to try and use the 9v from the top jack to the converter board which converts to 5v and has standard usb jack . I will use regular usb to micro usb cord from that to the esp32 for power.
Hopefully it all works - find out tomorrow or whenever I get to it.
update ( I fixed one wiring mistake in the photo, then made another one because I looked at the bottom port wiring diagram instead of top  - had it right the first time so three times the charm) 1:30am soldering !
Larry
system 1
Classic 150 , 5s3p  Kyocera 135watt , 12s Soneil 2v 540amp lead crystal for 24v pack , Outback 3524 inverter
system 2
 5s 135w Kyocero , 3s3p 270w Kyocera  to Classic 150 ,   8s Kyocera 225w to Hawkes Bay Jakiper 48v 15kwh LiFePO4 , Outback VFX 3648 inverter
system 3
KID / Brat portable

Graham

If you have any issues, you can test your serial connection on a pc if you have a USB to RS232 adapter like this https://www.newegg.ca/p/N82E16812203018?item=N82E16812203018&source=region&nm_mc=knc-googleadwordsca-pc&cm_mmc=knc-googleadwordsca-pc-_-pla-_-cables+-+serial+cables-_-N82E16812203018&gclid=CjwKCAjw5Ij2BRBdEiwA0Frc9Te4N5aS_ayeVwhO9of5PZkk6DRLMbk-lQj7lN3ZKBsX4SyFbTA0exoC48YQAvD_BwE
you can verify the serial modbus communication using my modbusTool https://github.com/ClassicDIY/ModbusTool using the Modbus Master in RTU mode, select the com port of the USB adapter and connect, you should be able to 'Read Holding Registers' with start address 4100. (don't forget to set the slaveID to what you have your classic set to, default is 10)

Graham.
Off-Grid Island cottage, Lac Simon QC Canada
370 Ahrs @ 24V (4 8L16 batteries)
4 x 250watt panels on dual axis trackers http://tinyurl.com/hfpkgr5
Classic 150, Whizbang Jr.
Android Monitor: http://tinyurl.com/lomzq3s

ClassicCrazy

Graham ,
I got the Esp32 talking to the computer via wireless but must not have something right on the connection to the Classic because no data is showing up. I did try flipping the tx rx wires.  I also gave up powering the ESP32 from the 9v on jack - I think it might not have had enough current to run esp wifi.
Well I had a few problems - because I started this last night and then when I was first plugged in and trying to connect I tried reflashing when I did not see it show up on router today. Flashing was working but something not right - finally saw the Flash Tool defaulting to the other espfile for other project - it had the same name but different location.
Did you ever resolve the Follow Me errors on lower port or does follow me have to be off for this to work ? Reason I ask is because I have a serial cable wire coming inside from project a year or two ago and it already has rs232 on it. It would be nice to work inside to debug this instead of having to run out to shed all the time and now I need to get laptop charged up to figure out if my cable to top jack on Classic 2 in follow me will work okay on modbus. That is what I will be trying next time I get back at this. I guess

Larry
system 1
Classic 150 , 5s3p  Kyocera 135watt , 12s Soneil 2v 540amp lead crystal for 24v pack , Outback 3524 inverter
system 2
 5s 135w Kyocero , 3s3p 270w Kyocera  to Classic 150 ,   8s Kyocera 225w to Hawkes Bay Jakiper 48v 15kwh LiFePO4 , Outback VFX 3648 inverter
system 3
KID / Brat portable