Avatar for Progma

Progma

Member since Mar 2015 • Last active May 2015
  • 3 conversations
  • 12 comments

Most recent activity

  • in JavaScript
    Avatar for Progma

    @Gordon I tried to use a scope but I didn't really find anything. I also didn't know what to have my physics teacher do with the scope. I did find however that there is a constant wave going through that specific LCD pin/plate(I don't know what to call them at this point) which would account for the non-zero value. I also don't know what kind of LCD I have in the scale, since that might shed some light on what kind of input that kind needs.
    I have 10K ohm resistors but no capacitors unfortunately.

  • in JavaScript
    Avatar for Progma

    @Gordon the Espruino is connected to the ground of the scale as well.
    The way we are using the scale is by hopefully waiting for a signal from one of the LCD "plates" so I have no idea if the LCD scale is in PWM. I doubt it though.

  • in JavaScript
    Avatar for Progma

    @allObjects

    Are you planning to put the hall sensor into the buckle to detect if the 'plug' part is in?

    Yes that was the plan but it won't quite work like that because of the switch function of the HES.

  • in JavaScript
    Avatar for Progma

    Okay the top HES is the door HES and is C6. The right HES is C7 and is for the belt.

    The scenario is for my senior engineering class. My partner and I decided to try to prevent child (aged 1-4) heatstroke deaths. We came up with a setup that has an HES on the door and one on the belt of a car seat. The scale would be on the place where the child would sit. The scale (how we would have it) would output the weight of the child to the board so we could use it, but we couldn't find a way to integrate it that way do we opted for a signal that would come from the scale Lcd when the weight was above the minimum value(the scale shown turns on the lcd above a minimum weight). That wasn't the case. The child would be placed in the safety seat which would add weight to the scale and then the belt would be buckled together which would activate the belt HES. When the driver opens the speaker should sound for five seconds and be org for five seconds until the belt is unbuckled and the child removed from the safety seat. Closing that door should not turn off the speaker.

  • in JavaScript
    Avatar for Progma

    Sorry for the late response, I must have missed the email notification.
    New updates:
    I have no idea whether the weight sensor (scale LCD hack setup) can be used because the value always switches from 1 to 0 at random without any weight put on the scale
    Switched the scale output to C4 or C5 to implement the ADC to see if I'd get a different value (the value still just goes from like 0.864 to .5something to .28something to 0 at random)
    The Hall Effect sensors I have are the kind that switch on, meaning (so far as I understand) they have to place the one pole near it to activate it, remove that pole, and then place it near again to deactivate it.

    @allObjects

    Is the event - A) 'door just closed', or - B) 'door just opened'?

    The one HES (Hall Effect Sensor) is on a door that is (what I wanted it to do) just opened. The code with it though needs to reflect the switch aspect of the HES. Did I also mention that this HES is the sensor on C6?

    You also have a crossed-out timer. What was the original purpose of it?

    The original purpose of the timer was to have the program check if the scale and belt HES were both on and then sound the speaker for a certain amount of time until the scale and belt HES went off no matter the reading of the door HES and then somehow be able to repeat this (scale would output and then belt HES would activate and then wait for door to open). Also with that little note, I realized that someone would have to open the door after those two activated, and I need it to go off only after the person is getting out of the car (so opening the door after setting up the sensors but ignoring that door opening until the person gets out) . Anyways, the timer now would just be used for timing the time the speaker is on and then off.

    I will upload the picture in another post as well as a better description.

    Hopefully that helps answer some things. Thanks!

  • in Electronics
    Avatar for Progma

    I'm using a Hall Effect sensor that likes to just switch to an on state and stay there even when the magnet is taken away. I might just need a general knowledge of the sensor as well as a few questions below.

    How would I deactivate the sensor every time? like for example, putting the same side of the magnet to the HEs or the opposite side?

    Any way to not have it act like a switch?

    Thanks!

  • in JavaScript
    Avatar for Progma

    I've tried to use the block code you provided but I ended up with an out of memory error.
    I also have an algorithm I've made.
    What I have to do is check for a belt attachment (hall effect sensor on C7) and at the same time have a weight on a scale that is literally connected to the LCD connections (A8) (should send a current out when the weight is above like 7kg). Then when a second hall effect sensor is tripped off (from having a magnet to none) then make a sound to remind someone to remove the belt sensor and the weight and then the sound should stop. Also the sound should alternate 5 seconds on and 5 seconds off.

    If it would help I can include pictures of my setup.

    Would the device work better with the actual Javascript code? I guess I could try.

    Thanks for your help so far!

  • in JavaScript
    Avatar for Progma

    I don't quite understand the first option. What would the variable do as far as exiting the loop

    And far as the second one, would I make this a recursive function? I'm just making sure that the program can be reset essentially (without literally pressing the reset button).

    Either way here's what I interpreted from your second option

Actions