Search results

  1. Ben

    Modbus RTU

    not for testing, but I'll use RS485 half duplex. That's actually defined and required by the modbus standard. I have transceiver ICs in the mail and will spin a quick test board once they arrive. I have access to our in house pcb etching lab, so turnaround times are quick.
  2. Ben

    Modbus RTU

    Thanks Paul. Unfortunately I don't own any modbus devices. My use case is a diy sensor bus in my home, with a sensor node in each room for temperature, humidity, light level etc. The node will also function as my door bell. (Teensy 3.2 with a Prop Shield "witout"). I'll build both those sensors...
  3. Ben

    Teensy Intermittent USB Serial Communication

    using while(true) prevents exiting loop. I'm completely guessing here, but maybe that inhibits something important that usually happens between loops?
  4. Ben

    Any idea to make the old sensors compatible with 3.3V teensy 3.6?

    Be very careful when trying. If the device is powered by 3.3V it's more or less safe to try. If it is powered by 5V it will most likely drive signals to a logic high voltage of near 5V, which is too much for the Teensy 3.6. It would be better to use a Teensy with 5V-tolerant digital inputs such...
  5. Ben

    Modbus RTU

    Will do, give me a few days.
  6. Ben

    Teensy 3.6: USB host female cable in EU?

    Yes. In the picture neurofun posted, carefully look at the connector. There are only four wires, the connectors lowest position is empty. You can also see this on the teensy pinout diagram when looking at the teeensy 3.6 back side. The five pins are labeled GND, GND, DP, DM, 5V. As you can see...
  7. Ben

    Teensy 3.6: USB host female cable in EU?

    The two pins furthest from the micro-usb connector on the Teensy are both grounded, you only need one of those. Be careful with orientation when plugging in. 5V is closest to the onboard micro-usb port.
  8. Ben

    Modbus RTU

    I'm considering a rewrite with some improvements like proper timeout handling and allowing to configure more parameters at runtime (such as slave address and baud rate) so these can be fetched e.g. from EEPROM on startup. With the current library as a working example I'm semi-confident I can get...
  9. Ben

    Modbus RTU

    Here's a version that works for creating Modbus Masters and Slaves with a Teensy using hardware serial ports: /** * @file ModbusRtu.h * @version 1.21 * @date 2016.02.21 * @author Samuel Marco i Armengol * @contact sammarcoarmengol@gmail.com * @contribution Helium6072 *...
  10. Ben

    Modbus RTU

    Hmm that might be a too high goal for my programming skills, I'd be happy with the RTU mode working on Teensies. I'll try to test the code I posted in #10 when I have the time and maybe reintroduce SoftwareSerial support so it's backwards compatible and I can do a pull request. My main problem...
  11. Ben

    Alternatives to FLIR Lepton/Lepton 3?

    I know of two product ranges with even lower resolution: Melexis https://www.melexis.com/en/product/MLX90640/Far-Infrared-Thermal-Sensor-Array and Panasonic GridEye https://www.melexis.com/en/product/MLX90640/Far-Infrared-Thermal-Sensor-Array. Ben
  12. Ben

    Modbus RTU

    Sounds good, would you paste your code here so I can have a look?
  13. Ben

    Modbus RTU

    I'm looking for a good Modbus-library as well. It seems the one Epyon linked is hard-coded for a specific Arduino board as it expects exactly four hardware serial ports. From my limited understanding it would be better if the constructor or begin() were changed to take a HardwareSerial or Stream...
  14. Ben

    Teensy 3.2 Eagle Schematic

    I'm not aware of a Eagle .sch, but this page is a good start. There are links to forum posts on this page that are also very helpful.
  15. Ben

    Changing the PWM frequency on Teensy 3.6

    I didn't know this, but I'd expect the Teensy to maintain the duty cycle through PWM frequency changes. So is this a bug or documented behaviour (apart from "documented in the code")? If it's neither I suggest we make it either one?
  16. Ben

    SerialFlash.begin always returns true, even when no SPI flash is connected

    Hi, I today tried to determine if an SPI flash IC is connected by checking the SerialFlash.begin return value. Turns out the function returns true unconditionally. I reproduced this with a Teensy 3.2 with nothing attached and the ListFiles example. This error message: if...
  17. Ben

    Teensy 3.5(6) PCB cut :)

    there are 6 layers of copper in and on the teensy board. as copper tends to "smear" when cut, there is a high chance of creating shorts between layers with this smeared copper. So no, it is not save to cut the board.
  18. Ben

    Is there a way to calibrate analog inputs?

    You can use EEPROM.put(address, variable); to store variables of any size in the EEPROM. Make sure to increase the address by the size in bytes when storing the next value. uint16_t aTwoByteInt = 0xABCD; uint32_t aFourByteInt = 0x12345678; uint32_t address = 0; EEPROM.put(address, aTwoByteInt)...
  19. Ben

    Union containing struct -> union constructor gets auto-deleted

    Hi, I think I solved this myself :) #include <FastCRC.h> struct S1 { uint32_t foo = 0x1234CDEF; float bar = 1.0f; }; FastCRC32 CRC32; void setup() { delay(2000); S1 s; Serial.println(myCRC32(s),HEX); } void loop() {} uint32_t myCRC32(S1 s) { uint8_t b[sizeof(s)]...
  20. Ben

    Union containing struct -> union constructor gets auto-deleted

    Hi, I'm using a Struct for some calibration data, this way I can easily save and load the data from EEPROM using EEPROM.get and EEPROM.put. This works great, now I'd like to add a CRC checksum using Frank's FastCRC library. FastCRC expects the data as a char array, so I created a union...
  21. Ben

    Teensy APA102 POV Poi / Pixel Poi Build. Tutorial

    If you can get your hands on SAC101 solder balls (SnAg1Cu0.1) that would be worth a retry. SAC101 is optimized for mobile devices, where shock resistance is of more importance than temperature cycling related fatigue. In general, low copper and silver content improves shock resistance in solders...
  22. Ben

    Time lib on T3.6 using internal RTC falsely(?) reports time is set

    Thanks, thats exactly the behaviour I need.
  23. Ben

    Running the teensy prop shield with 3.7v

    This is the amp on the prop shield: https://www.pjrc.com/store/lm48310.pdf it is rated from 2.4V to 5.5V. On page 7 you can see the diagrams for THD+N vs Output Power, it shows about 1W into 4 Ohms and 0.6W into 8 Ohms at 3.6 Volts supply voltage. A little more if you are willing to accept...
  24. Ben

    Help with custom Teensy 3.2

    Have you tried using the exposed D+ and D- signals on the T3.2 bottom pads to attach a more durable usb port? maybe you can connect to them with a via cut in half on your mother board, like it is done here: https://oshpark.com/shared_projects/0T6ZdhhG (see last picture)
  25. Ben

    Time lib on T3.6 using internal RTC falsely(?) reports time is set

    Thanks for your help! No I didn't know about these lines. That's excellent, I can just test register 0x4003E01C for that "magic number" to see if the RTC has been reset to compile time. Great, thanks for that hint! Is it okay if I reset that register to 0x00 in my sketch after I called...
  26. Ben

    Time lib on T3.6 using internal RTC falsely(?) reports time is set

    I thought about my problem a bit more and I think I'm using the Time lib and the RTC wrong. The library reports "timeSet" because it has synced successfully to the internal RTC. So even if I used setTime() it would revert to what the RTC reports after the next sync of the library with the RTC...
  27. Ben

    Time lib on T3.6 using internal RTC falsely(?) reports time is set

    Here's a sketch to recreate my issue. My Win7 machine needs the delay(), sorry: Arduino 1.8.1, Teensyduino 1.35 on Windows 7 SP1.No errors or warnings during compile/upload (verbose output enabled). Using library Time at version 1.5 in folder...
  28. Ben

    ...is the teensy the right choice for me (how to switch high current AC load safely)

    The datasheet "hints" are a good start. Look at the upper left diagram, the one with "Input NPN Output NO". You'll want to use this one. Virtually any npn-transistor will do, as the currents and voltages involved are very low. For example BC337 is common and easy to obtain in Europe. You can see...
  29. Ben

    ...is the teensy the right choice for me (how to switch high current AC load safely)

    If the Teensy sets the mosfet control pin into high impedance state "by accident", the gate charge can be retained on the mosfet gate for quite some time, it's best to have a resistor from the gate to ground, anything between 10k and 1meg will do. But Tony is still right, Teensy could fail in a...
  30. Ben

    ...is the teensy the right choice for me (how to switch high current AC load safely)

    I don't understand why they use optocouplers at all, the relay alone should provide enough isolation in itself :confused: A solid state relay (SSR) might be the quickest and least error-prone way. The SSR might require a heatsink, depending on the load current, but the advantage is you can...
  31. Ben

    Dual channel 16bit dac PT8211

    Did you order on aliexpress? They really seem to be an exact clone. I may have access to an IC decapsulation machine later this year, might be fun to compare the dice :) I tried the manufacturers website titanmec.com, but most stuff is in chinese even after I chose english, not helpful for me.
  32. Ben

    Dual channel 16bit dac PT8211

    Yes, there's the Filter Design Tool from the university okawa-denshi (Japan) that does an excellent job for analog filters up to 3rd order: http://sim.okawa-denshi.jp/en/Fkeisan.htm The tool is really all you need for 1st, 2nd and 3rd order filters, as it not only shows you ideal values but also...
  33. Ben

    Pwm on teensy 3.1

    Hi, I'm on vacation right now, so I'm sorry I can't try anything myself at the moment. You could try to set up an ISR that updates the duty cycle of all the PWMs and call it regularly. Toggle a pin at the beginning and end of the ISR, this way you can measure ISR execution time with a scope...
  34. Ben

    Pwm on teensy 3.1

    Hi, when you use the Arduino IDE with Teensyduino to program your Teensy in C++, you can use some very powerful high-level commands to control the PWM. No need to look into timers and overflow flags, the libraries provided with Teensyduino will take care of this. Hava a look at this to get...
  35. Ben

    amp meter "fixing" led strip power supply overload....

    Hi, the amp meter measures the current by letting it flow through a low-value resistor ("shunt resistor") and measuring the voltage drop across this resistor. So by introducing the meter into your circuit you effectively created a resistor in series to the rest of your circuit. That seems to...
  36. Ben

    Possible comparison of Teensy's and Apollo Moon Landing Computer??

    I think you mixed something up. Or maybe I did, anyway, I get different numbers: Apollo RAM: 2048 x 16bit = 32768 bit = 4096 Byte = 4kBytes Teensy RAM: 64 kBytes Apollo ROM (Program Memory): 36864 x 16bit = 589824bit = 73728 Byte = 73kByte Teensy ROM: 256 kBytes
  37. Ben

    Possible comparison of Teensy's and Apollo Moon Landing Computer??

    A comparison in computing power between two computing systems is possible in many different ways. You could look at the technical specs like how much RAM is available, how fast is the CPU, how wide are internal busses, ..., but that won't give you a good comparison of actual system performance...
  38. Ben

    Drive led strips from 3.2 DAC

    About 60Hz is only true for non-moving applications. Even 100Hz may be visible if your eye does quick "scanning" movements across the LEDs (or the LEDs move), because that will leave an afterimage on your retina that consists of dots where the LEDs flashed ("Persistance of Vision"). I once drove...
  39. Ben

    Options for mounting a Teensy to a PCB?

    This will of course void any warranty, but you can file down the sides of the teensy until only half of the PCB through-holes are left, then use that as a "castellated" connection for PCB-to-PCB mounting like this: Reliability of this connection method is poor compared to using a pin header...
  40. Ben

    Microscope

    I don't know about the model The Goddess uses, but I can recommend using a binocular microscope (that gives you a stereoscopic impression of depth) with either fix magnification of about 7x or zoomable magnification in that range (about 2x to >7x is perfect). If you want top quality and...
  41. Ben

    Wii nunchuk/Classic controller

    That's good news :cool: I'm impressed you followed through with this project and even reported back after such a long time. Much appreciated :) Ben Edit: Regarding the Teensy 2.0 and voltage levels, I'm sorry I don't know :(
  42. Ben

    audio shield power supply

    The Teensy 3.2 has a voltage regulator that supplies 3.3V from the 5V it gets from USB. This is used to power the audio adaptor as well as the IC on the Teensy itself. Does the Teensy run the simple blink example? If yes, you should be able to measure very close to 3.3V at the 3.3V pin. The...
  43. Ben

    K66 Beta Test

    I updated the spread sheet to include Prop Shield and Audio Adapter Board pinouts: Download here: https://www.dropbox.com/s/23yl6hxqmp0h2u9/T3.6pinoutDiagram.ods?dl=0 Screenshot: It's meant to be printed on an A4 sheet in landscape orientation, and it's actually not that easy to cram in even...
  44. Ben

    Teensy3.1 and FPU (Floating Poitn Unit)

    The cool thing with the Teensy 3.x is that it has built in DSP instructions for 16 bit fixed point math, so if you stick to fixed point you can do quite a lot CD-quality audio processing on the Teenies with little CPU load, with no FPU required.
  45. Ben

    Teensy input pins best practice.

    If you are designing a PCB and you have a few square mm to spare you could include footprints for the pullups and just don't populate them if you find out you don't need them.
  46. Ben

    connecting strips of APA1012 together, but not neededing sync / OctoWs2811

    This might be an issue with unstable power delivery due to losses in the long strands of conductor. Try adding a second 5V and GND line to the end of the strip (in parallel, from the same power supply) to feed energy into the strip from both ends. No, this...
  47. Ben

    Teensy 3.2 Interrups to Blink LED's at Different Rates

    As far as I remember, you can do this, but you need to call myTimer.end(); between two .begins. Only four timers may be active simultaneously, even less if you use other libraries that use timers. Yeah it's certainly a viable solution. The other way I could imagine is finding out why your...
  48. Ben

    K66 Beta Test

    Not as pretty as the card, but with a bit more information (I2S, Ethernet, Native Port) It's a LibreOffice Calc file (*.ods) which you can download here: https://www.dropbox.com/s/23yl6hxqmp0h2u9/T3.6pinoutDiagram.ods?dl=0 So far I compiled the info from Pauls official card and what can be...
  49. Ben

    connecting strips of APA1012 together, but not neededing sync / OctoWs2811

    The ICs inside the LEDs run from a 5V supply, the Teensy outputs 3.3V as a logic "high". 5V-Devices may or may not recognize 3.3V as logic high, as it is not very close to their supply voltage. This is essentially the same issue no matter how many strips you connect in parallel. The level...
  50. Ben

    Teensy 3.6 Beta project - Simpit for Kerbal Space Program

    Thanks, this looks very nice. I wish I had the time to build a panel myself, but at the moment I don't see this happening until at least February :rolleyes: I'd love to have a physical, tangible full manual docking control, as i'm docking using the keyboard right now (Or mechjeb...), and that's...
Back
Top