Search results

  1. A

    Trying to pass SPI signals through transistors, but it doesn't seem to work

    If I switch to four layers, does this mean that all modules that connect to this bus board must also have four layers with an unbroken ground?
  2. A

    Trying to pass SPI signals through transistors, but it doesn't seem to work

    Can you give an example of where these series resistors should be placed? Also, how much resistance for each?
  3. A

    Trying to pass SPI signals through transistors, but it doesn't seem to work

    Thanks for the detailed answer and ideas! The SN74HC157 seems like a great solution. Also, I didn't think of routing the clock signal the same way as I did with the data signal, which makes total sense as you point out. The MOSI+MISO1+MISO2+CLK scenario is what I need here. I guess I can use the...
  4. A

    Trying to pass SPI signals through transistors, but it doesn't seem to work

    Here's a PDF to the schematic of the bus board. This schematic doesn't include the Teensy, as this is located in another board that connects to this bus board. Anyway, it is a rather complex system, and I don't know if sharing all of it would help. I've attached this schematic. Chips U3 and U6...
  5. A

    Trying to pass SPI signals through transistors, but it doesn't seem to work

    I'm using the 74HC595 shift register, and the clock and latch pins are shared among all chips, and not daisy chained. What you said about sync might be the culprit. I'm trying out different versions with a modified shiftOut() function, where I can have control over each signal, where I'm...
  6. A

    Trying to pass SPI signals through transistors, but it doesn't seem to work

    I'm trying to build a modular system where modules that contain shift registers can connect to a bus board. To avoid hard-coding the number and positions of these modules on the bus board (there are sixteen sockets where modules can connect, through IDC connectors), I'm trying to detect them...
  7. A

    [SOLVED]Can software SPI work on long distances with delays?

    Oh, that's true. I guess it should have been obvious. Sorry for the noise and thanks for having a look! I can't remember why this line was there...
  8. A

    [SOLVED]Can software SPI work on long distances with delays?

    I'm trying to use eight 74HC595 shift registers over what is probably considered a long distance (approximately 70cm) on a PCB, with quite thin tracks. I've copied the shiftOut() function from the Arduino source, and added some delays, but only the first Shift register seems to be outputting...
  9. A

    Failing to program Teensy 4.1

    That's good information to know, thanks. Is this documented somewhere? It does work and the Teensy goes back to the factory BLINK code, but I still can't upload new code to it. My computer now just doesn't find the Teensy anymore. The only port it finds is /dev/ACM0 and that is not the Teensy...
  10. A

    Failing to program Teensy 4.1

    I have a setup where I power up a Teensy 4.1 externally. I have cut off the trace on the back side of the Teensy board so I can use its USB to program it. I programmed it a few times, but then at some point it was getting stuck and since then I can't program it, Teensyduino just gets stuck, even...
  11. A

    More of an electronics question about voltage references

    @Mav well, these 10K resistors to ground are copied from Adafruit's schematic from their LM4040 breakout. Maybe they're there because the breakout provides both 4.096 and 2.048 references, and it's not known in advance if both will be used? Kind of a pull-down resistor? No idea really. Anyway, I...
  12. A

    More of an electronics question about voltage references

    Sorry for not providing a fuller schematic. Here it is. The 2.048V ref is wired to the ADS1115 chips, so its differential mode is usable. The thing is I don't know how many ADS1115 chips I want to have. It should be between 1 and 15, for a total of 30 pots.
  13. A

    More of an electronics question about voltage references

    I'm trying to use multiple ADS1115 chips to read potentiometers at differential mode, to get the full 16-bit range. To achieve this I'm using the LM4040 voltage reference, passing a 4.096V to the pots (and ground to the other end), and 2.048V to the ADS1115 chips. I'm having a hard time...
  14. A

    Questoin on circuit for smooth LED toggling

    I have used Mark's circuit and it works much better, at least with green and yellow LEDs (I had no idea that different LED colors behave differently). I went on and developed the circuit so that a smooth and a non-smooth control of the LEDs is possible, by using transistors and switching between...
  15. A

    Questoin on circuit for smooth LED toggling

    Your circuit seems to be working fine, at least better than mine. I tried it out with whatever I had around, which was two 220 Ohm resistors and a 4700uF cap and it worked very well! I tried a second LED with the same resistors and a 1000uF cap, but that did not fade almost at all, and was...
  16. A

    Questoin on circuit for smooth LED toggling

    The voltage is 3V3. I had no idea that the LED color affects the performance of the circuit and code. Most of the LEDs are green, but there's one white and one blue. I just put any LED I had around. The circuit in the OP shows four LEDs for simplicity. This is the code: #include <SPI.h> const...
  17. A

    Questoin on circuit for smooth LED toggling

    Teensy 4.1, Arduino IDE 1.8.13, and Teensyduino 1.54 or 1.55, can't really remember.
  18. A

    Questoin on circuit for smooth LED toggling

    They're needed to smooth the toggling of the LEDs so they fade in and out as the shift register toggles them.
  19. A

    Questoin on circuit for smooth LED toggling

    I'm trying to toggle some LEDs through a 74HC595 shift register smoothly. I'm trying the following circuit: It sort of works, but there is interference between LEDs. For example, when I'm turning an LED off, any other LED that is currently on blinks. Can anyone help me improve this circuit...
  20. A

    PCB trace width question

    Thanks! Well, I'm trying to reproduce the circuit of the ADS1115 breakout by Adafruit. I guess the ADDR pin has a pull-down resistor to avoid floating if it's not connected, right? I could just ignore it altogether and simply connect ADDR to VDD, or am I getting this wrong?
  21. A

    PCB trace width question

    Hi all, I'm designing a PCB with some I2C ICs. I'm designing rather thick traces for the I2C communication (0.35mm), but I have a question concerning the following schematic: All other traces are at 0.25mm width, and I was wondering whether the VDD trace should also be at 0.35mm, as it is...
  22. A

    RC filter on rotary encoder's terminal, should I use it?

    In the second page of this data sheet there's a suggested filter circuit with an RC filter on terminals A and B of the rotary encoder. I haven't seen many such examples in projects and fora when looking up rotary encoders, so I was wandering if it's really necessary. Also, the RC filters connect...
  23. A

    Teensy stops responding after some time in outdoor installation

    Sorry for coming back after so long, was so busy with this thing I forgot about this thread I started. Eventually it seems the problem lies in the power supply which get problematic due to humidity or even water (it has rained a lot the last days and the installation is in a very humid place)...
  24. A

    Teensy stops responding after some time in outdoor installation

    Actually the code I posted was not 100% accurate. I should have put seven values there as I do in the actual project, but missed that here. The values of the longer array are: 4, 22, 3, 10, 9, 6, 16. There is also this line: howManyLampsOnRow[2] = {4, NUMLAMPS}; which is tested in the runRamp()...
  25. A

    Teensy stops responding after some time in outdoor installation

    I'm setting up an outdoor installation with lots of alarm lamps (the ones that spin around, like those on ambulances). and I'm running into all sorts of issues. I'm using PIR sensors which trigger a row of lamps (split in two parts, which fire together). The idea is that when someone walks by...
  26. A

    I2C Slave on Teensy 4

    Actually pressing the onboard button solved the port issue. But is there a known reason this is happening?
  27. A

    amplify signal to 10V

    The LM358 did the trick! Adding the extra resistor seems to make things more noisy. My multimeter is not a fancy one, but voltages seemed to take more time to settle and there was some moving up and down, while without the resistor it seems to be working well. I do have to test this in the...
  28. A

    I2C Slave on Teensy 4

    Uploading the wire multiple_slave_addresses example (by wire I mean not the raw, from the examples of your library), the Teensy seems to loose its serial port. What I mean is that after I upload this code the Arduino IDE can't see the Teensy any more and I only get /dev/ttyACM0 port (that's on...
  29. A

    amplify signal to 10V

    Thanks! I'll give that a try and report back!
  30. A

    amplify signal to 10V

    Thanks for the detailed answer! Actually I'd much rather use an opamp that can operate properly with 0V in the negative supply as all results I got when searching for how to create a negative voltage from a positive supply seemed a bit cumbersome. Can you suggest an opamp that operates as you...
  31. A

    amplify signal to 10V

    This is a question regarding electronic circuits rather than code, but I'm posting it in case someone can provide some tips. I want to amplify the signal of the MCP4728 DAC from Adafruit to a range from 0 to 10V. I'm using a TL072 op amp with the current circuit And this is the code: #include...
  32. A

    Teensy LC and Wire1

    That did it! I guess the precious memory Wire1 eats up, is only used when calling Wire1, right? Thanks for the solution!
  33. A

    Teensy LC and Wire1

    I need to use a Teensy LC as an I2C slave for a Raspberry Pi, which at the same time will act as an I2C master in order to control Adafruit's quad DAC, MCP4728. Teensy LC has two I2C busses, where the first bus is at pins 18 and 19, and the second at pins 22 and 23, right? I'm trying to access...
  34. A

    Strange behavior between I2C master and slave

    Eventually that was probably it! I changed all String objects to char and the strange behaviour is gone! I thought that posting the OP was a long shot, but your advice helped a lot! Thank you everyone!
  35. A

    Strange behavior between I2C master and slave

    It's a global variable. I'll try to print the heap size and see, never approached it this way. You suggest though that it is very possible to be a memory issue, right? Can this be affecting the I2C master in any way?
  36. A

    Strange behavior between I2C master and slave

    I do have 4.7K pull-up resistors on both Teensies. As I wrote in both posts above, removing the line of code in the OP makes things work fine, so there's definitely nothing wrong with the circuit.
  37. A

    Strange behavior between I2C master and slave

    The output of the Arduino IDE when loading the code with this extra snippet is this: Sketch uses 60284 bytes (22%) of program storage space. Maximum is 262144 bytes. Global variables use 18740 bytes (28%) of dynamic memory, leaving 46796 bytes for local variables. Maximum is 65536 bytes. It...
  38. A

    Strange behavior between I2C master and slave

    I have one Teensy 3.6 and one 3.2, where the first is an I2C master (among other things it does) and the second is a slave. The code of both is rather long (about 2000 lines for the master and 3000 lines for the slave), and I'm really not sure which part I should post, but I'd like to ask a...
  39. A

    I2C communication dropping bytes?

    I'm trying to have two Teensies talk to each other while doing other stuff. Here's two functions the master is using to communicate with the slave: void communicateWithSlave(int address, int bytesToSend) { int index = 0; Wire.beginTransmission(address); Wire.write(bytesToSend)...
  40. A

    Encoders (once more)

    I find this templated class very useful with these kind of encoders, it works really well! I have one question though, as my C++ knowledge is next to nothing. Is there a way to create an array of instances of this class or a pointer, which could be used in a similar manner? I want to read 8...
  41. A

    I2C over rather long wires, how to?

    30 feet is approximately 10 meters, right? I'm not even getting close to that length. I'm using pull-up resistors on the master and all slaves, so I guess there shouldn't be a problem there either. Thanks both for the answers, hope I'm on the right track!
  42. A

    I2C over rather long wires, how to?

    What I understand from reading all the above is that one meter shouldn't be an issue. My setup though might be a little bit more problematic as I will probably use more than one slave, and I don't know if their wires add up to the total capacitance that can cause issues. Here's a schematic...
  43. A

    I2C over rather long wires, how to?

    I need to have I2C communication between some Teensies over rather long wires (don't know the exact length yet, it should be between half and one meter). I've been reading that I2C should happen at a rather short distance, and I remember reading some post in this forum saying that additional...
  44. A

    Incoming MIDI messages are shorted to output

    Coming back to this thread after quite some time. Eventually I changed my approach and used a serial communication through Teensy's hardware serial1. This works great and it's way faster than MIDI, so I'm aborting the whole MIDI approach altogether. Thanks for the help!
  45. A

    Incoming MIDI messages are shorted to output

    Then I'll order the 6N138 which you mention on your reference page and copy your circuit. I'll come back to report whether it worked or not. Thanks for the help!
  46. A

    Incoming MIDI messages are shorted to output

    Your tests look persuasive, but I can't find any short on my breadboard. Also, it troubles me that if I send a MIDI message before I open the serial monitor, I don't get the feedback into Pd. Does the circuit schematic in the OP look like it should work? Only a short between Teensy pins 0 and 1...
  47. A

    Incoming MIDI messages are shorted to output

    I did unplug the MIDI cables, or removed either the receive or send jumper from the breadboard, and this loop doesn't happen (if I remove the Teensy there won't be any power in the MIDI circuit since all resistors are connected to Teensy's 3.3V and ground). Having a "while (!Serial) {}" in the...
  48. A

    Incoming MIDI messages are shorted to output

    That's right, it's a mistake on the schematic, not the actual circuit. I don't think the code has an issue, I just copied the code from Teensy's website and only added a "while (!Serial) {}". Here it is: #include <MIDI.h> MIDI_CREATE_INSTANCE(HardwareSerial, Serial1, MIDI); void setup() {...
  49. A

    Incoming MIDI messages are shorted to output

    I'm testing a Teensy 3.2 as a MIDI device with a 5-pin DIN output. Outputting MIDI messages works fine, but when I send MIDI messages from my Raspberry Pi to the Teensy, I receive the same messages in the Raspberry Pi, sent from the Teensy, even though the Teensy is supposed to receive only and...
  50. A

    Audio project not running unless I upload the code everytime

    I'm building an audio project with a Teensy 3.6 and the Audio Board. When I develop it and upload new code, the project runs fine. When I unplug and re-plug the Teensy, I get nothing from the headphones. When I upload the code again, I still get nothing. To make it work I need to upload an...
Back
Top