Always a learning experience.
Yep. The beveled side is the other indicator.
WOW. Dead shorts from power to ground can be pigs to find. The solder mask registration was a gnats kneecap out so the solder from an 0805 resistor just bridged a nearby track that was only 90% masked. I had to crank up the microscope to full blast and look at every component in turn and it was still very difficult to spot. Just imagine if this had been a large board.
Brilliant link. Thanks.
This is why I hate software so much. Well a few reasons. On the atmega128 dev board the RX interrupts worked fine. I could send data in and out. On the atmega328 boards (ie mine) the ISR for receipt is triggered but the data which kicked off the interrupt is blank. I cannot afford the tools that can step into an ISR and I am not too sure how to trigger a data receipt interrupt with the simulator. Or if it would be meaningful. The Data Visualiser works for monitoring data out but I cannot send it in and have the code stop on a breakpoint.
So in deep frustration I looked at the STM32 ARM cortex M4 MCU. (particularly the very nice, quick, dev board (STMicroelectronics NUCLEO-F401RE ) which is super cheap and loads of good tools. A bit more rummaging and there is a MBED 5 port of the freeModbus library. Nirvana!!
Click on API documentation. Like almost all software developers I have ever known documentation is (unless I am being really myopic) totally missing. Just the source code. How many developers have said “My code is self commentating, I need almost no comments or documentation”. OK I am ranting but I am a massive believer in documenting everything. I would rather plow 50 pages of dense but totally comprehensive explanatory text than any number of comments that only the author understood.
New boards (the final ones from a cheaper supplier) are on the way. If they are good I will get the motivation to try again or not use interrupts for data receipt which is possible but painful. I have a bread-boarded atmega328P so I could dig out the logic analyzer and have a trace on every pin. Old fashioned perhaps but why not if it helps?
The power board PCB is due soon and all the parts are in including a nice compact lipo so at least that should be finished in the next couple of days.
Yeah, this had me excited until I read the rest. No one else is utilizing this/helping document it on the web? Any chance to ask about it on their forums as well? Maybe there’s a hidden PDF somewhere?
I always think this is a good idea regardless, just to check that reality is matching what I’m seeing on screen. In my case it’s almost always overkill…but at least i know it is
The new boards have arrived from JLC. Ten for 1/3 of the price of OSHPark, and quicker delivery to boot. They are double the thickness as well so very solid and tinned. I have an ‘improvement’ re-spin of the main PLC on order but the current boards are good enough to be put into their boxes and mounted under the rail baseboard ready for wiring. The power board has arrived so I can convert my train to battery operation. Once tested out that bit is done.
I have toyed with other MCUs for the main PLC but have decided to produce a MK2 using the atmega128. The chip is five times the price but much more versatile. More ports, inputs, USARTS, etc. I hope to use lessons learned from the train PLC to increase layout density and have 3 times the number of ports for only about 30% more board area if that. It will also have local memory for storage of downloaded code and parameters.
The RS485 interfaces have been totally reliable, as they should be. I will implement using my own packet structure and will migrate to modbus in time.
So for now a brief hiatus (and wingnut wings Sopwith kit to be built) before recommencing the rail layout build out.
No hiatus yet. Two PLCs are now in their boxes, with two more boards being built. Also a power and termination box which can take a power board (as used on the train) and two or three 18650s at 3300mAH each (or a lipo). This power box will provide 5 and 12v. This box will have an adapted male 9pin D connector (as against a female used in the PLCs) so it can plug into the last PLC in the chain. The RS485 lines will be terminated with appropriate resistors (which I will have to experiment with but ball park numbers are out there). A simple RS485 terminator plug will also be built and possibly a cable for taking power from an external supply as well.
Drilled and filed keyholes in the base of the boxes will allow them to be mounted by pushing and then sliding into place with suitably positioned screws. They can be removed and fitted without tools.
For now the power boards and PLCs are completed and the main delay is the track build which will take some time. In the mean time I have toyed with using STM MCUs which are produced in the EU by a Franco Italian Company.
These devices have several advantages over the Atmel Atmega range and I will spend the next week or so evaluating the STM32F401RE MCU. Ten very high quality PCBs are available for only $8 delivered so the cost of experimenting is minimal.
Next stage of the project is a light sequencer to do just that. LEDs in street lights and houses will be turned on in a realistic sequence by a small module driven by an I2C interface. The PLC has I2C output so this would allow me to have a network of a few small sequencers for buildings and streets in the model rail setup. The sequencer will probably have an attiny device to allow intelligent sequencing, maybe with an RTC as well.
Modbus… I am having a solar panel system installed. I see the proposed battery, controller and inverter all use RS485 and modbus. Seems quite popular.
Capacitors have an hour rating???
Just had my Chinese kit tube amp go bang after three years use. The fault was a 47uF Nichicon 105c reservoir cap across the B+ from a 5Z4P tube. I brought a replacement and the datasheets stated it was a 4000 hour cap. 1000 hour caps were cheaper and 10000 hour ones were available.
That is news to me. In normal use 4000 hours will last just under three years. I recap valve radios as a branch hobby but had no idea that electrolytics had an hourly rating. I will put in a tag strip so every two years the old cap can be snipped out and be replaced as a matter of course. Seems a bit mad.
Oh dear. The 5Z4G tube has a max reservoir cap value of 32uF. Hmmmm. Time to investigate further.
Personally, I’ve never seen that before, but I don’t doubt it. If you think about any series resistance times the expected power and then the associated temp rise, you’ll have some amount of evaporation in the electrolyte. That’s outside of the natural evaporation.
I believe the hour rating would be for actual hours of use though, not hours of existence. Is your amp on all the time?
Well at least 4 hours a day. All audio from my PC. Movies, music etc. I have found another datasheet that specifies 16uF for the capacitor before the choke. Parts are on order so I can drop the value and put balance resistors across the caps. It has made me not trust the design. Almost like values were pulled out of the air rather than by calculation or from datasheets… Which I think we have all seen before.
Aluminum electrolytic capacitors have always had a “life” rating. It will appear on datasheets and is a search/filter parameter on most vendor websites (ie. Mouser, DigiKey, RS, …).
The “life” rating, aka endurance, is specified at the caps rated voltage, max temperature and ripple current.
That would be a bit of a waste. The “life” expectancy of an aluminum electrolytic cap can be doubled for every 10 degrees it’s operating temperature is below the specified max temperature. Therefore for a 4000 hour cap rated at 105C running at 40C would have a life expectancy of more than 40 years. The life expectancy also increases when operating at less than the rated voltage and/or ripple current. The datasheet usually also contains the data for calculating the de-rated life. While some capacitors might actually last 40 years, a reasonable maximum life expectancy is considered to be about 15 years.
They also have a shelf life when stored without a charge, usually around two years.
After a long hiatus I have started some more building and have a very basic question about fuses and PSU protection.
I am putting together a tube PSU with a 275:0:275v secondary transformer. It will have 100ohm current limiting resistors in each secondary arm feeding a 6CA4. I am thinking of adding wire ended glass fuses rated at 250V 250mA slow blow also in each arm after the resistors.
OK these are 250v not 260 but maybe the 10v will not be critical. Slow blow may also not be necessary but just in case the amp is turned off and immediately switched back on the main tubes will still be hot so some current surge will be expected.
The amp will draw 150mA from a 230mA transformer. I have had a rectifier tube go short in another amp and the transformer cooked, though the primary fuse did not blow. 250mA is the smallest fuse I could find so I was wondering.
- If this is too high a rating considering the transformer limits?
- Will the fuse burn out before the transformer, and should I maybe go for a fast blow fuse?
- Should I crimp in thermal fuses glued to the transformer to melt open based only on temperature? A thermal fuse will be immune to surges though choosing the right temperature and mounting location will be challenging.
My gut feeling is as most supplies do not have fuses in their secondaries anyway having anything is a belt and brace approach which should not cause any harm. Rectifier tubes do fail, I cannot predict which of the two diodes will go short and the result is not nice when a transformer pours molten black gunge everywhere…
There are dreadful Chinese kits and some that are half decent. All can be therapeutic. Well in a solid bash I have just finished a working 8W EL34 stereo kit that held few surprises and could be described as passable quality. The only unexpected turn of events is the fact that the original Chinese tubes sound less noisy and have lower perceived background hum than US/European NOS. Or to put it more simply the 6N9P provided sounds much better than my stock 6SL7GTs.
Transformers and case have arrived from bluebellaudio.com so my non kit, ‘nothing gets added until I fully understand why it is there’ build is ready to start. The first amp sits on a games PC, my own build is for relaxed listening, so it had better be up to spec.