|
Forum Index : Microcontroller and PC projects : Micromite Nixie clock revisited
| Author | Message | ||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 10574 |
Ages ago I designed a PCB for a Micromite controlled Nixie clock. I revisited the design recently and have made one. The schematic and main board layout are below. The design uses a DS3231 module as the time source with the option of a GPS input or a 1PPS source. It uses a TEMT6000X light sensor to support automatic dimming. You can see the light pipe I use to bring the outside illumination to the sensor. The big change from the previous design was to mount the Nixie tubes on separate small PCBs. This allows various different tubes to be used. The current version uses IN-12A but I've also developed PCBs for the IN-14. The IN-12A can be mounted vertically like I have done or flat against the main PCB. All gerbers are attached. The important component is the HV5530. This is a 32 channel high voltage open collector driver. Two of these are chained together to support 6 digits (6 x 10) and 4 "dots". The unit takes a 12V supply from a standard Walwart and then uses a DC-DC converter to generate the 180VDC needed to fire the Nixie tubes. Control of the clock is via an IR receiver which I've mounted on the front panel. The PCB also supports a DS18B20 to allow temperature to be displayed. The code is currently primitive and doesn't include the support for the IR receiver but is enough to run the clock and auto-dim. The dimming supports a cut-off such that the seconds tubes are not lit at night. Current version of the code below. The only important bit is the tables that map the outputs on the HV5530 to the individual numbers. Other than that anyone who built the clock could program any variants they want. Of course the display could be used for outputting any numerical information not just time and temperature. Enjoy ![]() ![]() ![]() ![]() ![]() Nixie - Project.pdf NixieV1.2.zip in14.zip in12.zip OPTION EXPLICIT OPTION DEFAULT NONE option autorun on DIM i%, j%, k%, s$ const lightlevel%=23 Const BL%=26 const LE%=24 rtc gettime setpin BL%,DOUT SETPIN LE%,DOUT SETPIN lightlevel%,AIN spi open 1000000,0,8 spi write 8,0,0,0,0,0,0,0,0 pin(le%)=1 pin(le%)=0 PWM 2,1000,PIN(lightlevel%)/3.3*100 'tens of hours data 0,0,0,32,0,0,0,0 data 0,0,0,16,0,0,0,0 data 0,0,0,8,0,0,0,0 data 0,0,0,4,0,0,0,0 data 0,0,0,2,0,0,0,0 data 0,0,0,1,0,0,0,0 data 0,0,2,0,0,0,0,0 data 0,0,1,0,0,0,0,0 data 0,0,0,128,0,0,0,0 data 0,0,0,64,0,0,0,0 DATA 0,0,0,0,0,0,0,0 'units of hours data 0,0,64,0,0,0,0,0 data 0,0,32,0,0,0,0,0 data 0,0,16,0,0,0,0,0 data 0,0,8,0,0,0,0,0 data 0,0,4,0,0,0,0,0 data 0,8,0,0,0,0,0,0 data 0,4,0,0,0,0,0,0 data 0,2,0,0,0,0,0,0 data 0,1,0,0,0,0,0,0 data 0,0,128,0,0,0,0,0 DATA 0,0,0,0,0,0,0,0 ' tens of minutes data 16,0,0,0,0,0,0,0 data 8,0,0,0,0,0,0,0 data 4,0,0,0,0,0,0,0 data 2,0,0,0,0,0,0,0 data 1,0,0,0,0,0,0,0 data 0,128,0,0,0,0,0,0 data 0,64,0,0,0,0,0,0 data 128,0,0,0,0,0,0,0 data 64,0,0,0,0,0,0,0 data 32,0,0,0,0,0,0,0 DATA 0,0,0,0,0,0,0,0 ' units of minutes data 0,0,0,0,0,0,0,16 data 0,0,0,0,0,0,0,8 data 0,0,0,0,0,0,0,4 data 0,0,0,0,0,0,0,2 data 0,0,0,0,0,0,0,1 data 0,0,0,0,0,0,2,0 data 0,0,0,0,0,0,1,0 data 0,0,0,0,0,0,0,128 data 0,0,0,0,0,0,0,64 data 0,0,0,0,0,0,0,32 DATA 0,0,0,0,0,0,0,0 ' tens of seconds data 0,0,0,0,0,1,0,0 data 0,0,0,0,0,0,128,0 data 0,0,0,0,0,0,64,0 data 0,0,0,0,0,0,32,0 data 0,0,0,0,0,0,16,0 data 0,0,0,0,0,32,0,0 data 0,0,0,0,0,16,0,0 data 0,0,0,0,0,8,0,0 data 0,0,0,0,0,4,0,0 data 0,0,0,0,0,2,0,0 DATA 0,0,0,0,0,0,0,0 ' units of seconds data 0,0,0,0,4,0,0,0 data 0,0,0,0,2,0,0,0 data 0,0,0,0,1,0,0,0 data 0,0,0,0,0,128,0,0 data 0,0,0,0,0,64,0,0 data 0,0,0,0,128,0,0,0 data 0,0,0,0,64,0,0,0 data 0,0,0,0,32,0,0,0 data 0,0,0,0,16,0,0,0 data 0,0,0,0,8,0,0,0 DATA 0,0,0,0,0,0,0,0 dim map%(5,10,7) dim rearleft%(7)=(0,16,0,0,0,0,0,0) DIM frontleft%(7)=(0,32,0,0,0,0,0,0) dim rearright%(7)=(0,0,0,0,0,0,4,0) DIM frontright%(7)=(0,0,0,0,0,0,8,0) for i%=0 to 5 for j%=0 to 10 for k%=0 to 7 read map%(i%,j%,k%) next k% next j% next i% settick 30000,rtcget,1 settick 1000,lightget,2 do s$=time$ i%=val(left$(s$,2)) i%=i%+1 if i%=24 then i%=0 i%=i%*10000 i%=i% + val(mid$(s$,4,2))*100 i%=i% + val(mid$(s$,7,2)) calcbits i% loop sub calcbits(k%) LOCal n%=k% local th%=n%\100000 n%=n%-th%*100000 local uh%=n%\10000 n%=n%-uh%*10000 local tm%=n%\1000 n%=n%-tm%*1000 local um%=n%\100 n%=n%-um%*100 local ts%=n%\10 local us%=n%-ts%*10 if PIN(lightlevel%)<0.5 then 'turn off seconds at night ts%=10 us%=10 endif local a%,b%,c%,d%,e%,f%,g%,h% a%=map%(0,th%,0) or map%(1,uh%,0) OR map%(2,tm%,0) or map%(3,um%,0) or map%(4,ts%,0) or map%(5,us%,0) b%=map%(0,th%,1) or map%(1,uh%,1) OR map%(2,tm%,1) or map%(3,um%,1) or map%(4,ts%,1) or map%(5,us%,1) c%=map%(0,th%,2) or map%(1,uh%,2) OR map%(2,tm%,2) or map%(3,um%,2) or map%(4,ts%,2) or map%(5,us%,2) d%=map%(0,th%,3) or map%(1,uh%,3) OR map%(2,tm%,3) or map%(3,um%,3) or map%(4,ts%,3) or map%(5,us%,3) e%=map%(0,th%,4) or map%(1,uh%,4) OR map%(2,tm%,4) or map%(3,um%,4) or map%(4,ts%,4) or map%(5,us%,4) f%=map%(0,th%,5) or map%(1,uh%,5) OR map%(2,tm%,5) or map%(3,um%,5) or map%(4,ts%,5) or map%(5,us%,5) g%=map%(0,th%,6) or map%(1,uh%,6) OR map%(2,tm%,6) or map%(3,um%,6) or map%(4,ts%,6) or map%(5,us%,6) h%=map%(0,th%,7) or map%(1,uh%,7) OR map%(2,tm%,7) or map%(3,um%,7) or map%(4,ts%,7) or map%(5,us%,7) b% = b% OR 48 if ts%<>0 then g% = g% OR 12 sendtime a%,b%,c%,d%,e%,f%,g%,h% end sub ' sub sendtime a%,b%,c%,d%,e%,f%,g%,h% spi write 8,a%,b%,c%,d%,e%,f%,g%,h% pin(le%)=1 pin(le%)=0 end sub ' sub rtcget rtc gettime end sub ' sub lightget PWM 2,1000,MAX(PIN(lightlevel%)/3.3*100,5) end sub Edited 2020-04-19 23:37 by matherp |
||||
| Geoffg Guru Joined: 06/06/2011 Location: AustraliaPosts: 3308 |
Brilliant. Absolutely brilliant. ![]() Geoff Graham - http://geoffg.net |
||||
jman![]() Guru Joined: 12/06/2011 Location: New ZealandPosts: 711 |
FANTASTIC |
||||
| Paul_L Guru Joined: 03/03/2016 Location: United StatesPosts: 769 |
Very nice compact linear code! |
||||
Chopperp![]() Guru Joined: 03/01/2018 Location: AustraliaPosts: 1106 |
@Paul_L. I'm glad you popped up. I was wondering how you were getting on over there in the Land of the F...... what ever it is now. Brian. ChopperP |
||||
| Paul_L Guru Joined: 03/03/2016 Location: United StatesPosts: 769 |
@Chopperp. Hi Brian. I'm still here. I'm hanging out at home as much as possible ... turning into a hermit. So far Dutchess County, population 293,718, has 2,240 (0.76% of population) confirmed cases and 28 deaths (1.25% of cases, 0.009% of population) due to COVID-19, It will get solved when they find a vaccine. As a point of reference, the U S population, as I write this, is 329,543,004. We normally have one death every 11 seconds, or 7,855 per day. The death rate due to COVID-19 began picking up at about March 10, or 41 days ago. During the last 41 days our normal death rate should have resulted in 322,055 deaths. COVID-19 is credited with 35,314 deaths in those 41 days, or 10.9% of our normal death rate. But, that does not mean that COVID-19 has increased the death rate by that much because some of the COVID-19 deaths would have occurred without the virus and some of those who died from COVID-19 in the past 41 days would have otherwise died in the near future. We are time shifting deaths to a few weeks earlier than they should have happened. For a major pandemic that doesn't sound too bad to me. Paul in NY |
||||
| lizby Guru Joined: 17/05/2016 Location: United StatesPosts: 3470 |
>We are time shifting deaths to a few weeks earlier than they should have happened. Or it is possible that with charts like the one below, we will not see a drop below the historical level in the coming months, as this would predict, but a continuance above; new territory: ![]() PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 10574 |
Off topic? |
||||
| Paul_L Guru Joined: 03/03/2016 Location: United StatesPosts: 769 |
Yes it is, sorry about that. I only did it because Brian asked how I was getting on over there. Paul in NY |
||||
Chopperp![]() Guru Joined: 03/01/2018 Location: AustraliaPosts: 1106 |
Thanks Paul. Interesting stats, Glad you are still up to it. Some people like being a hermit. Not a good time for the aircraft industry either!!! BTW, did any aircraft use nixie tubes in their instrumentation displays at one time or another? Keep safe Brian ChopperP |
||||
| Paul_L Guru Joined: 03/03/2016 Location: United StatesPosts: 769 |
Brian ... I can't think of any nixies anywhere. It would have had to have been back in the days of piston engines and props and the glass structure with high voltage bouncing around inside would not have been conducive to peaceful coexistence with gasoline tanks. The first 707-100s and DC8-100s didn't have any alphanumeric displays at all, just analog pointers or dials and indicator lights everywhere. Here's a photo of the cockpit of a B707-123B built in 1959. Nothing but meter movements, synchrotel pointers or cards and lights. Paul in NY ![]() Edited 2020-04-22 22:26 by Paul_L |
||||
Chopperp![]() Guru Joined: 03/01/2018 Location: AustraliaPosts: 1106 |
Thanks Paul. I was probably thinking of test equipment which had them in. Keep safe. Brian ChopperP |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |