integrating multiple teensy's with a printed circuit , weird synchronization occurs

Status
Not open for further replies.

gony

Well-known member
i designed a PCB to hold a teensy project for a lab i work in .

there are three teensy's in total which share a few signals , meaning , some of the wires that go to one teensy also go to the others . for example the 3.3V pin and 5V pins connects all three of them (i add the file with all connections) .

as soon as i connect one of the teensy's to the usb port , something strange happens: the other teensy which is not connected to anything starts blinking . i ignore it and plug in the second one and i am able to upload the program on both . but as soon as i connect the third one it starts to reset it self every second or so .

what could be the problem ? is there anything acutely wrong with the arrangement i made? i also suspect something went wrong with the reset pin which i connected through all three teensy's to an exterior button .

i would appreciate any leads , in which way i should start looking to see whats wrong . starting from the question , should it work in theory or is there something i didnt consider when making such arrangement .

waiting for answers and would provide further details gladly if needed!
picture of the schematic:
teensyGonySchematic.PNG

links to pictures of the actuall board
*notice how only one teensy is connectd yet the next one also blinks (the connected one is U1). it is a bit random , at first it would rapidly reset , now id doesn't reset . also sometimes all three blink in sync , now only U1 vand U3.

https://photos.app.goo.gl/ruLiLnYE1Ruy1zsu9

https://photos.app.goo.gl/Dqc6zGVWJAqubcTdA
 
Not sure if this is the problem.. the reset pin is an output, too. so if one teensy resets - and this happens when programming , all connected teensys will reset.
 
yes i don't think the problem is with the reset pin since only U1 is reseting and also the button seems to work just fine .
any other ideas ?
is there anyting wrong with connecting the voltage pins of the teensy's together ? (all GNDs connceted , all 3v3 connected and all Vins - but of course seperately)
 
yes if you have the 3v3 pins connected, too , there may be a problem. parallel voltage regs are never a good idea. disconnect them.
and yes the reset button will work. and the reset-outputs work as described. if not all tensys reset there is something wrong. maybe the internal pullups are too strong for a teensy to reset the others. I dont know its value.
 
currently things are working . i didn't really figure out what happened earlier but i suppose it might've been some GND issue cause since i connected the rest of the wiring it works fine.
one thing i still can't explain is the blinks . even now when i run the program and it is functioning well , there is still a steady blink every second . perhaps you know why?

also , about your recent comment :
so you advise me to disconnect the voltage pins from each other ? meaning the 3v3 and the Vin (3.6 to 6 V)
 
only disconnect the 3v3s from each other. and reset.
blink:
well, something in your software blinks (unless the teensys are not programmed - in this case the blinking is normal).
 
Last edited:
since the teensy is already soldered to the PCB , is there a way to disable the 3v3 pins by writing a program ?
 
as soon as i connect one of the teensy's to the usb port , something strange happens: the other teensy which is not connected to anything starts blinking . i ignore it and plug in the second one and i am able to upload the program on both . but as soon as i connect the third one it starts to reset it self every second or so .

These words are very confusing to me. I have no idea what you mean by "starts to reset it self".

Maybe try telling us what you actually see happening, rather than your interpretation of what is causing it to happen. You may be absolutely correct in your assumption. Or maybe not? But either way, I can not get a clear idea of what you are actually seeing.

Maybe a photo or quick video (upload to youtube) would be clearest?
 
alright , i did it and i think some errors have been resolved .:eek:

about the blinks ; i figured the spare teensy (U3) was the source of it , since it was activated by the shared voltage source and just started running the built-in blink program . then since the 3 teensy's are connected on pin 13 , they all blinked in sync .

i wanted to upload some blank program to the spare teensy so it won't cause any noise to the other two but when uploading a program from the examples ("DigitalReadSerial" or just a plain code that sets some unused pin as input ) i received the followoing error :
An error occurred while uploading the sketch
upload@u3 teensy 3.6 I/O error while writing to '\\.\HID#VID_16C0&PID_0478#6&2E51DD6C&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}'

any idea what to do about it ? also , is there a way of disabling the entire teensy by code while keeping it connected and ready to upload ?
 
so unfortunately there has been again problems with this apparatus .
i'm not sure what caused the problem in the beginning so i will describe it generally - but i will gladly add details.

1. i disconnected the 3v3 from one another , but kept the Vin and GND wired together.

2. the reset and program buttons are still connected . (i mean that the PCB is wiring the reset pin of each teensy together and also to a manually activated pushbutton , meaning a press of that button is causing all 3 teensy's to reset. also the program pin is wired in the same manner - all 3 teensy's are connected to a button.) * maybe that is the source of the irregularities ???

3. first i uploaded the desired programs and everything was going well . all teensy's are fed power by one usb cable connected to a simple power source , this way we didn't experience any issues for a few weeks.

4. after a while someone in the lab pressed the program button (for no good reason) and that caused all sorts of bad things to happen . bottom line is that i can't upload programs to any teensy anymore. i get the red line saying error uploading to sketch etc. i can't really learn about the nature of the problem from the error message and that's why i am giving a thorough background of the events .

5. i tried to reset but didn't get much results , tried 15-17 sec hard reset . tried to switch from TYcommander back to teensyduino , the error uploading the sketch remains .

not sure what others details are needed , but i stay tuned and will answer any questions if pointed at me !

thanks!
 
Not sure of the value or good reason to tie PGM pins together - each has to have individual attention during programming to safely coordinate an upload over USB.

A single USB cable providing power? Again each needs a direct USB to a host for program upload - sure that could not work

Also wondering what supply over single USB is fully/safely powering 3 T_3.6's if there are any peripherals also drawing power as that could be close to typical 500 mA if they are running at speed - but that isn't likely a problem if it is working with Vin providing the needed current.

As noted during program if the RESET is dropped on one - they may all reset.

TyCommander can program over USB to a unique Serial Number - but it takes a unique USB cable to each Teensy device USB at that time, and doing so may reset the others.

To IDLE the unused Teensy it could be programmed at LOW speed above 16 MHz so it can still respond with USB unless the PGM button can be pushed without interfering with the other when needed with empty code as in post 12.
 
PGM - absolutely right . it was a poor decision led by the desire to keep the design minimal , one button to upload new programs . could this lead to the observed errors?

single USB - there are 3 usb slots to upload their programs . once they are programed i keep only one connected and it supplies power to the rest . i am wondering if that too might lead to those upload errors . should i cut the connection and feed power seperately? if so - how exactly ? which pins beside Vin are in charge for the sharing of power?

not sure about your third remark , i can say there are no peripherals. the teensy's are only sending signals for a very short duration.

TyCommander can program over USB to a unique Serial Number - but it takes a unique USB cable to each Teensy device USB at that time, and doing so may reset the others.
could you elaborate on that ? it seems likely to be the problem . since i finished writing the code and there are no further debugging , would it be advised to switch back to teensyduino?pressing program button for all teensy's -> uploading each teensy program seperately -> disconnecting from computer and connecting to power seperately?
 
Status
Not open for further replies.
Back
Top