Jump to content

Unimportant

Member
  • Posts

    1,230
  • Joined

  • Last visited

Everything posted by Unimportant

  1. Both ESR and capacitance measurements are influenced by any circuits in parallel to the capacitor under test, so it's best to remove them and measure them out of circuit. He's right in that if you've removed them anyway why not just replace them?
  2. It's a relay output. When inactive COM is connected to NC (normally closed) and disconnected from NO (normally open). When active the connections reverse. All it does is switch so you'll still need some power source to operate the lock.
  3. @Dutch_Master Variables that are shared between the main and Interrupt code, such as "state", for example, should be declared volatile, for starters.
  4. I'll bet both my nuts any entrepreneur capable of building a successful business like this knows better then to hang on to large amounts of depreciating fiat currency.
  5. @Rheostat. The first loop is continually overwriting the number variable with the new number the user enters. All you need to do is add number to the total right there and then, no need for the second loop.
  6. @Kimmaz Afaik, the only way to "import" a character in fallout2 is by modifying a savegame. Your character stats are supposed to be stored in the SAVE.DAT file. A possible way to reverse engineer what you need is to modify a savegame with a existing character editor like falche2, only changing a single stat at a time, and checking which byte(s) changed by comparing the before and after. That way you can one by one find the relevant locations in the save file.
  7. Does it power on and come out of sleep when a video signal is applied? (Usually indicated by some status LED). If so, try shining into the screen with a strong flashlight and see if you can see a faint image. If you can then the backlight does not work, which is a common problem for LCD monitors in general. Cause of that could still be lots of things. If you're absolutely convinced it is a capacitor, you'll need a ESR meter and a capacitance meter, and test suspect capacitors for both their capacitance and ESR - failure mode can be one or the other, or both. Failed capacitors need not be bulging.
  8. It's an abbreviation of "data". An extention often used for whatever datafile one happens to need/come up with at the moment. As such there's no standard format for .dat files.
  9. We've rolled our own,so this is just one possible implementation to give you some inspiration. First we have a interface class that represents a serial stream and promises operator >> and << overloads for all basic types (and some raw byte I/O): class SerialStream { public: virtual SerialStream& operator >> (int&) = 0; virtual SerialStream& operator << (int) = 0; //And so on for all basic types... //Raw reading and writing virtual void RawRead(char *data, int len) = 0; virtual void RawWrite(const char *data, int len) = 0; }; Then, obviously there's some concrete implementations for this interface. Then we have a Deserialise function: /* Deserialises the template type T from the SerialStream and returns it. * Extra Args are passed on to the specialised deserialise function for default constructible types. * Extra Args are passed on the constructor for non default constructible types. */ template <class T, class... Args> T Deserialise(SerialStream& ss, Args&&... args) { if constexpr (!std::is_enum_v<T>) { if constexpr (std::is_default_constructible_v<T>) { /* Default constructible types. */ T t; SpecialisedDeserialise(ss, t, std::forward<Args>(args)...); return t; } else { /* Non default constructible types. * Should have ctor that constructs from SerialStream. */ return T(ss, std::forward<Args>(args)...); } } else { /* Enum types. */ std::underlying_type_t<T> t; ss >> t; return Util::UnderlyingToEnum<T>(t); //Utility function that converts underlying type to enum. } } So your own non-default constructable classes will need a constructor that takes a SerialStream as argument and constructs itself from it. Default constructable classes are handled by SpecialisedDeserialise, which is a template function for the majority of cases: /* Deserialise for default constructible types that are supported by SerialStream::operator >>. * Extra Args are ignored. */ template <class T, class... Args> void SpecialisedDeserialise(SerialStream& ss, T& t, Args&&...) { ss >> t; } This allows for further specialization if required, for example for std::vector<T>... /* Deserialise for std::vector<T>. * Extra Args are passed on to the Deserialise function for each element. */ template <class T, class... Args> void SpecialisedDeserialise(SerialStream& ss, std::vector<T>& v, Args&&... args) { uint64_t size; ss >> size; v.clear(); v.reserve(size); for (uint64_t i = 0; i < size; ++i) { v.emplace_back(Deserialise<T>(ss, std::forward<Args>(args)...)); } } For serialization we have a template operator <<: /* Will be called for types where no better matching operator << overload is found. * Calls the specialised serialise function for the type. */ template <class T> SerialStream& operator << (SerialStream& ss, const T& t) { if constexpr (!std::is_enum_v<T>) { SpecialisedSerialise(ss, t); } else { /* Enum types. */ ss << Util::EnumToUnderlying(t); //Utility function that converts enum to underlying type. } return ss; } SpecialisedSerialise is also a template function that simply delegates to T::Serialise. This means your own classes need to incorporate a Serialise function that takes a SerialStream as argument and serialises itself to it: /* Serialise for classes that have a Serialise member function. */ template <class T> void SpecialisedSerialise(SerialStream& ss, const T& t) { t.Serialise(ss); } But again allows for specialization if required: /* Serialise for std::vector<T>. */ template <class T> void SpecialisedSerialise(SerialStream& ss, const std::vector<T>& v) { const uint64_t size = v.size(); ss << size; for (const auto& element : v) { ss << element; } } Example usage: class Example { private: //Some members for serialisation... int mSomeInt; float mSomeFloat; std::vector<int> mSomeVector; Foo mSomeFoo; public: Example(SerialStream& ss) : mSomeInt(Deserialise<int>(ss)), //Will call SerialStream::operator >> for int trough the basic SpecialisedDeserialise template mSomeFloat(Deserialise<float>(ss)), //Will call SerialStream::operator >> for float trough the basic SpecialisedDeserialise template mSomeVector(Deserialise<std::vector<int>>(ss)), //Will call SpecialisedDeserialise for std::vector<T> mSomeFoo(Deserialise<Foo>(ss)) //Will call Foo::Foo(SerialStream&) {} void Serialise(SerialStream& ss) const { ss << mSomeInt; //Plain call to SerialStream::operator << for int. ss << mSomeFloat; //Plain call to SerialStream::operator << for float. ss << mSomeVector; //Calls SpecialisedSerialise for std::vector<T> trough the operator << template. ss << mSomeFoo; //Calls Foo::Serialise(SerialStream&) trough the operator << template. } }; The Deserialise function also takes additional parameters to be passed to the deserialisation constructor of non-default constructible types if required.
  10. Damage caused by static electricity due to improper handling can manifest itself much later, upto several years. So if you plan to keep it for a long time I'd try to get it refunded and get a new one.
  11. That IRM60-5 power supply can deliver 10A. Without some sort of per-port curent limit it would be possible to pull the full 10A trough a single USB port. Afaik USB-C is only rated for 3A@5V without negotiation. To protect cables, connectors and devices in case of some failure you should limit the current per port to 3A. Simplest would be adding a fuse to each port, but requires replacing the fuse on each failure. More advanced would be some sort of electronic current limiting, probably some sort of hiccup topology.
  12. You can't, a simple resistor won't do it. You need an active current limiter circuit. That's a circuit that does not interfere and allows the full 5V to pass at currents below 3A and only starts clamping down and limiting current when said current tries to go above 3A.
  13. You want the best possible, lowest resistance and inductance, connections for power and ground. Typically this is achieved by using power planes, which means covering the entire surface of the board on one layer for ground, and another layer for VCC, and then using via's to connect to the required plane wherever you need it, rather then running individual traces. However, this requires 2 layers for ground and VCC alone. If you're limited to a dual layer then I'd suggest making the bottom layer a ground plane and using a star configuration for VCC on the top layer. A star configuration looks like this: The idea is that each load has it's own separate trace to the power source and not trace from the power source to one load and then on to the next and so on. This way, any noise generated by one load due to the trace's parasitics does not affect the other loads. Polygons are irregular shapes that allow you to better use available board area to make better, low resistance, connections where it matters. For example, here's a board I designed that uses polygons extensively on the top layer:
  14. Simply adding a resistor in series with VCC is not going to work as current limiting as there will be a voltage drop across the resistor proportional to the current going trough it. For example, with the 1.6 ohm resistors you added, if one attempts to draw 1A, 1.6V will drop across the resistor, leaving only 3.4V at the output. You need an active current limiter circuit. Also, I'd try to use way thicker traces, or polygons for the power traces on the PCB layout, and use a star configuration or power planes rather then daisy chaining.
  15. Nah, this is actually a nice example of the Dunning Kruger effect, where someone has too little knowledge about a subject to be able to realize how little he/she knows. I'm not trying to discourage someone from learning and trying to build whatever he/she wishes but I think it's healthy to make them realize they're embarking on climbing a mountain, not the molehill their flawed perspective makes it out to be.
  16. A 'scope with the bandwidth to make eye diagrams at pcie frequencies (to check signal integrity for your layout) cost as much as a nice car...
  17. Depends on how strong those magnets are, you'd have to test.
  18. Perhaps you could wall-mount the speakers?
  19. Try moving both speakers away from the TV as a test. There's a large chance the speaker magnets are the cause. The reason the picture is normal when you first turn on the TV is because the degaussing coils are briefly activated each time the TV is turned on cold.
  20. It looks like this might be possible with the LT1241, but if you have to ask I'd advice against it. You'd have manually add frequency compensation in the feedback loop to make sure you have enough phase/gain margin for it to be stable. If you don't understand what that means I'd advise you go for a fully integrated buck converter IC that handles all this for you. (And don't stray too far from the manufacturer's recommended PCB layout, PCB layout is critical for buck converters, or the thing will ring like a bell.)
  21. Any large magnets nearby ? Like a speaker/woofer for example ?
  22. That's somewhat of a too broad blanket statement. MOSFET's have a gate capacitance which must be charged each time you want to turn it on and discharged each time you want to turn it off. Depending on the MOSFET in question, this gate capacitance can be significant and require large currents to switch the MOSFET on and off quickly. Gate drivers are used to mitigate this problem. So you can't just choose any MOSFET. You need one with a low enough gate capacitance so that the arduino can drive it fast enough for PWM.
  23. And let's not forget, if that laptop has some age that battery's health isn't getting any better.
  24. Canopus Pure 3D II Voodoo2 card (unique non-reference design). Never should have sold that thing
  25. The top horizontal IC (uln2003) is a transistor array. Can't read the bottom one but seeing it goes to some connector pads it's probably some kind of tranceiver. The vertical chip in between is the microcontroller, likely with integrated EEPROM data memory.
×