Search results

  1. Sadlercomfort

    GPS NMEA, Failover Circuit upgrade attempt.

    The diode will not conduct if the serial input is less than 5V. But if the serial swings higher than 5V the diode will conduct and clamp the voltage to 5V.. protecting the picaxe. I didn't know the return pin (-) was common :rolleyes: but the transistor is still needed to switch the relay right?
  2. Sadlercomfort

    GPS NMEA, Failover Circuit upgrade attempt.

    I think the negative pulses will be okay, since no mention of this in the Picaxe data sheet. I do think a diode is needed for GPS #2 on B.1 Pin to protect the Picaxe. C.5 Serial In pin already has an internal diode.
  3. Sadlercomfort

    PCB building

    Very neat work! :cool:
  4. Sadlercomfort

    Converting int to string - C Programming

    Isn't that three elements if i declared char bufr[2]; 1. bufr[0] 2. bufr[1] 3. bufr[2]
  5. Sadlercomfort

    Converting int to string - C Programming

    Yeah I guess your write but again isn't my null character bufr[2]? So my code is right? unsigned int value = 32; bufr[0]='3' bufr[1]='2' bufr[2]=/0
  6. Sadlercomfort

    Converting int to string - C Programming

    My null character is bufr[2] though right? unsigned int value = 32; bufr[0]='3' bufr[1]='2' bufr[2]=/0
  7. Sadlercomfort

    Converting int to string - C Programming

    Can you expand on this? I've tested this code and it works fine.
  8. Sadlercomfort

    astable

    The HFE gain for the MPSA13 transistor is very high (5000 min) As an example: A 12V relay with a coil 960Ω need around 2.5μA going through the base this transistor at 5000 HFE. Therefore R61 would need to be around 1.6MΩ for a single relay of this type. So this seems okay.. but not for two...
  9. Sadlercomfort

    astable

    It might be best to have two transistors for each relay, the base of each transistors connected together and each relay with its own diode across the coil. The relays will still switch at the same time.
  10. Sadlercomfort

    Converting int to string - C Programming

    Thought I'd share the solution, here I've created an integer and converted it to a string. Very simple. //Hi-Tech C Compiler //Integer to String using itoa function //Displayed on LCD #include <htc.h> #include <stdlib.h> #include "LCD 4-BIT.h" #define _XTAL_FREQ 4000000 __CONFIG(FOSC_XT &...
  11. Sadlercomfort

    µC - Temperature Sensor DS18B20

    1. RC1 Toggle output nothing connected - HIGH 2s -> LOW 2s... 2. RC1 Toggle output with pullup 5V - HIGH 2s -> LOW 2s... 3. RC1 Toggle output with pullup & DS - 5V 2s -> 4.2V 2s... Using code below. #define _XTAL_FREQ 4000000 #include <htc.h> #include <pic.h> __CONFIG(FOSC_XT &...
  12. Sadlercomfort

    µC - Temperature Sensor DS18B20

    Exactly this is why I'm confused. :confused: I've checked and double checked, there is nothing else on RC1 line.. except one solder blob for the link wire which goes to DQ. So maybe it is faulty? How can I test this.
  13. Sadlercomfort

    µC - Temperature Sensor DS18B20

    Sorry, I keep making mistakes today. I'm just losing abit of patience. :( There was a small short on RC0 which held it high. I fixed it now, but i already moved DQ of the DS18B20 to RC1. void main() { TRISC1 = 0; while(1){ RC1 = 0; __delay_ms(2000); RC1 = 1...
  14. Sadlercomfort

    µC - Temperature Sensor DS18B20

    I tried the above code but instead used RC3 pin, and works ok. So I removed the DS18B20 and DQ pin and tested the code again.. but still getting HIGH on RC0. Something is wrong here. I'm going to move the DS18B20 to a working pin.
  15. Sadlercomfort

    µC - Temperature Sensor DS18B20

    I've created a simple program like so: void main() { while(1){ RC0 = 0; TRISC0 = 0; __delay_ms(3000); RC0 = 1; } I've measured the voltage on the DQ pin, and it stays HIGH.
  16. Sadlercomfort

    µC - Temperature Sensor DS18B20

    Thanks I'm beginning to understand it more now you've broken it down. :) I never knew this! At the beginning of the program should I set ONEWIRE Pin as input or output? And low or high? Also, when I set ONEWIRE_LOW(); then ONEWIRE_OUTPUT(); does this mean the voltage on the ONEWIRE pin should...
  17. Sadlercomfort

    µC - Temperature Sensor DS18B20

    It's going to take me a while to understand your code.. its like hieroglyphics to me. Again this will take time. o_O What are these header files: #include "stm32f4xx.h" #include "common.h" #include "onewire.h"
  18. Sadlercomfort

    µC - Temperature Sensor DS18B20

    Everything is connected up fine as shown in Figure 7. With a 4.7KΩ pullup resistor and Vdd/Vpu are regulated 5v DC. Maybe I should rephrase that to 'I'm not using parasite power'. So are you suggesting that only difference with parasite power is the commands..not the individual...
  19. Sadlercomfort

    µC - Temperature Sensor DS18B20

    I'm not using one-wire, I'm using my own supply for the DS, and my Vdd is not tied to DQ. Can I still use this one wire code? Also, the timing diagram you've shown me is different to the one in the datasheet and it doesn't include the time. I'm not very good at reading timing diagrams o_O
  20. Sadlercomfort

    GPS NMEA, Failover Circuit upgrade attempt.

    I'm not sure how to go about this. A delay can be put into the program while comparing the DOP values and switching the relay. To limit the relay switching time between each DOP check. However the DOP check is just one part of the program that switches the relays: 1.The program first checks...
Top