Jump to content



  • Posts

  • Joined

  • Last visited

Everything posted by hughgilhespie

  1. Hi Steve, The Magic Wire Arduino software is now finished. At least as far as I can tell. It still needs final testing using an actual Velleman K8055 / VM110 board and the Lesvedome software to provide the drive signals to the Magic Wire static board. The Arduino .ino files for the static and moving boards are attached and I have also included the three folders for the non-standard library routines that are used by the software. These non-standard library routines are: RF24 Bounce2 Streaming The folders for each of these should be downloaded as follows: Open the Arduino IDE and select the File / Preferences menu item the first item on the Preferences window shows the path to the Sketchbook folder location. Use Windows Explorer to find this folder. It will have a sub-folder called libraries. Copy/paste the library routine folders into the libraries sub-folder. Some other news about the Magic Wire project. The Embedded Coolness website has now disappeared. I have been in contact with the owner and apparently it was hacked and he has taken the site down. This is not good news as I am no longer sure if the nRF24L01+ breakout boards will still be available. So, to move things forward I am now revising the project to use a purpose designed printed circuit boards which will be available from Aisler.net, a German company that does prototype PCBs. This will be the Mk. 2 version. Everything will be the same as the Mk 1 version except that the PCBs will replace the breakout boards and the stripboards for the static and moving modules. To make the parts as widely available as possible, the BOM will use components from DigiKey. As this will be my first venture into PCD design it will take some time to get going. I will update on this as and when I have made some progress. In the meantime, I am looking forward to hearing about your progress and finding out how well the software works with your set-up. Regards, Hugh Bounce2.zip RF24.zip Streaming.zip MagicWireSTATIC_1022a.ino MagicWireMOVING_1022a.ino
  2. Hi Steve, Sorry to hear you have been ill and I hope you recover quickly. As requested, the relay board stripboard layout is attached. I will now press on finishing the software and the documentation and will update when we are ready for live testing. Regards, Hugh RelayBoard3.pdf
  3. Hi Steve, Another update. I have finished building and testing the relay board and the dummy shutter hardware. This is the relay board. It is built as per the schematic I sent previously. The relays are not rated enough to power a 'proper' motor to open a shutter but they are fine with the little demo motor I am using. The hardware is pretty basic. Just the 12 volt geared motor - the slowest I could find, about 5 rpm - and a couple of the limit switches with both N/O and N/C contacts. All mounted on a piece of alumininium plate with an actuator bar fitted to the motor. The good news is that it all works as planned. I don't have a VM110 / K8055 board to test with but it is easy enough to test the basic operation by grounding the lines that would normally connect to the Velleman DO5 (motor run) and DO6 (motor direction). If I can work out how, I will add a little video later. From my point of view, all that is left for me to do is finish the software to include the various optional features and to finish the construction / software installation write-up. About one more week I hope. Regards, Hugh
  4. Hi Steve, You will probably overtake me! Good luck with the construction. Regards, Hugh
  5. Hi Steve, Another Magic Wire Update. I have finished designing the schematic for the relays as below. I have also attached it as a PDF file. This is very much a Mk. One design and as yet untested. It took a lot longer than I expected to get a design that works - on paper anyway. This was due to the need to deal with keeping the states of the Fully Closed and Fully Open limit switches as reported back to the MW board valid under all possible conditions. My next step is to do a hardware build of the schematic. I have some dinky little PCB mount relays so it will be a fairly simple strip board build. Then assuming testing goes OK, I will build a shutter mock-up in hardware using a small 12 volt motor and a couple of limit switches. I have had a break from writing the MW firmware but there isn't much left to do. My TTD list is THINGS TO DO ============ Option handling - Finished in Static Module. Moving module in progress Write Shutter Close procedure. Moving module. Write Battery Voltage stuff. Moving module. Write Comms Check stuff. Moving module. How are you getting on with making the modules? Please do let me know if you hit any snags as that would be very good feedback. Regards, Hugh MW_ShutterSchematic_Rev01.pdf
  6. Hi SkyBadger, You are doing proper, joined-up programming! Way above my pay grade I'm afraid but it does sound very interesting. I would love to get more details on your proposed ASCOM safety driver as that's one of the missing links in my observatory set-up. My approach to protecting the equipment in the observatory has been to have all the safety inputs and control built in to my homebrew Arduino based controller. It works well and it covers various ways that things might come to harm. The stuff includes Inhibitor switches fitted to the dome clamps (to block attempting rotation when the dome is clamped). Detection of rotation motor jamming and automatic shut down . 2 off Hydreon sensors, one set for rain and one for heavy dew. Aurora cloud sensor. I also found it very helpful to have the ability to override the various safety detectors to allow basic fiddling, setting up in daylight, etc. This is all done through a programme called MegunoLinkPro that is a sort of poor man's visual basic. I have a GUI for my controller that allows me to configure it without needing to reflash the firmware. As I said, all this works and it is very pleasing to see the shutter close on the first drop of rain. The big lack for me is any way to interface my system with SGP so that there is a chance of pausing, then resuming a sequence. Hence my interest in an ASCOM safety driver. Regards, Hugh
  7. Hi Steve, Thanks for sending the schematic. I will use this circuit for my mock-up. Looks like you should be able to test everything when you have the modules built. The delay in getting the boards from the US might be my fault - I notified them of the problem I had found, maybe they are getting corrected boards made. More likely, it's just good old ParcelFarce. One thing to note is that if you want to use limit switches with the MagicWire system, you need to use SPDT switches. The common pole of each switch is connected to the 12 volt rail, the motor drive relay coil is connected to the NC terminal and the MW Moving board is connected to the NO contact. Then, when the switches are activated by the shutter, the previously floating contact gets connected to the 12 volt rail and this is the signal the MW board uses. I will sort out the actual wiring when I build my mock-up shutter drive. The switches I used were from RS, part number 682-2184. They are only rated for 3 amps, so they need to switch the motor via a relay, not directly. Regards, Hugh
  8. Hi Steve, Update time again. I have made one more fairly minor amendment to the hardware. I have added a red LED to each strip board as shown on the revised drawings in the Rev 0.1 instructions attached. This LED is a diagnostic LED that will give a basic indication of any faults detected by blinking in a pre-set pattern. I thought this would be helpful as it is very difficult to work out what has gone wrong without some form of feedback. I actually used a couple of LEDs with built in resistors, suitable for connecting directly to an Arduino pin and I have added details of these to the updated Parts list. However, a plain LED with a suitable series resistor, say between 500 and 1000 ohms would work just as well. The resistor would be used in place of the wire link between the LED cathode and ground. The Mark 1 code for the two modules is now written. Copies of the files for each module are attached. This is still early days stuff and will evolve quite a bit in the next few weeks. I had a lot of fun initially as I just couldn't get it to work at all - I tried everything I could think of but - nada! As soon as I loaded the code into either module, it just went dumb and flashed it's little red LED at me. Finally I did some serious debugging, adding one line of code at a a time until I found the problem. It turns out that the breakout boards from Embedded Coolness have a fault! The Nano reset pin is connected to pin A0 and it shouldn't be! Naturally, the Gods of software had insisted that my 'helpful' diagnostic LED was connected to pin A0, so that when I initialised the pin, setting it low so the LED didn't light, that pulled the reset pin low as well. The Nano resets, starts loading the software again, gets to the bit where it sets pin A0 low, resets the Nano ................................................... Anyway, what doesn't kill you makes you stronger . I changed the Nano pin used for the LED and the breakout boards work just fine. As I mentioned before, I don't have a spare Velleman board so I am a bit limited in final testing. However, I have bought some cheap 12 volt DPDT relays from RS and a little 12 volt motor, so I am going to build a test rig to simulate the shutter operation, complete with limit switches. That will help a lot with testing. I am also plugging away at writing the How To document. It is far from finished but I will eventually get there. Regards, Hugh LESVEDOME DOME CONTROL HARDWARE.docx MagicWireSTATIC_0902a.ino MagicWireMOVING_0902a.ino
  9. Hmm, Programming is definitely NOT my thing. I started on punched cards using Algol 60 then Basic over a teletype. Entered the micro age with a Nascom1, Z80 processor, programmed in machine code. There wasn't enough memory for an assembler. Then BBC Basic, a dash of 80286 and 80386 assembler and Visual Basic until it went modern after VB3. I still can't do 'joined up' programming, all that object oriented stuff. I like a nice procedure or two and I do enjoy working with these simple processors like the Amtel chips in the Nano boards. It's more satisfying for me to have a direct connection to the hardware rather than layer upon layer of abstraction. So, crunch day tomorrow for Magic Wire. Boards built and the basic two-way radio is working. Magic Wire firmware Mk. 1 written for both boards and a proper try out tomorrow. I will have to find a way of spoofing the various inputs and outputs - mainly just a matter of being able to connect / disconnect the inputs to the various voltage rails. I have also put in some additional code to allow me to follow what's happening over a serial link to a terminal program. Regards, Hugh
  10. Hi Steve, Glad to know my daftness hasn't caused any problems. On that subject, I also sent you the drawing of the updated strip board layout as a Visio file rather than a PDF which I meant to send. Attached is the PDF version which should be much easier to read. Regards, Hugh Static_Module_Rev01.pdf
  11. Hi Steve, CORRECTED STRIP BOARD LAYOUT I have revised the strip board layout for the Static radio module. I hadn't allowed for the fact that the digital outputs from the Velleman / K8055 boards require the use of pull-up resistors in order to generate a voltage swing when switching. The new layout uses an extra 2 off 4k7 pull-up resistors, tied to the +5 volt rail. When the Velleman / K8055 outputs are INACTIVE, the voltage seen at the Nano pins will be about +5 volts. When the outputs go ACTIVE, the voltage will drop to about 0.2 volts. My apologies if this change causes you any problems! In terms of general progress, I am getting on with the firmware for the boards. I should be in a position to start debugging / testing over the weekend. Regards, Hugh Drawing2_Rev0.1.vsd
  12. Hi Steve, IGNORE THIS!! JUST PLAIN WRONG. CORRECTED VERSION SHORTLY!!! I have revised the strip board layout for the Static radio module. I hadn't allowed for the fact that most people using the Lesvedome system and following the schematics on the Lesvedome site will be using 12 volt relays and connecting the Velleman / K8055 CLAMP terminal to the 12 volt rail. This means that when the outputs from DO5 and DO6 are inactive, they will be around 12 volts which is much too high for the Nano pins that are connected to them. I have added a simple voltage divider to each connection, so another 4 resistors are needed, 2 by 3.9 k and 2 by 2.0 k. This will reduce the 'off' voltage to about 4 volts which is fine. The 'on' voltage will still be around 0 volts. My apologies if this causes you any problems! In terms of general progress, I am getting on with the firmware for the boards. I should be in a position to start debugging / testing over the weekend. Regards, Hugh Static_Module_Rev0.1.pdf
  13. Hi Peter, Well Done!! You must be really pleased. Astro imaging is never going to be easy but when the automation works it takes a lot of the hassle away and leaves you free to concentrate on getting good results. Speaking of automation, if you do decide to automate the shutter operation, I have a design for a radio link for the Lesvedome shutter control that in effect connects the shutter to the VM110 / K8055 via a length of magic wire. The details of the mark1 design are in the topic 'Wireless Connection to Velleman K8055/VM110' that you started in this forum. I am doing this with the help of another SGL member and between us we should have a working design fairly soon. Once again, congratulations on a successful project. Regards, Hugh
  14. Hi Steve, Thanks for your kind words. The ceramic caps I used are 50 volt rated, 0.1 and 0.33 uF. The Embedded kits include the 0.1 caps. The L78S05 regulator specifies an 0.33uF and I thought it best to stick to the recommended values. Regards, Hugh
  15. Hi Steve, Glad you can do the testing. I am away myself until Monday so will start doing the software when I get back. Regards, Hugh
  16. Hi Steve, A quick update. After I got your reply where you mention building Robert Brown's MySQM meter it occurred to me that a radio link for shutter control in observatories using the Lesvedome system might be of interest to a few people. To this end I decided to tackle this in the same way as Robert's very useful projects and to prepare a project called 'Magic Wire'. I have now actually build a pair of complete radio modules and I have tried to document the design and building process sufficiently to allow other people who may be interested to have a go themselves. The stage I am now at is that the first draft project documentation is written and I now will start writing the code for the Arduino Nanos, followed by testing. I don't have a spare K8055 board or any relays so my testing will be limited to spoofing the inputs and checking that the outputs respond correctly. I have included the draft documentation - excluding the code for now - and I would welcome your comments. If we finally get this up and running, with you as the guinea pig for final testing, I would send the project to Pierre to see if he would like to include it on the Lesvedome web site. Regards, Hugh LESVEDOME DOME CONTROL HARDWARE.docx
  17. Hi Steve, Thanks for the shutter motor schematics. Please can you email me the schematic directly as my tired, old eyes have trouble reading it on here. I assume that your Pulsar only has one shutter and you will not need the limit switches for the 'lower shutter'? I also think that your choice of lever-operated micro switches is a good one. I have had bad experiences with trying to use magnetic reed switches, they have too much hysteresis to allow accurate mechanical positioning. So, from what I can gather, you already have the relays and the lever operated micro switches. So, the shutter radio control module needs to have the following: A 12 volt to 5 volt power supply. nRF24 / Nano board to receive the incoming signals from the static board A way of boosting the Nano outputs to drive the K5 and K6 relay coils. This will be a ULN2803a chip which is the same driver as used on the K8055. The static radio control module needs to have: A 12 volt to 5 volt power supply. nRF24 / Nano board to receive the incoming signals from the Velleman K8055 board, pins DO5 and DO6 and to send signals to the two K8055 Analog inputs. There are some interesting optional extras for the static module. There are plenty of GPIO pins unused on the Nano and one of these could be used for say monitoring a rain sensor that activates a relay when rain is detected to automatically close the shutter if it rains. I use a Hydreon RG11 that has a built in relay for this. https://shop.weatherstations.co.uk/hydreon-rg-11-optical-rain-sensor-800-p.asp When I've finished making the two nRF24/Nano boards I will do a strip board design for the shutter radio module. The strip board will carry the nRF24/Nano board and the ULN2803 chip and the 12 volt to 5 volt regulator components. Regards, Hugh
  18. Hi Steve, A quick update. I should have asked how confident you are at soldering bits together. The ability to solder is pretty fundamental to messing about with Arduinos and the like. Funnily enough, the ability to write code is not so important - other people can help here but they can't solder the bits for you. Anyway, for now I will assume that you are okay waving a soldering iron around. Today I will make a start on making up a couple of the Nano / nFR24 boards I received from the States. After that I can start thinking about the interface with the Velleman board and a suitable comms protocol for shutter operations. Regards, Hugh
  19. Hi Steve, Happy to help if I can. I used XBee radio modules in my design. They work very well but they are a tad expensive. There is another radio module, nRF24L01, that is much cheaper and is the one I would now recommend. If you look on http://embeddedcoolness.com/shop/ they are selling a breakout board called theRFX Nano 3.0 dev board w/ shield breakout, prototyping area, for use with an Arduino Nano and the nRF24L01. I have just bought 4 of these to have a play with. They use the full WiFi capability of the nRF24L01 but you don't need that. All you have to do is use the nRF24L01 modules to send basic serial data between two Nanos - one fixed and one in the rotating roof. The fixed Nano will have pins connected to the Velleman board as follows: DO5 Shutter Motor On/Off DO6 Shutter Open/Close (Motor Direction) Analog Input 1 - Shutter Limit Switch 1 Analog Input 2 - Shutter Limit Switch 2 Based on the state of the 4 pins, the fixed Nano will send a serial message to the shutter Nano to start or stop the shutter motor or to change its direction. Obviously, the 5 volt, 20 mA or so output from a Nano pin won't drive a hefty motor so some form of relay board will also be required for the motor switching. I strongly recommend that you also use limit switches to detect when the shutter is fully open / closed. These limit switches will be connected to the motor relays and also to the shutter Nano so that they will switch off the power when the movement is complete and also will send a serial message to the fixed Nano that will cause the fixed Nano to send a message to Lesvedome via the Velleman analog inputs. To go any further can you describe how you are planning to control the shutter motor? When I know that I can try and flesh out my ideas. Regards, Hugh
  20. Hi Peter, The encoders are a bit delicate! I have attached a photo of how I mounted my encoder. The actual encoder is in the diecast box at the bottom - I was worried about it picking up interference from the motor close to it. As you can see, I used a pillow block bearing for the shaft that connects the encoder to the pinion. The bearing I chose has grub screws that lock the shaft into the bearing. That stops any up and down movement being transmitted down to the encoder. Then the actual encoder shaft is joined to the drive shaft using a flexible coupling. That allows for a small amount of sideways misalignment. It's not shown in the picture but the whole encoder assembly is mounted on a hinge so that it can move in an arc and the spring arrangement keeps the drive pinion pressed into the drive belt. The side cheeks were an afterthought as there was too much sideways play in the hinge so they are there to prevent that. It looks a bit complicated but actually it is only made from aluminium bar, plate and angle. Hope this helps. Regards, Hugh
  21. £4900 according to Sky At Night magazine. Dunno what that included though!
  22. Hi Peter, Good that you have been able to pinpoint the problem. As I said before, I have absolutely zero knowledge about Raspberry Pi's and their software. so I'm afraid I can't help. In my observatory I use a pair of XBee radios to pass the signals between the battery powered shutter drive, located in the rotating dome, and the main controller fixed to the non-rotating observatory wall. Hopefully the VirtualHere support can get you going. If they can't there are other options I can think of but they are far from quick and easy. These would involve moving the VM110 board to a static part of the observatory with a wired USB connection to your computer. Then a homebrew radio board (Arduino + transmitter/receiver) would be connected to the VM110 digital inputs and outputs. In the rotating part of the obsy, a very similar radio board would connect directly to the relay module inputs. This is all 'doable' but it's far from a quick fix. Let us know how you get on with VirtualHere. HTH Regards, Hugh
  23. Hi Peter, On a slightly different topic, if you are not a member of the Lesvedome Yahoo group I urge you to join. It has a lot of very useful information about the Lesvedome system. The link below gets you there. https://groups.yahoo.com/neo/groups/lesvedome/conversations/messages There is currently running a very useful discussion on Bourne rotary encoders, see the topic called Gray Code Mode. One of the members, Steve Hennerly, has posted a link to some software he has written that works in conjunction with the Lesvedome User Interface software and measures the actual performance of the rotary encoder in real time. This will be very helpful for your testing. The output screen looks like this. HTH Regards, Hugh
  24. Hi Peter, One thing to bear in mind with your testing is that when the Lesvedome software is operating as designed, it will always stop the motor by making Relay 4 inactive before sending a signal to change motor direction via DO2 . After the change direction signal the software then starts the motor again. I think from memory that there is a delay of 75 milliseconds between the commands. Obviously you can't reproduce this timing manually when using the K8055 Demo software but I just wonder if you will get better results using the K8055 Demo software by always stopping the motor before you change its direction and then restarting. Worth a go trying it this way anyway. I can't think of any obvious reason why Relay 4 should latch on. Doing the tests suggested by Alan will be useful in finding the cause. As for the motor stalling, I think you do need to change back to the earlier version of the Lesvedome software. Although the stall feature is useful I think it is probably too sensitive and will only complicate your testing. When everything else is working will be the time to see what happens when you run the latest version. HTH Regards, Hugh
  25. Hi Peter, Phew!! Well done! And a really good catch from Alan to spot that the DO2 / DI1 connection needed a blocking diode. I am more than willing to try and help with the Lesvedome software but I should say that my set-up is far from typical in that I don't use relays I use the output signals from the VM110 board to drive a homebrew microprocessor set-up that lets me use stepper motors for the dome and shutter operation. I also use a 64 ppr Bourne encoder to measure my dome position. This gives too many pulses for the Lesvedome software to cope with so I use software to generate a reduced pulse rate that is fed back to the VM110. The other thing worth saying is that the Lesvedome forum and Pierre de Ponthiere, the Lesvedome software author are very helpful. It is also good to read the Lesvedome help files a few times as there is a lot of good information there. For the Lesvedome software to operate with the VM110 board, as far as I know the only external things needed are these: relays output signals on DO1 and DO2 position encoder input signals on DI1 and DI5 motor direction signal on DI4 home position switch signal on DI2 - Actually I am not sure this is needed for testing with the Lesvedome User Interface as its only action is to reset the dome azimuth position to the value defined in the Setup window. As the relays are now operating as expected, the most likely cause of any remaining problems are from the encoder. On the Setup page of the LesvedomeNet User Interface try setting the Configuration Azimuth Sensor Mode to 'Hole to Hole' and also try varying the Timer interval. I believe the default value is 60 mS, you could try say 20 and 40 mS to see if that helps. Let us know how you get on. Regards, Hugh
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. By using this site, you agree to our Terms of Use.