Shop OBEX P1 Docs P2 Docs Learn Events
Cycling Champion generator control module useing BS2 detect 12v start\stop gen. batt. chargers - Page 2 — Parallax Forums

Cycling Champion generator control module useing BS2 detect 12v start\stop gen. batt. chargers

2456711

Comments

  • Before all the led cells permanently sink into the matting sulfur themselves inside the batteries and the batteries go dead at 80 to 90 % discharge. I simply cannot cycle into 100% discharge due to dementia,forgetfulness,distraction or being just to busy to hit the ONAN switch.
  • On a hot Texas day it can get to 125 degrees inside that coach. It would be uninhabitable without a/c. I don't want to burn out the brushes on the generator. Inverter power is best but without a plug or generator is no good. I can run the engine it has 500 amps from alternators. I need that generator to run autononomously. If its 3 am I gotta get up at 5am to work I can wake up every two hours to push a generator switch. Can't sleep if its 80 degrees at night outside its 100 inside. Please help me.
  • I can't can't wake up every two hours to nurse a set of batteries.
  • Kwinn I think you math is better than mine. Your right
    kwinn wrote: »
    The voltage out from the Arduino voltage sensor 0-25V should be 12.3/5=2.46V

    I have just returned from the Arduino site. It says it gives there micro controllers with this Arduino sensor report a "HIGH" if its " a voltage greater than 3 volts"

    https://www.arduino.cc/en/reference/constants

    My theory is Arduino's report "HIGH" is translated to Parallax DEBUG window "IN8=1" Arduino's report of "LOW" is Parallax DEBUG's report of "IN8=0" . Right????

  • kwinnkwinn Posts: 8,697
    What is an "ADC"??

    The BS2 senses voltage or receives input from battery banks.

    The BS2 outputs a command to start relay sequence to start a generator.

    An ADC is an Analog to Digital Converter. Instead of a 0 or 1 it gives you a value that is proportional to the actual voltage.
  • kwinnkwinn Posts: 8,697
    Isn't the "ADC" a part of the Arduino Voltage Sensors?

    Cannot find a data sheet for it, but as far as I can tell it is just a voltage divider that reduces a 0-25V range to a 0-5V range. That means 0V in = 0V out, 25V in = 5V out, and 12.3V in = 2.46V out.
  • kwinnkwinn Posts: 8,697
    The DEBUG window says with no battery banks hooked up "IN8 =0"
    "IN15=0"

    How do I get it to see a "0" when the Arduino voltage divider sensors see .06 volts on the sensors output side?

    The simplest is probably to replace the voltage sensor with a comparator that outputs a 0 when the voltage is less than 12.3V and a one when the battery is fully charged. The other option is to add an ADC and measure the actual battery voltage.
  • kwinnkwinn Posts: 8,697
    Kwinn I think you math is better than mine. Your right
    kwinn wrote: »
    The voltage out from the Arduino voltage sensor 0-25V should be 12.3/5=2.46V

    I have just returned from the Arduino site. It says it gives there micro controllers with this Arduino sensor report a "HIGH" if its " a voltage greater than 3 volts"

    https://www.arduino.cc/en/reference/constants

    My theory is Arduino's report "HIGH" is translated to Parallax DEBUG window "IN8=1" Arduino's report of "LOW" is Parallax DEBUG's report of "IN8=0" . Right????

    Your theory is correct as far as it goes. The problem is that the threshold voltages for sensing a high or low vary between chips, and sometimes between pins on the same chip, which makes this approach a poor choice for controlling battery charging. You need to accurately sense the low and high level voltage of the battery to avoid discharging it too far and overcharging it. This can be done with a comparator or with an adc.
  • kwinnkwinn Posts: 8,697
    On a hot Texas day it can get to 125 degrees inside that coach. It would be uninhabitable without a/c. I don't want to burn out the brushes on the generator. Inverter power is best but without a plug or generator is no good. I can run the engine it has 500 amps from alternators. I need that generator to run autononomously. If its 3 am I gotta get up at 5am to work I can wake up every two hours to push a generator switch. Can't sleep if its 80 degrees at night outside its 100 inside. Please help me.

    Wish you had posted this as your first post so I had a clue as to what the goal of this exercise was. Makes it much simpler to help you.
  • I am now starting to read "Basic Analog and Digital Student Guide" by Parallax. Kwinn have you read this book???


    I think I would like to use an ADC because the Arduino voltage sensors communicate digitally to the board. Maybe there is another way to do this by hooking up the positive and negative outputs from the sensors to inputs on the board?
    ADC would probably be more accurate and precise.
    I wish the "Homework BS2" board would have an ADC already built in.
  • https://www.parallax.com/product/adc0831

    I will just have to order one of these.
  • kwinnkwinn Posts: 8,697
    You may want to order one of these instead. It can measure current and voltage up to 26V and 3.2A, and there is code for using it with the BS2. If you replaced the current sensing resistor on the board with an external resistor it could measure much higher currents.
  • Wait I already have four of those "adafru.it/904 High Side DC Breakout". Kwinn you say you have Parallax code for
    one of these with my BS2????
  • It says "INA219 DC current Sensor" on it
  • Do you have a schematic to attach this to the BS2?
  • Thank you Kwinn
  • kwinnkwinn Posts: 8,697
    Thank you Kwinn

    Hope that means you have been on the Parallax site and found the BS2 demo code and the INA219B data sheet with the information required to put it to good use. Once I saw what you were trying to do it seemed like the perfect choice. Feel free to ask any questions you may have.
  • Wonderful. Thanks I am so glad someone is helping me with this massive undertaking.
  • kwinnkwinn Posts: 8,697
    Wonderful. Thanks I am so glad someone is helping me with this massive undertaking.

    You're welcome. Happy to help out, but please post a clear block diagram with all the modules and interconnections, with an explanation of what each of the modules do. Doesn't have to be fancy or very detailed. A lot of my projects start out on a napkin, then move up to a block diagram using Paint before a schematic and pcb layout is created.
  • tomcrawfordtomcrawford Posts: 1,129
    edited 2017-05-06 16:19
    Do you have a schematic to attach this to the BS2?

    This describes how the 219 was wired for the BS-2 demo code Kwinn referred to. Look about half way down page 1.

    here

  • kwinn wrote: »
    Wonderful. Thanks I am so glad someone is helping me with this massive undertaking.

    You're welcome. Happy to help out, but please post a clear block diagram with all the modules and interconnections, with an explanation of what each of the modules do. Doesn't have to be fancy or very detailed. A lot of my projects start out on a napkin, then move up to a block diagram using Paint before a schematic and pcb layout is created.

    Where can I download software that makes a tidy "Block Diagram"?????? I have pictures of this project. I am just having trouble uploading them. The site says "too big". I don't know why.
  • I would like to show everyone something like this.............https://learn.adafruit.com/adafruit-ina219-current-sensor-breakout/wiring.......

    for the BS2 to show where I am at. I don't know where to get the software to assemble the images.

    Fact is I must go an study exactly how the 219's "IC2" connects to the BS2.
  • This BS2

    1 senses voltage 12.3volts to 15.5volts

    2 when voltage is at or less than 12.3volts the board activates an output (micro pc board relays) that activate programmable timer relays.

    3 Those relays momentarily connect START , STOP,BATTERY SWITCH buttons on a Champion electric start generator 6 volt wireless remote inside the box.
  • The tiny bug looking thing has no plastic fob keychain or duel Lithium "2016" watch batteries. I know have it wired to a voltage divider that gives the little two button fob 6 volts from a 12volt glass fuse holder an .75amp fuse at back of Mouser box. The pwer goes to a red push button switch on the front of the box. When it is pushed it powers a 3 inch computer fan, A naked (no plastic bare push buttons with wires soldered on to it) Champion Generator Wireless remote key fob, and The BS2 Parallax Homework Board.

    Those leg like wires soldered to the buttons are activated by Geri relay,EAZY programable duel relay when the condition of low battery bank voltage is present at the BS2.

    219 is the way to go because it already has ADC chipset built in. I just need the code to activate the (relays) Address.
  • I would like to show everyone something like this.............https://learn.adafruit.com/adafruit-ina219-current-sensor-breakout/wiring.......

    for the BS2 to show where I am at. I don't know where to get the software to assemble the images.

    Fact is I must go an study exactly how the 219's "IC2" connects to the BS2.
    0. The link is broken

    1. Draw the images on a piece of paper and scan it.

    2 Here is how the 219's IC2 connects:
    ' -----[ I/O Definitions ]------------------------------------------------------
    '
    SDA       PIN            0
    SCL       PIN            1
    
  • kwinnkwinn Posts: 8,697
    kwinn wrote: »
    Wonderful. Thanks I am so glad someone is helping me with this massive undertaking.

    You're welcome. Happy to help out, but please post a clear block diagram with all the modules and interconnections, with an explanation of what each of the modules do. Doesn't have to be fancy or very detailed. A lot of my projects start out on a napkin, then move up to a block diagram using Paint before a schematic and pcb layout is created.

    Where can I download software that makes a tidy "Block Diagram"?????? I have pictures of this project. I am just having trouble uploading them. The site says "too big". I don't know why.

    I use the Paint program that comes with Windows for simple block diagrams.

    Today I had no pressing work to do so I dug out my BS2 board, soldered the pins on one of my INA219 boards, and wired it up so I could test the demo programs. I modified the program to print the values in columns for ease of use, and to control 4 leds so I could measure the current draw with 0, 1, 2, 3, and all four leds on. Each led is turned on in sequence, and when all four are on they are turned off in sequence. Debug output, picture of the setup, and modified code is attached. I will add a block diagram later.
    2632 x 2016 - 1M
    2640 x 2028 - 2M
    561 x 741 - 62K
  • kwinnkwinn Posts: 8,697
    Here is the block diagram of the BS2 and INA219 as everything was connected for testing with 4 leds and the modified program that I posted previously. The diodes and resistors connected to them are not needed. You will need one pin and some circuitry to start and stop the generator. Not sure of what is needed, but probably as simple as one or two relays and transistors to drive them.
  • kwinnkwinn Posts: 8,697
    Oops, must attach diagram....
    1352 x 620 - 94K
Sign In or Register to comment.