Have been making good progress on the Wifi enabaled controller.
It will use the UDP protocol to send comms over ports 2020 and 2021 between the computer and the controller (via Wifi of course).
The Windows App is sort of finished as well as the ASCOM driver. I have uploaded a pdf there so you can see the progress.
I created a Windows based UDP server that emulates part of the focuser protocol and that is working fine with the apps and ascom driver. Have had the server running on a different computer than the client ascom and it all works.
I just need time to finish off the documentation on the wifi controller and updating the wifi firmware etc etc.
Then some field testing on distance perhaps and possible network lag times etc. The number of bytes we are sending/receiving is quite small. On the same wifi network it is very fast!
Still a lot of work and testing to go but it is looking very promising.
Cheers
Robert
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
For those interested I would recommend holding off on any purchases of bits yet as I have not finalised ny choice of components. I am testing a number of ESP devices, some of which have external antenna capability (ESP-07v2) which would extend the range even further.
It is likely that the prototype will use a sub-board involved which holds the ESP and other stuff, with the final release probably being a new PCBwifi which would hold everything on one board (and thus be a little bigger).
I guess the protoype sub-board would mean it could be retro fitted to any existing DRV8825-HW203 PCB board.
As I said, progress but there is still a long way to go
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Have uploaded the Windows apps -
myFocuserPro2Wifi is the windows application for talking to a Wifi controller.
Now I know that we dont have a wifi controlelr yet - but I created a myUDPServer application that simulates a myFocuserPro2Wifi controller - so you can use the windows app to talk to the focuser simulator !!!!!!!!!!!!!
Updated the wifi pdf document with more details.
Been a busy day.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Major updates today. Very impressed with speed, like under 5s or less now to initialise focuser.
Can now be connected with new PCB to Serial port pins 0/1 or use the Bluetooth connection on the new PCB..
Updates to TCPSERVER, TCPCLIENT, Windows app, new pdf, ascom driver uploaded, schematics etc
I need a few more days to finish of the ESP8266 code.
Cheers
Robert
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Finally the light at the end of the tunnel has arrived. A working TCP version. I ended up coding line by line in the end, nothing I found on the net worked. I knew in my head from the gold of days of programming sockets on UNIX what should be done, but the wifi code libraries available are just awful and sparesly documented. If you have ever coded on Unix trust me, it does not help as there is no similar function to be found. So code a few lines, compile and download, watch debug output, repeat, repeat, hours pass, then finally, what a buzz to see the focuser leap into life as the last code change was done.
I should be able to release this is a few days, I need to tidy up some of the debugging and make some minor tweaks to the windows app including some error handling/timeouts when it fails to receive anything. All minor stuff.really
So where are we now? The PCB's are done. Its been tested and working with ESP-07 module. No reasons why it will not work on an ESP-01 and NodeCMU-Lua board. I have yet to test those as I am waiting on some headers . But I have full confidence its gonna work.
So, the firmware on the arduino works, the firmware on the esp8266 works, and the winapp and ascom virtually finished.
The document pdf nearly done.
At present it works on your own wifi netwrok. I will add the acess point capability so it can create it owns network and the server attach itself to that, raising issues of port fowarding setup on routers, leading migration into mDNS in the future.
There will be further work down the line in terms of OTA (over the Air) updates of either the ESP firmware or Arduino firmware........ as well as probably support for mDNS for remote locations (read other wide of the world) and reset capability (send a command and the system will reboot)
But for now, I am pretty much stuffed after working non-stop and late hours on this for the last couple of weeks. Ive been literally programming this in my sleep........
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
ESP8266 code uploaded as well as new PDF etc. I think unless there is something I have overlooked, its enough to get working! ESP8266 module recommended is the ESP-07
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
My Gawd Robert, I am impressed. Can't wait to get new workshop up and operational in the new house.
Thats the first thing I am going to incorporate 'Wifi'.
i am still waiting on the tsl237 to build MySQM too. I have everything else Inc. GPS module.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks Clive, but WiFi is a whole new level and not for the faint of heart. Its taken a long road to get this far but I am fairly confident that its good enough to release now. There are still one or two cremlins (which I can fix) but its associated with stupid user behaviour (like turning off power to the wifi unit whilst trying to send it a command - those what if tests one does)
Sorry to hear you are still waiting on the tsl237, I ordered one and it arrived in a week from parallex but then I paid a heap in shipping..
Cheers
Robert
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Am in the process of assembling the case. Attached photo shows power on/off swiitch. Just waiting for the 12V power socket, I am going to use 2, IN and OUIT, so the 12V plugs in here, and a 12V out cable goes to power the myFocuserPro2 controller!!!!
On the top of the case is the RESET button, to the right end is the Antenna and 12V LED. I have yet to decide on what cable/connector I willl use for the RXD/TXD - come to think of it I dont need GND as the 12V GND of the ESPxxx will be the same as the 12V GND on the focuser. That would work but it would mean never power them separately. Might just run 3 wires to be save (I guess a stereo socket would do on each end?
The small swicth on the side of the case at the bottom of the picture is ON/OFF program switch for normal/program-mode, so I dont have to open the case if I need to reflash with new firmware. I will probably put some velcro on the bottom of the case and attach it close to the focuser on the scope.
As part of the update to v230, I will port those changes to the Wifi project. No timeframe yet on when that might happen. Remember that the Wifi project has its own firmware, ascom driver and windows app. So the next release of the wifi will update all of those to be compliant with the newer protocol introduced at v230 of myFocuserPro2
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Have been making good progress on the Wifi enabaled controller.
It will use the UDP protocol to send comms over ports 2020 and 2021 between the computer and the controller (via Wifi of course).
The Windows App is sort of finished as well as the ASCOM driver. I have uploaded a pdf there so you can see the progress.
I created a Windows based UDP server that emulates part of the focuser protocol and that is working fine with the apps and ascom driver. Have had the server running on a different computer than the client ascom and it all works.
I just need time to finish off the documentation on the wifi controller and updating the wifi firmware etc etc.
Then some field testing on distance perhaps and possible network lag times etc. The number of bytes we are sending/receiving is quite small. On the same wifi network it is very fast!
Still a lot of work and testing to go but it is looking very promising.
Cheers
Robert
For those interested I would recommend holding off on any purchases of bits yet as I have not finalised ny choice of components. I am testing a number of ESP devices, some of which have external antenna capability (ESP-07v2) which would extend the range even further.
It is likely that the prototype will use a sub-board involved which holds the ESP and other stuff, with the final release probably being a new PCBwifi which would hold everything on one board (and thus be a little bigger).
I guess the protoype sub-board would mean it could be retro fitted to any existing DRV8825-HW203 PCB board.
As I said, progress but there is still a long way to go
Have uploaded the Windows apps -
myFocuserPro2Wifi is the windows application for talking to a Wifi controller.
Now I know that we dont have a wifi controlelr yet - but I created a myUDPServer application that simulates a myFocuserPro2Wifi controller - so you can use the windows app to talk to the focuser simulator !!!!!!!!!!!!!
Updated the wifi pdf document with more details.
Been a busy day.
Major updates today. Very impressed with speed, like under 5s or less now to initialise focuser.
Can now be connected with new PCB to Serial port pins 0/1 or use the Bluetooth connection on the new PCB..
Updates to TCPSERVER, TCPCLIENT, Windows app, new pdf, ascom driver uploaded, schematics etc
I need a few more days to finish of the ESP8266 code.
Cheers
Robert
Finally the light at the end of the tunnel has arrived. A working TCP version. I ended up coding line by line in the end, nothing I found on the net worked. I knew in my head from the gold of days of programming sockets on UNIX what should be done, but the wifi code libraries available are just awful and sparesly documented. If you have ever coded on Unix trust me, it does not help as there is no similar function to be found. So code a few lines, compile and download, watch debug output, repeat, repeat, hours pass, then finally, what a buzz to see the focuser leap into life as the last code change was done.
I should be able to release this is a few days, I need to tidy up some of the debugging and make some minor tweaks to the windows app including some error handling/timeouts when it fails to receive anything. All minor stuff.really
So where are we now? The PCB's are done. Its been tested and working with ESP-07 module. No reasons why it will not work on an ESP-01 and NodeCMU-Lua board. I have yet to test those as I am waiting on some headers . But I have full confidence its gonna work.
So, the firmware on the arduino works, the firmware on the esp8266 works, and the winapp and ascom virtually finished.
The document pdf nearly done.
At present it works on your own wifi netwrok. I will add the acess point capability so it can create it owns network and the server attach itself to that, raising issues of port fowarding setup on routers, leading migration into mDNS in the future.
There will be further work down the line in terms of OTA (over the Air) updates of either the ESP firmware or Arduino firmware........ as well as probably support for mDNS for remote locations (read other wide of the world) and reset capability (send a command and the system will reboot)
But for now, I am pretty much stuffed after working non-stop and late hours on this for the last couple of weeks. Ive been literally programming this in my sleep........
We are good to go!
ESP8266 code uploaded as well as new PDF etc. I think unless there is something I have overlooked, its enough to get working! ESP8266 module recommended is the ESP-07
My Gawd Robert, I am impressed. Can't wait to get new workshop up and operational in the new house.
Thats the first thing I am going to incorporate 'Wifi'.
i am still waiting on the tsl237 to build MySQM too. I have everything else Inc. GPS module.
Thanks Clive, but WiFi is a whole new level and not for the faint of heart. Its taken a long road to get this far but I am fairly confident that its good enough to release now. There are still one or two cremlins (which I can fix) but its associated with stupid user behaviour (like turning off power to the wifi unit whilst trying to send it a command - those what if tests one does)
Sorry to hear you are still waiting on the tsl237, I ordered one and it arrived in a week from parallex but then I paid a heap in shipping..
Cheers
Robert
Am in the process of assembling the case. Attached photo shows power on/off swiitch. Just waiting for the 12V power socket, I am going to use 2, IN and OUIT, so the 12V plugs in here, and a 12V out cable goes to power the myFocuserPro2 controller!!!!
On the top of the case is the RESET button, to the right end is the Antenna and 12V LED. I have yet to decide on what cable/connector I willl use for the RXD/TXD - come to think of it I dont need GND as the 12V GND of the ESPxxx will be the same as the 12V GND on the focuser. That would work but it would mean never power them separately. Might just run 3 wires to be save (I guess a stereo socket would do on each end?
The small swicth on the side of the case at the bottom of the picture is ON/OFF program switch for normal/program-mode, so I dont have to open the case if I need to reflash with new firmware. I will probably put some velcro on the bottom of the case and attach it close to the focuser on the scope.
Cheers
Robert
As part of the update to v230, I will port those changes to the Wifi project. No timeframe yet on when that might happen. Remember that the Wifi project has its own firmware, ascom driver and windows app. So the next release of the wifi will update all of those to be compliant with the newer protocol introduced at v230 of myFocuserPro2
03-Sept-2016 Updates to ESP8266 Wifi Controller - New arduino controller code, new ESP8266 code, new Windows App, New ASCOM driver, new PDF