1 00:00:00,480 --> 00:00:03,480 foreign 2 00:00:08,340 --> 00:00:13,920 thanks for joining us Andrew is a 3 00:00:11,460 --> 00:00:16,340 optical astronomer 4 00:00:13,920 --> 00:00:19,680 oh testing my memory 5 00:00:16,340 --> 00:00:22,260 at Canton University all right so please 6 00:00:19,680 --> 00:00:25,160 welcome Andrew talking about the square 7 00:00:22,260 --> 00:00:25,160 kilometer array 8 00:00:28,099 --> 00:00:32,579 hello everyone uh this is not the square 9 00:00:30,900 --> 00:00:34,380 kilometer right this is the telescope 10 00:00:32,579 --> 00:00:37,140 that I spend most of my time working on 11 00:00:34,380 --> 00:00:38,820 it's the Murchison wide field array and 12 00:00:37,140 --> 00:00:42,600 I gave a talk about this at my very 13 00:00:38,820 --> 00:00:46,260 first Picard in 2017. this is one of 256 14 00:00:42,600 --> 00:00:47,520 tiles and that tile has 16 antennas and 15 00:00:46,260 --> 00:00:49,320 if a signal is coming from straight 16 00:00:47,520 --> 00:00:51,180 overhead it hits those antennas at the 17 00:00:49,320 --> 00:00:52,500 same time if the signal is coming from 18 00:00:51,180 --> 00:00:55,020 an angle then it hits them at different 19 00:00:52,500 --> 00:00:56,879 times and we combine the signals from 20 00:00:55,020 --> 00:00:59,100 these antennas together with different 21 00:00:56,879 --> 00:01:01,800 delays to make it more sensitive to 22 00:00:59,100 --> 00:01:05,040 whatever direction we want by combining 23 00:01:01,800 --> 00:01:09,119 them in analog with the right delays so 24 00:01:05,040 --> 00:01:12,720 this is what uh mwo looks like this is 25 00:01:09,119 --> 00:01:17,460 the escapes so this is one of 512 26 00:01:12,720 --> 00:01:19,439 stations it has 256 antennas not 16 but 27 00:01:17,460 --> 00:01:21,299 otherwise it's the same principle if a 28 00:01:19,439 --> 00:01:23,460 signal comes from straight overhead it 29 00:01:21,299 --> 00:01:25,320 hits all of those 256 antennas the same 30 00:01:23,460 --> 00:01:27,420 insulin if it's coming from some other 31 00:01:25,320 --> 00:01:29,939 direction in the sky it hits those 32 00:01:27,420 --> 00:01:32,100 antennas at different times and by 33 00:01:29,939 --> 00:01:34,259 adding those antenna signals together 34 00:01:32,100 --> 00:01:36,180 with different delays we could make this 35 00:01:34,259 --> 00:01:39,000 station sensitive to whatever direction 36 00:01:36,180 --> 00:01:41,820 we want the difference is that with the 37 00:01:39,000 --> 00:01:44,759 ski we're digitizing each of those 256 38 00:01:41,820 --> 00:01:46,320 signals independently so we have a 39 00:01:44,759 --> 00:01:48,799 signal that we can combine in the 40 00:01:46,320 --> 00:01:51,899 computer the signal from each of those 41 00:01:48,799 --> 00:01:54,960 20056 antennas with whatever delays we 42 00:01:51,899 --> 00:01:57,600 want to produce a station that can be 43 00:01:54,960 --> 00:01:59,759 steered entirely in software what's more 44 00:01:57,600 --> 00:02:01,380 because it's in software we can steer it 45 00:01:59,759 --> 00:02:04,200 in multiple different directions at the 46 00:02:01,380 --> 00:02:06,780 same time we have parallel streams 47 00:02:04,200 --> 00:02:08,940 applying the same addition process but 48 00:02:06,780 --> 00:02:10,080 with different delays to point the solar 49 00:02:08,940 --> 00:02:12,180 square but multiple different directions 50 00:02:10,080 --> 00:02:13,500 in the sky you can't do that with the 51 00:02:12,180 --> 00:02:14,700 dish you point a big dish in One 52 00:02:13,500 --> 00:02:16,739 Direction it's pointing in that 53 00:02:14,700 --> 00:02:18,480 direction with this we can point in as 54 00:02:16,739 --> 00:02:20,819 many directions as we want given 55 00:02:18,480 --> 00:02:24,480 sufficient computing power 56 00:02:20,819 --> 00:02:27,900 but digitizing all of those signals is a 57 00:02:24,480 --> 00:02:29,819 huge investment in resources you can't 58 00:02:27,900 --> 00:02:31,920 do that using a computer that's out in 59 00:02:29,819 --> 00:02:35,459 the desert so what we do is we take the 60 00:02:31,920 --> 00:02:37,680 signals from these 2506 antennas and we 61 00:02:35,459 --> 00:02:39,660 pipe the signals many many kilometers 62 00:02:37,680 --> 00:02:43,019 away to a giant shielded server room 63 00:02:39,660 --> 00:02:46,860 full of high-speed fpgas so each of 64 00:02:43,019 --> 00:02:49,440 those 250 256 antennas has an X and A Y 65 00:02:46,860 --> 00:02:51,599 polarization so that's 512 data streams 66 00:02:49,440 --> 00:02:54,120 Each of which is sampled at about a 67 00:02:51,599 --> 00:02:56,340 billion samples per second and then fed 68 00:02:54,120 --> 00:02:58,680 through an awful lot of competing to 69 00:02:56,340 --> 00:03:01,200 produce your your actual data 70 00:02:58,680 --> 00:03:03,599 now I'm not involved in any of that my 71 00:03:01,200 --> 00:03:07,319 job is to provide 5 volt power to those 72 00:03:03,599 --> 00:03:09,780 antennas and get the data on our optical 73 00:03:07,319 --> 00:03:11,879 fiber back to the computer room and in 74 00:03:09,780 --> 00:03:13,379 fact I'm not involved in that either the 75 00:03:11,879 --> 00:03:15,840 hardware guys designed the hardware to 76 00:03:13,379 --> 00:03:17,220 do that my job is to write the python 77 00:03:15,840 --> 00:03:19,920 software that talks with that Hardware 78 00:03:17,220 --> 00:03:21,000 to tell it to turn the ports on and off 79 00:03:19,920 --> 00:03:23,400 so that's what I'm going to be talking 80 00:03:21,000 --> 00:03:25,680 about today 81 00:03:23,400 --> 00:03:27,900 so the history is oh I should warn you 82 00:03:25,680 --> 00:03:29,340 I'm a uni lyncher so I tend to put my 83 00:03:27,900 --> 00:03:31,019 slides full of words 84 00:03:29,340 --> 00:03:32,340 have them on the slides and lecture 85 00:03:31,019 --> 00:03:33,659 notes when they can download but I'm 86 00:03:32,340 --> 00:03:36,060 going to try not to just say everything 87 00:03:33,659 --> 00:03:38,580 that's on the slide another warning I 88 00:03:36,060 --> 00:03:40,860 tend to talk in like 45 minute chunks so 89 00:03:38,580 --> 00:03:43,500 I really hope I don't go over time 90 00:03:40,860 --> 00:03:45,599 so Kurt and uni uh over in Perth Western 91 00:03:43,500 --> 00:03:47,879 Australia was given the contract to 92 00:03:45,599 --> 00:03:50,819 design and build the system to produce 93 00:03:47,879 --> 00:03:53,340 to provide Power to these antennas and 94 00:03:50,819 --> 00:03:55,140 to get the signals on optical fibers now 95 00:03:53,340 --> 00:03:57,299 the problem is you need to have almost 96 00:03:55,140 --> 00:03:59,280 zero emissions this is going to be right 97 00:03:57,299 --> 00:04:01,140 next to where the antennas are any 98 00:03:59,280 --> 00:04:03,840 electrical noise will be picked up by 99 00:04:01,140 --> 00:04:05,519 those antennas and confused with signals 100 00:04:03,840 --> 00:04:07,739 from the sky 101 00:04:05,519 --> 00:04:10,200 the other problem is you need to work 102 00:04:07,739 --> 00:04:11,400 with very high temperatures you know 103 00:04:10,200 --> 00:04:14,099 greater than 50 degree air temperatures 104 00:04:11,400 --> 00:04:15,780 on site you've got to make it easy to 105 00:04:14,099 --> 00:04:17,459 maintain so you don't want to have fans 106 00:04:15,780 --> 00:04:18,299 that will have bearings using up things 107 00:04:17,459 --> 00:04:20,400 like that 108 00:04:18,299 --> 00:04:21,780 uh and you've got to make it easy to 109 00:04:20,400 --> 00:04:23,160 maintain because you have an awful lot 110 00:04:21,780 --> 00:04:25,800 of these things 111 00:04:23,160 --> 00:04:27,540 so a few guys at Curtin uh Dave and 112 00:04:25,800 --> 00:04:30,240 Brian and Philip designed the 113 00:04:27,540 --> 00:04:32,759 architecture uh over a few years the 114 00:04:30,240 --> 00:04:36,479 idea was you'd have a a box near the 115 00:04:32,759 --> 00:04:38,520 station that would have 230 volt power 116 00:04:36,479 --> 00:04:41,100 and a different group called infraris 117 00:04:38,520 --> 00:04:45,600 providing that 230 volt power to us 118 00:04:41,100 --> 00:04:48,000 it provides 28 ports of 48 volt DC of a 119 00:04:45,600 --> 00:04:49,560 coax cable and coax cable is chosen 120 00:04:48,000 --> 00:04:51,960 because it's cheaper 121 00:04:49,560 --> 00:04:54,660 uh and that 48 volt power would also 122 00:04:51,960 --> 00:04:56,759 carry a Communications system to each of 123 00:04:54,660 --> 00:04:59,520 24 little boxes in the field and those 124 00:04:56,759 --> 00:05:00,660 24 boxes with each connect to 10 or 12 125 00:04:59,520 --> 00:05:03,600 antennas 126 00:05:00,660 --> 00:05:05,520 and each of those little boxes would 127 00:05:03,600 --> 00:05:07,919 convert the 48 volt volt power to about 128 00:05:05,520 --> 00:05:09,960 5 volts and convert the electrical 129 00:05:07,919 --> 00:05:11,580 signals from the antennas into Optical 130 00:05:09,960 --> 00:05:13,979 signals 131 00:05:11,580 --> 00:05:16,320 now inside the station we don't want to 132 00:05:13,979 --> 00:05:19,020 deal with high speed stuff like ethernet 133 00:05:16,320 --> 00:05:21,000 so to each of those boxes we're actually 134 00:05:19,020 --> 00:05:24,060 doing a low speed serial over the over 135 00:05:21,000 --> 00:05:25,680 the coaxial cable even ethernet over 136 00:05:24,060 --> 00:05:27,479 optical fiber would be a problem because 137 00:05:25,680 --> 00:05:28,979 that means those little boxes out 138 00:05:27,479 --> 00:05:31,680 amongst the antennas have to have a 139 00:05:28,979 --> 00:05:34,800 tcprp stack and some kind of high-speed 140 00:05:31,680 --> 00:05:37,139 computer talk IP and we don't want that 141 00:05:34,800 --> 00:05:39,479 that would produce too much RF noise 142 00:05:37,139 --> 00:05:41,639 so what we use is serial and a protocol 143 00:05:39,479 --> 00:05:44,180 called modbus that was invented a very 144 00:05:41,639 --> 00:05:44,180 long time ago 145 00:05:44,220 --> 00:05:50,039 so the system 146 00:05:46,979 --> 00:05:52,440 tennis has a a short maybe 10 meter long 147 00:05:50,039 --> 00:05:54,840 coaxial cable pair one carrying the X 148 00:05:52,440 --> 00:05:56,880 signal on one carrying the Y and both of 149 00:05:54,840 --> 00:05:58,440 them carry about 5 volts DC for the 150 00:05:56,880 --> 00:06:00,300 amplifiers on the top of the antennas 151 00:05:58,440 --> 00:06:01,440 and they stand about as tall as iron 152 00:06:00,300 --> 00:06:02,699 they're about two meter tall Christmas 153 00:06:01,440 --> 00:06:06,180 trees 154 00:06:02,699 --> 00:06:09,060 the signals go from coax to their smart 155 00:06:06,180 --> 00:06:11,120 boxes inside the smart boxes there are 156 00:06:09,060 --> 00:06:14,340 little modules that convert the coaxial 157 00:06:11,120 --> 00:06:17,639 RF like just like a signal from your TV 158 00:06:14,340 --> 00:06:20,160 antenna into analog Optical 159 00:06:17,639 --> 00:06:21,060 we don't digitize it we have a little 160 00:06:20,160 --> 00:06:24,000 box 161 00:06:21,060 --> 00:06:26,100 kind of like an SFP only it has uh two 162 00:06:24,000 --> 00:06:29,400 in two inputs via coaxial cable for 163 00:06:26,100 --> 00:06:32,460 analog radio frequency input from X and 164 00:06:29,400 --> 00:06:33,720 my channel it has two LEDs one for the 165 00:06:32,460 --> 00:06:35,880 explorerization one for the Y 166 00:06:33,720 --> 00:06:39,600 polarization it puts those on the same 167 00:06:35,880 --> 00:06:42,120 fiber and it modulates the LEDs exactly 168 00:06:39,600 --> 00:06:44,400 according to the input voltage on the 169 00:06:42,120 --> 00:06:47,400 coaxial cable so it produces an analog 170 00:06:44,400 --> 00:06:50,460 light signal that turns on and off and 171 00:06:47,400 --> 00:06:52,380 varies in in power exactly with the 172 00:06:50,460 --> 00:06:54,180 electrical input voltage coming from 173 00:06:52,380 --> 00:06:57,060 these antennas 174 00:06:54,180 --> 00:06:58,139 we do that again because digitizing is 175 00:06:57,060 --> 00:06:59,699 something you don't want to do because 176 00:06:58,139 --> 00:07:02,580 it involves computers so we just turn it 177 00:06:59,699 --> 00:07:04,199 into light pass it down on optical fiber 178 00:07:02,580 --> 00:07:06,479 where it can carry for many many 179 00:07:04,199 --> 00:07:10,139 kilometers without being interfered with 180 00:07:06,479 --> 00:07:12,360 or or attenuated 181 00:07:10,139 --> 00:07:16,199 so these smart boxes provide five volts 182 00:07:12,360 --> 00:07:18,900 power from the 48 they also allow us to 183 00:07:16,199 --> 00:07:20,759 monitor the power going to the antennas 184 00:07:18,900 --> 00:07:22,680 and switch it off if something chooses 185 00:07:20,759 --> 00:07:24,840 the cable there are lots of wildlife out 186 00:07:22,680 --> 00:07:27,000 here so camels uh try and eat the grass 187 00:07:24,840 --> 00:07:29,099 and they chew the cables if a cable gets 188 00:07:27,000 --> 00:07:30,539 chewed it turns into a dead short and we 189 00:07:29,099 --> 00:07:33,000 don't want that blowing a fuse that 190 00:07:30,539 --> 00:07:34,440 someone has then go out and change so 191 00:07:33,000 --> 00:07:36,240 those little boxes do things like 192 00:07:34,440 --> 00:07:38,099 monitor the current a thousand times a 193 00:07:36,240 --> 00:07:39,599 second if it looks like it's going into 194 00:07:38,099 --> 00:07:41,819 a dead short that might blow something 195 00:07:39,599 --> 00:07:43,740 up it switches it off before it can melt 196 00:07:41,819 --> 00:07:46,440 any equipment 197 00:07:43,740 --> 00:07:48,539 the 48 volt and comes cable to the smart 198 00:07:46,440 --> 00:07:51,000 boxes go to what score will it the field 199 00:07:48,539 --> 00:07:53,819 node Distribution Hub that provides the 200 00:07:51,000 --> 00:07:56,759 48 volt DC provides the ability to 201 00:07:53,819 --> 00:07:59,460 switch smart boxes on and off and it 202 00:07:56,759 --> 00:08:02,099 provides this shared serial bus you can 203 00:07:59,460 --> 00:08:04,520 talk to these boxes from out from the 204 00:08:02,099 --> 00:08:04,520 outside world 205 00:08:05,099 --> 00:08:10,919 so this is the Smart Box 206 00:08:07,740 --> 00:08:12,960 um the box is in two bits the little 207 00:08:10,919 --> 00:08:15,060 square unit you can see on the top left 208 00:08:12,960 --> 00:08:17,099 with a green cable attached to it that 209 00:08:15,060 --> 00:08:19,979 is where all of the Active Electronics 210 00:08:17,099 --> 00:08:22,379 is that power supply the microcontroller 211 00:08:19,979 --> 00:08:24,599 the serial Communications bit all of 212 00:08:22,379 --> 00:08:27,840 that is in that box that box is entirely 213 00:08:24,599 --> 00:08:29,819 sealed both physically to you know 214 00:08:27,840 --> 00:08:31,560 eliminate water and ants getting in and 215 00:08:29,819 --> 00:08:33,180 electrically to stop radio frequency 216 00:08:31,560 --> 00:08:36,060 noise getting out 217 00:08:33,180 --> 00:08:38,880 that box then Clips onto the underside 218 00:08:36,060 --> 00:08:40,860 of this environmental package and the 219 00:08:38,880 --> 00:08:43,080 environmental package the big flat bit 220 00:08:40,860 --> 00:08:47,220 that doesn't have anything active in it 221 00:08:43,080 --> 00:08:48,959 it has a press button it has some 222 00:08:47,220 --> 00:08:52,019 switches to tell it what its address is 223 00:08:48,959 --> 00:08:55,320 it has the analog components that don't 224 00:08:52,019 --> 00:08:57,779 have any high speed on off uh switching 225 00:08:55,320 --> 00:09:01,019 that might generate noise it only has 226 00:08:57,779 --> 00:09:02,459 analog stuff so it needs to be shielded 227 00:09:01,019 --> 00:09:04,680 from the elements but it doesn't need to 228 00:09:02,459 --> 00:09:07,140 be screened electrically nothing it has 229 00:09:04,680 --> 00:09:09,420 inside can radiate outwards to interfere 230 00:09:07,140 --> 00:09:12,240 with the with the antenna signal 231 00:09:09,420 --> 00:09:14,339 on each side of the box there are uh six 232 00:09:12,240 --> 00:09:16,920 dual polarization inputs X and Y and you 233 00:09:14,339 --> 00:09:18,839 can see that the coax connectors there 234 00:09:16,920 --> 00:09:20,700 and 235 00:09:18,839 --> 00:09:23,040 looking at the inside of the Box this is 236 00:09:20,700 --> 00:09:26,279 from the top down on the left hand side 237 00:09:23,040 --> 00:09:28,680 you can see here the zero two those are 238 00:09:26,279 --> 00:09:30,540 little jumpers sitting in um eight pin 239 00:09:28,680 --> 00:09:33,180 sockets and that defines what the 240 00:09:30,540 --> 00:09:35,220 address of this thing is modbus has a 241 00:09:33,180 --> 00:09:38,160 concept of an 8-bit address to Define 242 00:09:35,220 --> 00:09:39,779 what physical thing you're talking to we 243 00:09:38,160 --> 00:09:41,700 didn't want to put the address in the 244 00:09:39,779 --> 00:09:43,260 electronics package in the firmware 245 00:09:41,700 --> 00:09:45,899 because that means that if somebody 246 00:09:43,260 --> 00:09:47,220 comes along and swaps it out then they 247 00:09:45,899 --> 00:09:49,260 would need to set it to the right 248 00:09:47,220 --> 00:09:50,820 address something needs to know what 249 00:09:49,260 --> 00:09:53,040 antennas are physically connected to 250 00:09:50,820 --> 00:09:55,080 that box the antennas are physically 251 00:09:53,040 --> 00:09:57,240 connected to this package here so we 252 00:09:55,080 --> 00:09:59,220 wanted to put the address the bit that 253 00:09:57,240 --> 00:10:00,720 specifies the address in this package of 254 00:09:59,220 --> 00:10:02,160 that stayed physically connected to the 255 00:10:00,720 --> 00:10:04,860 mesh and the antennas 256 00:10:02,160 --> 00:10:06,540 so if you come out you install this 257 00:10:04,860 --> 00:10:08,640 thing you say it's Smart Box number two 258 00:10:06,540 --> 00:10:11,279 you note that you're connecting antennas 259 00:10:08,640 --> 00:10:13,620 you know one through 15 through 20 to 260 00:10:11,279 --> 00:10:16,500 this box that then lives there forever 261 00:10:13,620 --> 00:10:18,240 and any changes that happen particularly 262 00:10:16,500 --> 00:10:20,160 for changing out the electronics module 263 00:10:18,240 --> 00:10:22,080 you swap in a new computer module it's 264 00:10:20,160 --> 00:10:23,700 completely stateless it doesn't need to 265 00:10:22,080 --> 00:10:25,980 know anything about what it is or where 266 00:10:23,700 --> 00:10:27,360 it is it just gets told when it reads 267 00:10:25,980 --> 00:10:28,740 those switches that it's address number 268 00:10:27,360 --> 00:10:31,200 two 269 00:10:28,740 --> 00:10:33,839 so the um 270 00:10:31,200 --> 00:10:36,360 the bit that actually turns the radio 271 00:10:33,839 --> 00:10:37,680 frequency into Optical are those silver 272 00:10:36,360 --> 00:10:40,140 boxes 273 00:10:37,680 --> 00:10:42,000 on the right there's a close-up of a few 274 00:10:40,140 --> 00:10:43,620 of them they just take a couple of thin 275 00:10:42,000 --> 00:10:46,019 cables in carrying the electrical radio 276 00:10:43,620 --> 00:10:48,120 signal from the antenna and they have a 277 00:10:46,019 --> 00:10:50,940 single fiber going out 278 00:10:48,120 --> 00:10:52,019 um to carry the analog radio frequency 279 00:10:50,940 --> 00:10:54,779 data 280 00:10:52,019 --> 00:10:57,180 this is all aggregated together into a 281 00:10:54,779 --> 00:10:59,339 12 fiber ribbon that then goes out 282 00:10:57,180 --> 00:11:01,800 through a hole in the box and back to 283 00:10:59,339 --> 00:11:03,600 the the station to be aggregated in into 284 00:11:01,800 --> 00:11:05,220 a bigger Collective to go back to the 285 00:11:03,600 --> 00:11:07,260 main site 286 00:11:05,220 --> 00:11:10,680 the electronics package 287 00:11:07,260 --> 00:11:12,779 has three boards and some filters this 288 00:11:10,680 --> 00:11:15,120 is upside down so the d-connectors that 289 00:11:12,779 --> 00:11:16,019 that plug up into the the Box are on the 290 00:11:15,120 --> 00:11:17,880 bottom there 291 00:11:16,019 --> 00:11:19,079 so each of those little D connectors has 292 00:11:17,880 --> 00:11:21,540 a filter board 293 00:11:19,079 --> 00:11:24,360 because those d-connectors only carry DC 294 00:11:21,540 --> 00:11:25,980 or LEDs that can be switched on and off 295 00:11:24,360 --> 00:11:27,839 for example so there's filters make sure 296 00:11:25,980 --> 00:11:29,940 that when you switch an LED on it 297 00:11:27,839 --> 00:11:31,560 switches on in a millisecond not at a 298 00:11:29,940 --> 00:11:34,500 micro second the rise time is slow 299 00:11:31,560 --> 00:11:36,420 enough that it doesn't generate noise 300 00:11:34,500 --> 00:11:39,180 we've got a microcontroller board with a 301 00:11:36,420 --> 00:11:41,399 pic24 microcontroller in there uh 302 00:11:39,180 --> 00:11:44,640 surrounded by a metal box to keep it 303 00:11:41,399 --> 00:11:46,800 shielded then we've got the what we call 304 00:11:44,640 --> 00:11:49,740 the pdoc power and data over coax board 305 00:11:46,800 --> 00:11:51,839 that wraps the the serial Communications 306 00:11:49,740 --> 00:11:54,060 on top of the 48 volt DC 307 00:11:51,839 --> 00:11:55,380 and we've got a power supply which is a 308 00:11:54,060 --> 00:11:57,180 it's basically a switch mode power 309 00:11:55,380 --> 00:11:59,579 supply but it's designed to be 310 00:11:57,180 --> 00:12:02,339 incredibly low noise to convert the 48 311 00:11:59,579 --> 00:12:04,200 volts down to about 5 volts it's 312 00:12:02,339 --> 00:12:06,120 actually about 4.7 313 00:12:04,200 --> 00:12:08,899 and all of this works up to about 85 314 00:12:06,120 --> 00:12:08,899 degrees Centigrade 315 00:12:10,680 --> 00:12:16,220 there it is uh look that looking down 316 00:12:13,800 --> 00:12:16,220 from the top 317 00:12:17,880 --> 00:12:23,399 and also has this ndh the field node 318 00:12:20,700 --> 00:12:24,899 Distribution Hub Electronics package so 319 00:12:23,399 --> 00:12:28,860 you can see a Smart Box sitting on top 320 00:12:24,899 --> 00:12:32,220 of it there the Box itself has 48 uh 321 00:12:28,860 --> 00:12:34,079 sorry yeah 28 ports the 28 ports and you 322 00:12:32,220 --> 00:12:35,880 can't see it on there the 28 bullets of 323 00:12:34,079 --> 00:12:37,140 those coax connectors and again we use 324 00:12:35,880 --> 00:12:39,480 those coax connectors because they're 325 00:12:37,140 --> 00:12:41,100 cheap they're cable TV F connectors you 326 00:12:39,480 --> 00:12:43,440 crimp it on the cables cheap the 327 00:12:41,100 --> 00:12:45,720 connectors are cheap uh you have no idea 328 00:12:43,440 --> 00:12:47,160 how expensive DC connectors can be that 329 00:12:45,720 --> 00:12:48,480 are rated for outside you can pay 330 00:12:47,160 --> 00:12:50,040 hundreds of dollars for a single 331 00:12:48,480 --> 00:12:52,920 multi-pin connector 332 00:12:50,040 --> 00:12:54,480 uh and those boxes those ports are 333 00:12:52,920 --> 00:12:57,060 designed to be redundant we only need 24 334 00:12:54,480 --> 00:12:58,440 boxes we have 28 ports so a technician 335 00:12:57,060 --> 00:13:00,899 can just you know swap it to a port 336 00:12:58,440 --> 00:13:03,000 that's working if one of them is broken 337 00:13:00,899 --> 00:13:04,740 there's another package that Aggregates 338 00:13:03,000 --> 00:13:06,300 the fiber I won't go into that because 339 00:13:04,740 --> 00:13:08,399 that's just Plumbing there's no Active 340 00:13:06,300 --> 00:13:11,160 Components in there 341 00:13:08,399 --> 00:13:13,920 inside that box we have the power supply 342 00:13:11,160 --> 00:13:16,800 module on the right uh that's a seal box 343 00:13:13,920 --> 00:13:19,980 that has our 240 volt to 48 volt power 344 00:13:16,800 --> 00:13:22,620 supplies it also produces 12 and DC for 345 00:13:19,980 --> 00:13:23,820 12 volts and 5 volts DC for the rest of 346 00:13:22,620 --> 00:13:25,860 the electronics 347 00:13:23,820 --> 00:13:28,320 we've got the communications box down 348 00:13:25,860 --> 00:13:30,720 the bottom that goes from fiber to 349 00:13:28,320 --> 00:13:33,720 ethernet and then from ethernet to loose 350 00:13:30,720 --> 00:13:36,240 bin cereal and on the left hand side on 351 00:13:33,720 --> 00:13:38,220 Port 3 on the number three we have all 352 00:13:36,240 --> 00:13:42,180 of the the boards that provide the 353 00:13:38,220 --> 00:13:44,399 outputs to the to the actual smart boxes 354 00:13:42,180 --> 00:13:45,959 so this is a Communications Gateway we 355 00:13:44,399 --> 00:13:48,420 use an off the fiber mid off the shelf 356 00:13:45,959 --> 00:13:51,360 media converter a very short little 357 00:13:48,420 --> 00:13:53,459 length of coax going to a whiz note 358 00:13:51,360 --> 00:13:55,620 um ethernet to serial converter module 359 00:13:53,459 --> 00:13:58,200 and then a filter board to make sure 360 00:13:55,620 --> 00:14:01,260 that even that serial has low rise and 361 00:13:58,200 --> 00:14:02,700 fall times so that it can be transmitted 362 00:14:01,260 --> 00:14:04,680 be carried outside the box without 363 00:14:02,700 --> 00:14:06,779 worrying about RFI 364 00:14:04,680 --> 00:14:09,480 and a pair of fibers comes in from the 365 00:14:06,779 --> 00:14:12,800 outside world to provide Communications 366 00:14:09,480 --> 00:14:12,800 to the control room 367 00:14:13,380 --> 00:14:16,860 that board there where it's actually a 368 00:14:15,120 --> 00:14:18,899 bunch of boards we've got 28 what we 369 00:14:16,860 --> 00:14:20,639 call p-dog boards they're the exact 370 00:14:18,899 --> 00:14:22,139 equivalent of the PW board in the Smart 371 00:14:20,639 --> 00:14:25,200 Box they're the other end of the link 372 00:14:22,139 --> 00:14:26,820 they insert the 48 watt power and the 373 00:14:25,200 --> 00:14:29,279 serial over the top 374 00:14:26,820 --> 00:14:31,440 and provider the main board there 375 00:14:29,279 --> 00:14:34,200 provides this shared serial bus between 376 00:14:31,440 --> 00:14:36,480 all 28 ports and allows you to turn 377 00:14:34,200 --> 00:14:40,160 ports on and off again if a camera to 378 00:14:36,480 --> 00:14:40,160 use the cable you want to turn it off 379 00:14:40,740 --> 00:14:44,459 it actually has two microcontrollers on 380 00:14:42,660 --> 00:14:46,620 it the same microcontrol that's in the 381 00:14:44,459 --> 00:14:48,600 spot box one of them handles the 382 00:14:46,620 --> 00:14:50,100 peripherals turning ports on and off we 383 00:14:48,600 --> 00:14:52,980 ran out of ports on that one so we have 384 00:14:50,100 --> 00:14:54,839 another one that handles three uh elon's 385 00:14:52,980 --> 00:14:56,880 three serial ports one of them is the 386 00:14:54,839 --> 00:14:59,100 outside world to the West End module one 387 00:14:56,880 --> 00:15:00,720 of them is the the fnpc on this board 388 00:14:59,100 --> 00:15:02,639 that handles all of the ports that go on 389 00:15:00,720 --> 00:15:05,160 and off and the third one is a 390 00:15:02,639 --> 00:15:07,940 multi-drop Serial bus that goes to the 391 00:15:05,160 --> 00:15:07,940 actual smart boxes 392 00:15:08,519 --> 00:15:13,980 modbus uh was designed in 393 00:15:11,399 --> 00:15:15,600 nine uh called modbus because it was by 394 00:15:13,980 --> 00:15:18,899 a company called modicon 395 00:15:15,600 --> 00:15:20,880 it's a client server protocol uh the 396 00:15:18,899 --> 00:15:23,519 idea is that the server doesn't have an 397 00:15:20,880 --> 00:15:25,500 address clients do each client has an 398 00:15:23,519 --> 00:15:27,959 address from 1 to 255 with zero is 399 00:15:25,500 --> 00:15:30,480 broadcast there's lots of variants now 400 00:15:27,959 --> 00:15:32,040 all of them have the same packet 401 00:15:30,480 --> 00:15:34,860 structure that was originally set down 402 00:15:32,040 --> 00:15:37,380 in 1979 but they frame it in different 403 00:15:34,860 --> 00:15:39,480 ways there's modbox TCP where it's 404 00:15:37,380 --> 00:15:41,760 encapsulated in a TCP packet that's my 405 00:15:39,480 --> 00:15:43,980 buzz rtu which is raw binary on a Serial 406 00:15:41,760 --> 00:15:46,320 line because my bus asking you there's a 407 00:15:43,980 --> 00:15:47,820 whole bunch of variants but the idea is 408 00:15:46,320 --> 00:15:49,620 they all have the same packet structure 409 00:15:47,820 --> 00:15:51,360 with different ways to signify start and 410 00:15:49,620 --> 00:15:53,880 end of a packet 411 00:15:51,360 --> 00:15:56,000 so a transaction is a command from the 412 00:15:53,880 --> 00:15:58,860 server and a reply from the client 413 00:15:56,000 --> 00:16:01,380 clients can't initiate anything they can 414 00:15:58,860 --> 00:16:03,600 only respond when sent packet so the 415 00:16:01,380 --> 00:16:05,940 server has to continually pull all of 416 00:16:03,600 --> 00:16:08,600 the smart boxes and the fnpc to find out 417 00:16:05,940 --> 00:16:08,600 what's going on 418 00:16:08,880 --> 00:16:13,560 the basic structure is the client 419 00:16:11,339 --> 00:16:15,060 address which is one byte followed by 420 00:16:13,560 --> 00:16:17,160 the command code what you want to do 421 00:16:15,060 --> 00:16:18,839 followed by the data for that command 422 00:16:17,160 --> 00:16:20,699 followed by checksum 423 00:16:18,839 --> 00:16:22,620 and the reply is the client address 424 00:16:20,699 --> 00:16:24,300 saying hi I'm replying from the address 425 00:16:22,620 --> 00:16:26,100 you to send that message to 426 00:16:24,300 --> 00:16:27,839 the command code which is hi this is the 427 00:16:26,100 --> 00:16:29,880 message the command that I'm replying to 428 00:16:27,839 --> 00:16:32,760 and whatever the data is usually the 429 00:16:29,880 --> 00:16:34,560 contents of registers and it checks up 430 00:16:32,760 --> 00:16:36,180 the client always replies with its own 431 00:16:34,560 --> 00:16:38,399 address so that the server can make sure 432 00:16:36,180 --> 00:16:40,680 that it's not getting out of sync if 433 00:16:38,399 --> 00:16:43,320 there's an error if the command didn't 434 00:16:40,680 --> 00:16:45,480 ask for example then the client sends 435 00:16:43,320 --> 00:16:47,540 back the same structure only with a 436 00:16:45,480 --> 00:16:51,000 command code uh with added with plus 437 00:16:47,540 --> 00:16:53,160 128. so the high bit set that means that 438 00:16:51,000 --> 00:16:55,139 command did not work 439 00:16:53,160 --> 00:16:56,759 and an error code called a modbus 440 00:16:55,139 --> 00:17:00,079 exception code there's a bunch of those 441 00:16:56,759 --> 00:17:00,079 and checks up 442 00:17:00,240 --> 00:17:05,880 we're using the ASCII version of modbus 443 00:17:03,120 --> 00:17:08,819 now that means we're actually sending 444 00:17:05,880 --> 00:17:11,339 hexadecimal ASCII characters so we put a 445 00:17:08,819 --> 00:17:12,959 column at the start of a packet 446 00:17:11,339 --> 00:17:16,140 Carriage Eternal Line Feed for the end 447 00:17:12,959 --> 00:17:19,260 of a packet and we send for example the 448 00:17:16,140 --> 00:17:22,439 letter A followed by the digit 0 as 2 449 00:17:19,260 --> 00:17:25,500 8-bit ASCII values to denote one byte 450 00:17:22,439 --> 00:17:26,520 meaning a zero and a register for 451 00:17:25,500 --> 00:17:29,940 example 452 00:17:26,520 --> 00:17:31,980 and it's got a single byte checksum 453 00:17:29,940 --> 00:17:33,179 there's two's complement of the the sum 454 00:17:31,980 --> 00:17:35,039 of all the values that's a terrible 455 00:17:33,179 --> 00:17:36,900 checksum but you know that's in the 456 00:17:35,039 --> 00:17:38,160 standard so that's what had to use we 457 00:17:36,900 --> 00:17:39,539 wanted to keep it compatible with 458 00:17:38,160 --> 00:17:42,000 industry 459 00:17:39,539 --> 00:17:44,179 um uh libraries and tools and stuff like 460 00:17:42,000 --> 00:17:44,179 that 461 00:17:44,520 --> 00:17:48,000 we're using a subset of modbus commands 462 00:17:46,860 --> 00:17:50,520 that handle something called holding 463 00:17:48,000 --> 00:17:52,200 registers as modbus handles a whole heap 464 00:17:50,520 --> 00:17:54,360 of stuff including writing to individual 465 00:17:52,200 --> 00:17:56,280 relay elements with single bit commands 466 00:17:54,360 --> 00:17:58,679 and stuff like that we're just using a 467 00:17:56,280 --> 00:18:00,660 bunch of 16-bit registers so we're using 468 00:17:58,679 --> 00:18:03,059 command codes three which means read 469 00:18:00,660 --> 00:18:05,400 some registers six which means write one 470 00:18:03,059 --> 00:18:06,720 register and 10 which means write a 471 00:18:05,400 --> 00:18:08,520 bunch of registers 472 00:18:06,720 --> 00:18:10,919 so for example if you want to read two 473 00:18:08,520 --> 00:18:13,980 registers from Smart Box one starting at 474 00:18:10,919 --> 00:18:15,299 register 11 you'd send address one 475 00:18:13,980 --> 00:18:17,580 uh 476 00:18:15,299 --> 00:18:19,620 which would be column to start the 477 00:18:17,580 --> 00:18:22,200 packet and then zero one meaning Smart 478 00:18:19,620 --> 00:18:24,240 Box one you'd send then the zero three 479 00:18:22,200 --> 00:18:27,600 which is the read registers command zero 480 00:18:24,240 --> 00:18:31,440 three you'd then send zero zero zero a 481 00:18:27,600 --> 00:18:33,059 for the register address uh 11 minus one 482 00:18:31,440 --> 00:18:36,299 you subtract one to put in the packet 483 00:18:33,059 --> 00:18:38,400 for some reason and then you'd send the 484 00:18:36,299 --> 00:18:40,380 number of registers zero zero zero two 485 00:18:38,400 --> 00:18:41,700 and then you send the checks up and then 486 00:18:40,380 --> 00:18:44,400 you send a carriage return on a line 487 00:18:41,700 --> 00:18:46,740 feed so it's just a print statement to a 488 00:18:44,400 --> 00:18:48,179 device in um a write statement to a 489 00:18:46,740 --> 00:18:49,860 device in Python 490 00:18:48,179 --> 00:18:51,960 and the Smart Box would send back 491 00:18:49,860 --> 00:18:53,640 something similar colon zero one zero 492 00:18:51,960 --> 00:18:55,080 three and then the contents of those 493 00:18:53,640 --> 00:18:57,600 registers 494 00:18:55,080 --> 00:19:00,059 so the Smart Box and the fnpc just have 495 00:18:57,600 --> 00:19:01,380 a bunch of 16-bit registers you write 496 00:19:00,059 --> 00:19:03,179 values to them if you want to change 497 00:19:01,380 --> 00:19:04,440 those registers you read values back if 498 00:19:03,179 --> 00:19:06,480 you want to 499 00:19:04,440 --> 00:19:08,580 um see what they are modbus doesn't 500 00:19:06,480 --> 00:19:10,980 specify anything about those registers 501 00:19:08,580 --> 00:19:15,080 it's up to the individual application to 502 00:19:10,980 --> 00:19:15,080 decide what registers mean what 503 00:19:15,960 --> 00:19:21,080 so while the development guys while the 504 00:19:18,780 --> 00:19:21,080 hardware guys 505 00:19:21,240 --> 00:19:24,660 decided on python code to prototype and 506 00:19:23,460 --> 00:19:26,760 test all of this 507 00:19:24,660 --> 00:19:28,080 so first of all I wrote a transport 508 00:19:26,760 --> 00:19:30,600 library to handle the serial 509 00:19:28,080 --> 00:19:34,020 communication using pi serial and all 510 00:19:30,600 --> 00:19:36,600 the modbus packet assembly and decoding 511 00:19:34,020 --> 00:19:38,760 and that's used by both the server and 512 00:19:36,600 --> 00:19:40,440 some simulated clients 513 00:19:38,760 --> 00:19:42,000 I wrote some controller classes that 514 00:19:40,440 --> 00:19:44,220 represent the internal state of the 515 00:19:42,000 --> 00:19:46,320 remote Hardware it's just a class called 516 00:19:44,220 --> 00:19:48,720 smartbox there's a bunch of attributes 517 00:19:46,320 --> 00:19:50,940 that Define you know the 48 volt 518 00:19:48,720 --> 00:19:53,160 incoming voltage and the current on Port 519 00:19:50,940 --> 00:19:55,559 3 and things like that and each of them 520 00:19:53,160 --> 00:19:58,620 is represented by a register and there's 521 00:19:55,559 --> 00:20:00,059 a couple of functions to read the 522 00:19:58,620 --> 00:20:01,980 contents of those and populate the 523 00:20:00,059 --> 00:20:03,660 attributes in your class instance and 524 00:20:01,980 --> 00:20:05,460 those functions to you know write back 525 00:20:03,660 --> 00:20:08,039 if you change the the port configuration 526 00:20:05,460 --> 00:20:10,980 it writes it back to the device 527 00:20:08,039 --> 00:20:13,140 but I also read simulator classes to act 528 00:20:10,980 --> 00:20:15,720 as clients they respond to modbus 529 00:20:13,140 --> 00:20:18,419 commands by reading and writing their 530 00:20:15,720 --> 00:20:20,460 own internal register States but they 531 00:20:18,419 --> 00:20:22,799 also simulate random mock Telemetry 532 00:20:20,460 --> 00:20:25,320 they'll sit there and slowly change 533 00:20:22,799 --> 00:20:28,260 their internal temperature and current 534 00:20:25,320 --> 00:20:31,380 on Port 3 and stuff like that over some 535 00:20:28,260 --> 00:20:33,720 random slowly varying cycle 536 00:20:31,380 --> 00:20:35,700 so that we can you know simulate some 537 00:20:33,720 --> 00:20:38,419 real hardware and actually see changing 538 00:20:35,700 --> 00:20:38,419 numbers coming back 539 00:20:38,460 --> 00:20:42,120 so the transport Library defines a 540 00:20:40,440 --> 00:20:43,919 connection class but I wanted it to 541 00:20:42,120 --> 00:20:46,740 handle this shared serial bus that 542 00:20:43,919 --> 00:20:49,980 happens at the at a station so in the 543 00:20:46,740 --> 00:20:52,020 station you've got one serial Link in to 544 00:20:49,980 --> 00:20:55,200 a device but there's a whole bunch of 545 00:20:52,020 --> 00:20:56,880 things you can talk to Via modbus on 546 00:20:55,200 --> 00:20:59,100 that one link 547 00:20:56,880 --> 00:21:00,539 so I created this class that has a 548 00:20:59,100 --> 00:21:02,280 connection instance and then you can 549 00:21:00,539 --> 00:21:04,740 share between threads and the idea is 550 00:21:02,280 --> 00:21:06,900 that each simulator object whether it's 551 00:21:04,740 --> 00:21:10,500 a simulated Smart Box or a simulated FN 552 00:21:06,900 --> 00:21:13,679 PC would be a thread it would be a one 553 00:21:10,500 --> 00:21:15,240 or actually two threads that share the 554 00:21:13,679 --> 00:21:17,820 same connection since all of the other 555 00:21:15,240 --> 00:21:19,440 simulated smart boxes so each thread 556 00:21:17,820 --> 00:21:21,120 gets its own independent input buffer 557 00:21:19,440 --> 00:21:22,980 any data received from the physical 558 00:21:21,120 --> 00:21:24,900 serial Port is written to the input 559 00:21:22,980 --> 00:21:27,780 buffer from every thread every thread 560 00:21:24,900 --> 00:21:29,220 then consumes it as needed if it senses 561 00:21:27,780 --> 00:21:30,840 if it detects that something's talking 562 00:21:29,220 --> 00:21:32,580 to it 563 00:21:30,840 --> 00:21:34,440 so if any thread where I started for 564 00:21:32,580 --> 00:21:35,820 connection instance that data is only 565 00:21:34,440 --> 00:21:37,080 written to the external serial Port 566 00:21:35,820 --> 00:21:39,720 that's because that's how the physical 567 00:21:37,080 --> 00:21:41,940 Hardware works in the in the station uh 568 00:21:39,720 --> 00:21:44,760 if one Smart Box writes some bytes of 569 00:21:41,940 --> 00:21:46,919 data only the the outside world sees 570 00:21:44,760 --> 00:21:49,020 that via the the communications Gateway 571 00:21:46,919 --> 00:21:51,539 the other smart boxes don't see that 572 00:21:49,020 --> 00:21:54,360 which helps to keep it more reliable so 573 00:21:51,539 --> 00:21:57,120 it's not a full multi-drop bus it's half 574 00:21:54,360 --> 00:21:59,159 a multi-drop bus 575 00:21:57,120 --> 00:22:00,780 so the controller classes get past an 576 00:21:59,159 --> 00:22:02,940 instant of a connection object and a 577 00:22:00,780 --> 00:22:04,559 modbus address on creation that the 578 00:22:02,940 --> 00:22:06,360 device that they're actually going to 579 00:22:04,559 --> 00:22:09,780 talk to the attributes hold this 580 00:22:06,360 --> 00:22:12,179 Telemetry data and we've got methods to 581 00:22:09,780 --> 00:22:14,159 read it from the hardware and push it to 582 00:22:12,179 --> 00:22:17,220 the push the current contents the 583 00:22:14,159 --> 00:22:18,900 attributes to the to the hardware 584 00:22:17,220 --> 00:22:20,940 and then there's a station control class 585 00:22:18,900 --> 00:22:23,100 that wraps all of those so this is 586 00:22:20,940 --> 00:22:27,539 written to control an entire field of 587 00:22:23,100 --> 00:22:28,980 256 antenna 24 smart boxes and fnzh and 588 00:22:27,539 --> 00:22:30,600 it just creates a bunch of controller 589 00:22:28,980 --> 00:22:33,539 classes that can create 24 Smart Box 590 00:22:30,600 --> 00:22:36,240 classes it creates uh one physical one 591 00:22:33,539 --> 00:22:37,679 fndh class so it's got methods to 592 00:22:36,240 --> 00:22:40,860 initialize and control the entire 593 00:22:37,679 --> 00:22:43,200 station turning the ports on you know at 594 00:22:40,860 --> 00:22:45,179 smartbox three are you there yes if you 595 00:22:43,200 --> 00:22:47,820 are then I'll create a control class for 596 00:22:45,179 --> 00:22:49,740 you and runs an entire station so it 597 00:22:47,820 --> 00:22:52,140 kind of wraps it wraps all those 598 00:22:49,740 --> 00:22:54,900 individual classes 599 00:22:52,140 --> 00:22:56,640 the similar classes get past an instance 600 00:22:54,900 --> 00:22:58,020 of a connection object and a mod match 601 00:22:56,640 --> 00:22:59,760 address on creation just like a 602 00:22:58,020 --> 00:23:01,860 controller but each of them runs two 603 00:22:59,760 --> 00:23:04,860 threads one of them is a lesson thread 604 00:23:01,860 --> 00:23:06,900 that's just responding to serial data 605 00:23:04,860 --> 00:23:09,360 that it sees on its input buffer and 606 00:23:06,900 --> 00:23:12,720 saying is that addressed to me no I'll 607 00:23:09,360 --> 00:23:14,280 ignore it yes I'll respond and I'll give 608 00:23:12,720 --> 00:23:15,900 it whatever it wants I'll give it the 609 00:23:14,280 --> 00:23:18,780 register addresses that it's asked for 610 00:23:15,900 --> 00:23:20,940 or I will write the data that I'm given 611 00:23:18,780 --> 00:23:22,860 to my an internal state 612 00:23:20,940 --> 00:23:25,919 and the other one is a simulator Loop 613 00:23:22,860 --> 00:23:28,679 that just runs in parallel and slowly 614 00:23:25,919 --> 00:23:30,480 randomly drifts in temperature and 615 00:23:28,679 --> 00:23:32,460 handles all of the state the firmware 616 00:23:30,480 --> 00:23:34,559 does on a real device if the temperature 617 00:23:32,460 --> 00:23:36,299 gets too high go into an alarm State 618 00:23:34,559 --> 00:23:38,640 turn all the thoughts off if the current 619 00:23:36,299 --> 00:23:40,500 on Port 3 is too high turn that Port off 620 00:23:38,640 --> 00:23:43,200 because the camel has eaten the cable 621 00:23:40,500 --> 00:23:46,140 so that sits there and stimulates a real 622 00:23:43,200 --> 00:23:48,419 box and the list of loop acts as the 623 00:23:46,140 --> 00:23:51,000 communications to to talk to the monitor 624 00:23:48,419 --> 00:23:53,840 Control software 625 00:23:51,000 --> 00:23:53,840 so I've also got a 626 00:23:58,140 --> 00:24:05,159 so the monitor control side starts out 627 00:24:02,400 --> 00:24:07,559 by talking to just an fndh and it says 628 00:24:05,159 --> 00:24:10,140 all right you're initialized now turn on 629 00:24:07,559 --> 00:24:11,880 Port one and when the simulator the 630 00:24:10,140 --> 00:24:13,919 station's email addresses are Port one 631 00:24:11,880 --> 00:24:16,440 has been turned on but one I've been 632 00:24:13,919 --> 00:24:18,120 told is connected to smartbox three I 633 00:24:16,440 --> 00:24:20,400 will fire up an instance of a Smart Box 634 00:24:18,120 --> 00:24:22,919 simulator start the two threads for that 635 00:24:20,400 --> 00:24:26,120 class to simulate a physical Smart Box 636 00:24:22,919 --> 00:24:28,980 bind it to modbus address number three 637 00:24:26,120 --> 00:24:30,840 and now the monitor control system can 638 00:24:28,980 --> 00:24:34,080 talk to Smart Bus 3. 639 00:24:30,840 --> 00:24:36,059 so as each Port is turned on more of 640 00:24:34,080 --> 00:24:38,159 these Smart Box simulator classes are 641 00:24:36,059 --> 00:24:42,299 created more of the threads are started 642 00:24:38,159 --> 00:24:44,220 to simulate their existence and this 643 00:24:42,299 --> 00:24:45,480 station simulator can pretend to be an 644 00:24:44,220 --> 00:24:49,340 entire station 645 00:24:45,480 --> 00:24:49,340 up with up to about 50 threads 646 00:24:49,620 --> 00:24:54,240 so if a port is turned off it kills 647 00:24:52,380 --> 00:24:58,880 those threads deletes the Smart Box 648 00:24:54,240 --> 00:24:58,880 instance and that's Mark boxes now off 649 00:24:58,980 --> 00:25:05,880 so by early 2021 before we even had 650 00:25:02,100 --> 00:25:08,280 Hardware ready to test I had a full ska 651 00:25:05,880 --> 00:25:10,980 station ready in software 652 00:25:08,280 --> 00:25:14,340 so I had a station controller that could 653 00:25:10,980 --> 00:25:16,020 control an fndh and 24 smart boxes I had 654 00:25:14,340 --> 00:25:17,640 an ethernet cable going to one of these 655 00:25:16,020 --> 00:25:20,520 little whiz net modules sitting on my 656 00:25:17,640 --> 00:25:23,280 desk I then had a rs232 Serial cable 657 00:25:20,520 --> 00:25:25,080 going to another computer which was 658 00:25:23,280 --> 00:25:28,080 running the sessions emulator so that 659 00:25:25,080 --> 00:25:30,240 simulated an fndh and up to 24 smart 660 00:25:28,080 --> 00:25:31,980 boxes that can be turned on and off 661 00:25:30,240 --> 00:25:34,860 and that's how he developed the hardware 662 00:25:31,980 --> 00:25:36,059 we had a full station simulator and we 663 00:25:34,860 --> 00:25:37,679 could simulate anything from an 664 00:25:36,059 --> 00:25:39,659 individual Smart Box all the way through 665 00:25:37,679 --> 00:25:42,360 a full set of them so we could do things 666 00:25:39,659 --> 00:25:44,279 like what bandwidth do we need to 667 00:25:42,360 --> 00:25:47,159 actually monitor these things at any 668 00:25:44,279 --> 00:25:49,380 kind of reasonable rate how much dead 669 00:25:47,159 --> 00:25:50,240 time do we have on that for doing other 670 00:25:49,380 --> 00:25:53,360 stuff 671 00:25:50,240 --> 00:25:55,740 how do we do things like handle 672 00:25:53,360 --> 00:25:57,059 servicing if somebody wants to service a 673 00:25:55,740 --> 00:25:59,220 box we don't want to take down the 674 00:25:57,059 --> 00:26:02,100 entire station how do we handle you know 675 00:25:59,220 --> 00:26:04,020 responding to a press button on a box to 676 00:26:02,100 --> 00:26:06,059 have the the monitor Control software 677 00:26:04,020 --> 00:26:08,400 turn off just that box so that a 678 00:26:06,059 --> 00:26:11,340 technician can work on it so we we work 679 00:26:08,400 --> 00:26:13,440 through designing uh stuff like how the 680 00:26:11,340 --> 00:26:16,020 the maintenance would work as well as 681 00:26:13,440 --> 00:26:18,120 verifying the actual firmware so that 682 00:26:16,020 --> 00:26:20,279 the guys doing the hardware and the guy 683 00:26:18,120 --> 00:26:22,440 doing the firmware we're working in 684 00:26:20,279 --> 00:26:24,720 parallel with the simulator codes so 685 00:26:22,440 --> 00:26:26,640 that they could validate the um the 686 00:26:24,720 --> 00:26:29,159 firmware Behavior against the the 687 00:26:26,640 --> 00:26:30,240 simulators and the simulators changed as 688 00:26:29,159 --> 00:26:31,919 it turned out that some things went 689 00:26:30,240 --> 00:26:34,500 possible to learn Hardware obviously the 690 00:26:31,919 --> 00:26:36,360 code had to change when the firmware guy 691 00:26:34,500 --> 00:26:39,659 developed new ideas like the ability to 692 00:26:36,360 --> 00:26:42,840 push remote firmware and do cool things 693 00:26:39,659 --> 00:26:48,380 the stuff I had to change so from 2021 694 00:26:42,840 --> 00:26:49,919 through to basically now it was a very 695 00:26:48,380 --> 00:26:53,279 responsive 696 00:26:49,919 --> 00:26:55,320 um three-way design process 697 00:26:53,279 --> 00:26:56,820 so the current status is that we've had 698 00:26:55,320 --> 00:26:59,039 a prototype running in the desert for 699 00:26:56,820 --> 00:27:01,799 about 18 months it only has four smart 700 00:26:59,039 --> 00:27:03,659 boxes connected to it but it's otherwise 701 00:27:01,799 --> 00:27:05,640 a full working system 702 00:27:03,659 --> 00:27:09,419 we have built and delivered a full 703 00:27:05,640 --> 00:27:11,400 system of 24 smart boxes and an fndh in 704 00:27:09,419 --> 00:27:13,340 all of their respective enclosures and 705 00:27:11,400 --> 00:27:16,440 fiber set up to 706 00:27:13,340 --> 00:27:18,960 Geraldton and it being installed on the 707 00:27:16,440 --> 00:27:22,200 field last week and it's powered up and 708 00:27:18,960 --> 00:27:24,299 being tested remotely and that will be 709 00:27:22,200 --> 00:27:26,039 part of a new SK prototype station 710 00:27:24,299 --> 00:27:28,980 called avs3 711 00:27:26,039 --> 00:27:31,679 we've handed off the entire design our 712 00:27:28,980 --> 00:27:33,480 hardware and firmware for sklo 713 00:27:31,679 --> 00:27:36,000 construction it's been taken up by a 714 00:27:33,480 --> 00:27:38,940 manufacturer for mass production 715 00:27:36,000 --> 00:27:41,539 and the sko guys are riding their own 716 00:27:38,940 --> 00:27:44,940 Control software they have a very 717 00:27:41,539 --> 00:27:46,559 controlled development process I'm not 718 00:27:44,940 --> 00:27:48,840 part of that control development process 719 00:27:46,559 --> 00:27:50,700 so they're writing their own software to 720 00:27:48,840 --> 00:27:52,860 actually run it but it's also based in 721 00:27:50,700 --> 00:27:55,620 Python it's using a system called Tango 722 00:27:52,860 --> 00:27:57,900 controls which is a a framework for 723 00:27:55,620 --> 00:27:59,659 interacting with Hardware control 724 00:27:57,900 --> 00:28:02,460 systems 725 00:27:59,659 --> 00:28:04,200 how am I doing for time running a bit 726 00:28:02,460 --> 00:28:07,320 short 727 00:28:04,200 --> 00:28:08,580 so my code is on GitHub it's MIT 728 00:28:07,320 --> 00:28:11,279 licensed 729 00:28:08,580 --> 00:28:14,640 the uh Kyra The Institute where I work 730 00:28:11,279 --> 00:28:16,320 is there mwa telescope which is my baby 731 00:28:14,640 --> 00:28:18,059 um Tango controls if you're interested 732 00:28:16,320 --> 00:28:19,440 in that and the little wiznet modules 733 00:28:18,059 --> 00:28:21,840 are pretty cool 734 00:28:19,440 --> 00:28:23,820 and this animation here is just some 735 00:28:21,840 --> 00:28:26,179 tech drawings showing how the bits all 736 00:28:23,820 --> 00:28:26,179 fit together 737 00:28:29,039 --> 00:28:34,740 and I promised 738 00:28:31,440 --> 00:28:37,880 a live view of some telemetry 739 00:28:34,740 --> 00:28:37,880 which I'll show you now 740 00:28:40,919 --> 00:28:47,520 so this here is 741 00:28:44,220 --> 00:28:49,460 live data from Smart Box one 742 00:28:47,520 --> 00:28:51,779 so you can see there 743 00:28:49,460 --> 00:28:53,400 around all this by the way I wrote a 744 00:28:51,779 --> 00:28:55,620 rapper that actually you know grabs the 745 00:28:53,400 --> 00:28:57,600 data puts in a database writes it to 746 00:28:55,620 --> 00:29:00,240 carbon whisker a whisper around Robin 747 00:28:57,600 --> 00:29:02,760 databases and grafana to view it so that 748 00:29:00,240 --> 00:29:04,860 low level stuff was the guts and there's 749 00:29:02,760 --> 00:29:07,260 wrappers around the outside of that so 750 00:29:04,860 --> 00:29:10,020 that's the live data it's about 751 00:29:07,260 --> 00:29:12,299 20 degrees out there this is over the 752 00:29:10,020 --> 00:29:14,039 last 30 days you can see the temperature 753 00:29:12,299 --> 00:29:16,500 is going up and down 754 00:29:14,039 --> 00:29:17,600 the individual currents in milliamps for 755 00:29:16,500 --> 00:29:20,039 each of the 756 00:29:17,600 --> 00:29:21,840 fems on smartbox one 757 00:29:20,039 --> 00:29:22,980 and you can see a whole bunch of stuff 758 00:29:21,840 --> 00:29:25,080 and we've got a bunch of different 759 00:29:22,980 --> 00:29:26,760 grafana pages for digging into this and 760 00:29:25,080 --> 00:29:29,039 we use that to do things like working 761 00:29:26,760 --> 00:29:31,380 out temperature dependence uh how well 762 00:29:29,039 --> 00:29:34,520 they handled high temperatures on site 763 00:29:31,380 --> 00:29:34,520 during summer things like that 764 00:29:36,000 --> 00:29:41,999 and that is it from me 765 00:29:38,910 --> 00:29:41,999 [Applause] 766 00:29:42,620 --> 00:29:47,940 thank you very much Andrew 767 00:29:45,419 --> 00:29:49,980 now I learned my lesson earlier and not 768 00:29:47,940 --> 00:29:51,419 relying on my memory this time 769 00:29:49,980 --> 00:29:53,880 we're going to take one question from 770 00:29:51,419 --> 00:29:56,039 Discord and then one from the room so 771 00:29:53,880 --> 00:29:57,480 signal to Jack if you're in the room and 772 00:29:56,039 --> 00:29:59,760 you have a question because he's going 773 00:29:57,480 --> 00:30:01,919 to be the one running the mic to you 774 00:29:59,760 --> 00:30:04,440 question from Discord is how do you 775 00:30:01,919 --> 00:30:06,120 correct for attenuation in the fiber is 776 00:30:04,440 --> 00:30:08,220 there a pre-calibration or regular 777 00:30:06,120 --> 00:30:10,260 recalibration and similar temperature 778 00:30:08,220 --> 00:30:12,480 stability of lead output yeah that style 779 00:30:10,260 --> 00:30:14,159 done by the science guys they look at an 780 00:30:12,480 --> 00:30:16,559 object in the sky of a known brightness 781 00:30:14,159 --> 00:30:18,779 and they use that to calibrate each and 782 00:30:16,559 --> 00:30:20,880 every antenna sensitivity and they would 783 00:30:18,779 --> 00:30:22,559 be doing that either every day or before 784 00:30:20,880 --> 00:30:24,480 every observation that's something you 785 00:30:22,559 --> 00:30:26,100 have to do for any radio telescope and 786 00:30:24,480 --> 00:30:27,360 they also calibrate the length of the 787 00:30:26,100 --> 00:30:29,279 cable because when you're measuring 788 00:30:27,360 --> 00:30:30,899 delays the length of each individual 789 00:30:29,279 --> 00:30:32,940 cable is very important so they can also 790 00:30:30,899 --> 00:30:34,799 determine the length of each cable all 791 00:30:32,940 --> 00:30:36,840 the way from the antenna all the way out 792 00:30:34,799 --> 00:30:39,419 to the correlator rim to the nearest few 793 00:30:36,840 --> 00:30:41,840 millimeters by looking at known objects 794 00:30:39,419 --> 00:30:41,840 in the sky 795 00:30:43,799 --> 00:30:48,899 excellent talk 796 00:30:46,440 --> 00:30:51,240 my question is a little more General as 797 00:30:48,899 --> 00:30:54,000 someone who was not comfortable with 798 00:30:51,240 --> 00:30:57,720 control systems in college 799 00:30:54,000 --> 00:31:01,140 like what what's the I mean for someone 800 00:30:57,720 --> 00:31:03,360 uh for generic people why modbus why not 801 00:31:01,140 --> 00:31:04,940 can bus or other application layers over 802 00:31:03,360 --> 00:31:08,159 TCP 803 00:31:04,940 --> 00:31:10,580 I'm not sure we wanted something that 804 00:31:08,159 --> 00:31:12,960 would be suitable for a low speed 805 00:31:10,580 --> 00:31:15,059 microcontroller and we wanted something 806 00:31:12,960 --> 00:31:18,600 where we didn't have to have 807 00:31:15,059 --> 00:31:21,539 any kind of smarts on site we wanted all 808 00:31:18,600 --> 00:31:23,120 of the intelligence to be in software on 809 00:31:21,539 --> 00:31:25,679 a Linux server in a control room 810 00:31:23,120 --> 00:31:28,440 otherwise we'd have to have you know 811 00:31:25,679 --> 00:31:31,020 firmware in the station box the fndh 812 00:31:28,440 --> 00:31:32,640 talking to each of the individual units 813 00:31:31,020 --> 00:31:34,200 and then aggregating it and then sending 814 00:31:32,640 --> 00:31:36,299 it back by some other protocol we wanted 815 00:31:34,200 --> 00:31:37,799 to keep it consistent but as to why 816 00:31:36,299 --> 00:31:39,360 modbus was chosen or anything over 817 00:31:37,799 --> 00:31:41,640 anything else that wasn't my decision 818 00:31:39,360 --> 00:31:43,880 that was um Dave and Phil and the design 819 00:31:41,640 --> 00:31:43,880 guys 820 00:31:44,940 --> 00:31:50,220 thank you again Andrew and thank you 821 00:31:47,159 --> 00:31:53,190 from the conference for giving a talk 822 00:31:50,220 --> 00:31:56,380 there's a round of reports please 823 00:31:53,190 --> 00:31:56,380 [Music] 824 00:31:57,130 --> 00:31:59,380 [Applause]