ARC Pro

Upgrade to ARC Pro

Elevate your robot's capabilities to the next level with Synthiam ARC Pro, unlocking a world of possibilities in robot programming.

#113  

Thanks Rich for providing the code and circuit example. I will try that out as soon as I can. That's the way to conquer a problem. One step at a time. Then move on and solve the next one.

Alan - I like your idea of providing IR LED's with different blink patterns in each room. If EZ-B could recognize blink patterns, it could provide lots of different info to the robot. Maybe it could recognize an LED pattern that resembles an arrow showing the robot which direction to travel.

What about an IR LED mounted on each side of doorways. When you or a script commands the robot to go to another room, somehow the boxes come on in sequence luring the robot from one room to the other? Kinda like "way points". How would you get the right box to come on in sequence? Wireless RS-232 serial?

Thanks to all who are participating in this discussion. It has been most interesting. The more minds on this problem the faster it will be resolved.:)

Rex

#114  

THAT would be hard to add REX ,first a circuit ,not hard ,but power is the problem and setting the height

REX this thread of your is my favorate,because i very heavy into home base finding and docking best reason i tested so many many designs about 20 and now i a see a 2 more to try and compare with my other designs.

Way i look it ,is try it and doesnt work try another design,some posted designs i made and i tried them they work ,just not that great and had problems,noise,or objects in the path,lighting and lot more

BUT biggest problem i seen is going from one room in the house to another room that has the home base at.

SO hope it works for you REX

FRED

United Kingdom
#115  

The zener diode goes across R3? But your schematic shows it going across R2 to ground. Can you clarify which is correct? Also confirm which way around the diode connects as it looks like it's on backwards, but that may be how it needs to be.

Added in Diode & a few notes on my schematic;

User-inserted image

Part list R1 - MCF 0.5W 10K/MCF 0.5W 20K/MCF 0.5W 30K resistor rated at 10k 20k or 30k ohm 0.5w carbon film (as required, see schematic for info) R2 - MCF 0.5W 10K resistor rated at 10k ohm 0.5w carbon film R3 - MCF 0.5W 10K resistor rated at 10k ohm 0.5w carbon film (optional) D1 - BZX79-C5V1 Zener Diode rated at 5.1v 500w 5mA

I'm sure you can pick from a range of resistor types provided the value is correct and rated at a minimum of 250mW.

All components can be fitted inline or you can make a small board easily. Mine are soldered inline and heat shrinked.

United Kingdom
#116  

I have a little time on my hands now so going to redo the script for just a single battery.


# EZ-Script
# Battery Level Monitor
# Version: 1.0
# Author: Rich
# Script date: 2013-02-15
# 
# Details
# =====
#  EZ-Script to monitor the voltage of a battery via the ADC port of the EZB,
# report the voltage as a variable within ARC and act upon low voltage
# for instance triggering the scripts for self docking and self charging.
#
# Notes
# =====
# Read voltage level of battery and report to software.
# Assumes only one battery requires monitoring.
# Assumes script for low power event is named "batterylow" and stored in the Script Manager
# Maximum voltage ADC ports can accept is +5v. If battery voltage is higher a voltage divider
# will be required - Schematic available at:-
# https://synthiam.com/Community/Questions/2834&page=13
# 
# Set variables
# ==========
# Change $vmin to low level alert value (remember to allow power to get to dock)
# Change $vmax to battery full charge (max 5 times multiplier)
# Change $multiplyer if using voltage divider
# Factor is 5/255 for adc value conversion to volts
# Change $battery to the correct ADC ports.

$vmin = 3.6
$vmax = 4.5
$multiplier = 1
$factor = 0.019607843
$battery = ADC0

# ---------------------------------------------------------------------
# -- Do not alter below this line unless you know what you are doing --
# ---------------------------------------------------------------------
# 01010010 01101001 01100011 01101000 

:ReadCells
# Get ADC values
$vc1 = GetADC($battery)

# Convert values to voltage
$cell1 = $vc1 * $factor * $multiplier

# Check for errors on connections
IF ($cell1 > $vmax)
  Print("Battery Connection Error")
  
  # Check for errors on cells
ELSEIF ($cell1 <= 0)
  Print ("Battery Error")
  
  # Check if below recommended levels
ELSEIF ($cell1 < $vmin)
  # Do sometihing if voltage low
  Print("Battery Low")
  ControlCommand("Script Manager",ScriptStart,"batterylow")

  # Just output the result and loop to begining
ELSE 
  Print("Round($cell1,2)V")
  # Wait 5 seconds
  Sleep(5000)
  # Go back to the start
  Goto(ReadCells)
ENDIF 
# Go back to the start
Goto(ReadCells)

#117  

sorry i meant R2 ,and R3 is needed DIODE is only to protect the AD so it nevers see's above 5.1 volts

I wish i didnt get rid of photoshop,to convert files,a few times i wanted to post a jpeg and only have in GIF or bmp

BUT i just easy buy another program,smaller one once i get i will post my circuit back

R3 is good for noise and limits the current going in to AD, most data sheets on microcontroller to add it

And only needed on A-D inputs,some tell you to add a cap in parallel ,i dont think its needed

Good to see at least you know scripts,so far it seems easy for me but some it may not,

United Kingdom
#118  

So is the schematic now correct, with protection and the correct diode, around the right way, in the right place?

Edit: Looks like my schematic is right looking at other sources and should protect against over voltage, I'm happy with it anyway although personally I wont be adding in D1 or R3 to my current project as it's all inline and if it aint broke don't fix it.

#119  

@Robotmaker

(slightly off topic post)

you said "I wish i didnt get rid of photoshop,to convert files,a few times i wanted to post a jpeg and only have in GIF or bmp"

I know you said you don't like Microsoft Paint (and I agree, I don't use it for anything but the simplest editing), but you can use it to convert GIF or BMP to JPEG.

Also, there is a really excellent free and open source program "The Gimp" http://www.gimp.org/ that is almost as powerful as Photoshop.

Alan

#120  

THANKS i forgot about paint ,about it converting files

RICH thats not a good idea,says if its not broken dont fix it

BEST is better to be safe then sorry latter on, $.15 ITEM and may be 5 min to put is in saves about $70 LATTER ON on a new EZB replacement,but may get lucky and still wont get bad for a few years ,nobody nows what will happen ,even you

thinking $.15 is too much money or the time to add it for you